blob: 3f746104437ff6808c0154006bb25a4eed66de1f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00002# From configure.in Revision: 78965 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004# Generated by GNU Autoconf 2.61 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Thomas Wouters47b49bf2007-08-30 22:15:33 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000069as_nl='
70'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000071IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000138echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000164 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000456 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000485
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
512 as_ln_s='cp -p'
513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000538 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000578PACKAGE_VERSION='3.2'
579PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000619ac_subst_vars='SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000620PATH_SEPARATOR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
Ronald Oussoren6f6c5622009-12-24 14:03:19 +0000661LIPO_32BIT_FLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000662PYTHONFRAMEWORK
663PYTHONFRAMEWORKIDENTIFIER
664PYTHONFRAMEWORKDIR
665PYTHONFRAMEWORKPREFIX
666PYTHONFRAMEWORKINSTALLDIR
667FRAMEWORKINSTALLFIRST
668FRAMEWORKINSTALLLAST
669FRAMEWORKALTINSTALLFIRST
670FRAMEWORKALTINSTALLLAST
671FRAMEWORKUNIXTOOLSPREFIX
672MACHDEP
673SGI_ABI
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697GNULD
698RANLIB
699AR
700ARFLAGS
701SVNVERSION
702INSTALL_PROGRAM
703INSTALL_SCRIPT
704INSTALL_DATA
705LN
706OPT
707BASECFLAGS
708UNIVERSAL_ARCH_FLAGS
709OTHER_LIBTOOL_OPT
710LIBTOOL_CRUFT
711SO
712LDSHARED
713BLDSHARED
714CCSHARED
715LINKFORSHARED
716CFLAGSFORSHARED
717SHLIBS
Benjamin Petersond78735d2010-01-01 16:04:23 +0000718PKG_CONFIG
719LIBFFI_INCLUDEDIR
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000720USE_SIGNAL_MODULE
721SIGNAL_OBJS
722USE_THREAD_MODULE
723LDLAST
724THREADOBJ
725DLINCLDIR
726DYNLOADFILE
727MACHDEP_OBJS
728TRUE
729LIBOBJS
730HAVE_GETHOSTBYNAME_R_6_ARG
731HAVE_GETHOSTBYNAME_R_5_ARG
732HAVE_GETHOSTBYNAME_R_3_ARG
733HAVE_GETHOSTBYNAME_R
734HAVE_GETHOSTBYNAME
735LIBM
736LIBC
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001135# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001187 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001226 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001252\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001313 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001320 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-ipv6 Enable ipv6 (with ipv4) support
1327 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001328 --enable-big-digits[=BITS]
1329 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001330
1331Optional Packages:
1332 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1333 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001334 --with-universal-archs=ARCH
1335 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001336 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001337 --with-framework-name=FRAMEWORK
1338 specify an alternate name of the framework built
1339 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001340 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001341 --with-cxx-main=<compiler>
1342 compile main() and link python executable with C++
1343 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001344 --with-suffix=.exe set executable suffix
1345 --with-pydebug build with Py_DEBUG defined
1346 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001347 --with-system-expat build pyexpat module using an installed expat
1348 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001349 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001350 --with-dbmliborder=db1:db2:...
1351 order to check db backends for dbm. Valid value is a
1352 colon separated string with the backend names
1353 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with-signal-module disable/enable signal module
1355 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1356 --with(out)-threads[=DIRECTORY]
1357 disable/enable thread support
1358 --with(out)-thread[=DIRECTORY]
1359 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001361 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001363 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001365 --with-fpectl enable SIGFPE catching
1366 --with-libm=STRING math library
1367 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001368 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001369 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1370 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001371
1372Some influential environment variables:
1373 CC C compiler command
1374 CFLAGS C compiler flags
1375 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1376 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 LIBS libraries to pass to the linker, e.g. -l<library>
1378 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1379 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 CPP C preprocessor
1381
1382Use these variables to override the choices made by `configure' or to help
1383it to find libraries and programs with nonstandard names/locations.
1384
Georg Brandle2e15612009-05-20 18:25:10 +00001385Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001387ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi
1389
1390if test "$ac_init_help" = "recursive"; then
1391 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001393 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 ac_builddir=.
1395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001396case "$ac_dir" in
1397.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1398*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001401 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001402 case $ac_top_builddir_sub in
1403 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1404 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1405 esac ;;
1406esac
1407ac_abs_top_builddir=$ac_pwd
1408ac_abs_builddir=$ac_pwd$ac_dir_suffix
1409# for backward compatibility:
1410ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001415 ac_top_srcdir=$ac_top_builddir_sub
1416 ac_abs_top_srcdir=$ac_pwd ;;
1417 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001419 ac_top_srcdir=$srcdir
1420 ac_abs_top_srcdir=$srcdir ;;
1421 *) # Relative name.
1422 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1423 ac_top_srcdir=$ac_top_build_prefix$srcdir
1424 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001425esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001428 cd "$ac_dir" || { ac_status=$?; continue; }
1429 # Check for guested configure.
1430 if test -f "$ac_srcdir/configure.gnu"; then
1431 echo &&
1432 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1433 elif test -f "$ac_srcdir/configure"; then
1434 echo &&
1435 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001437 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438 fi || ac_status=$?
1439 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 done
1441fi
1442
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001443test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001444if $ac_init_version; then
1445 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001446python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001447generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014502002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001451This configure script is free software; the Free Software Foundation
1452gives unlimited permission to copy, distribute and modify it.
1453_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001457This file contains any messages produced by compilers while
1458running configure, to aid debugging if configure makes a mistake.
1459
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001460It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001461generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001462
1463 $ $0 $@
1464
1465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001467{
1468cat <<_ASUNAME
1469## --------- ##
1470## Platform. ##
1471## --------- ##
1472
1473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1474uname -m = `(uname -m) 2>/dev/null || echo unknown`
1475uname -r = `(uname -r) 2>/dev/null || echo unknown`
1476uname -s = `(uname -s) 2>/dev/null || echo unknown`
1477uname -v = `(uname -v) 2>/dev/null || echo unknown`
1478
1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1481
1482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1489
1490_ASUNAME
1491
1492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1493for as_dir in $PATH
1494do
1495 IFS=$as_save_IFS
1496 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001497 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001498done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001500
1501} >&5
1502
1503cat >&5 <<_ACEOF
1504
1505
1506## ----------- ##
1507## Core tests. ##
1508## ----------- ##
1509
1510_ACEOF
1511
1512
1513# Keep a trace of the command line.
1514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_configure_args0=
1520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001521ac_must_keep_next=false
1522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001523do
Skip Montanaro6dead952003-09-25 14:50:04 +00001524 for ac_arg
1525 do
1526 case $ac_arg in
1527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1529 | -silent | --silent | --silen | --sile | --sil)
1530 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001532 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 esac
1534 case $ac_pass in
1535 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1536 2)
1537 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001541 case $ac_arg in
1542 *=* | --config-cache | -C | -disable-* | --disable-* \
1543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1545 | -with-* | --with-* | -without-* | --without-* | --x)
1546 case "$ac_configure_args0 " in
1547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1548 esac
1549 ;;
1550 -* ) ac_must_keep_next=true ;;
1551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001554 ;;
1555 esac
1556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001557done
Skip Montanaro6dead952003-09-25 14:50:04 +00001558$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1559$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561# When interrupted or exit'd, cleanup temporary files, and complete
1562# config.log. We remove comments because anyway the quotes in there
1563# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564# WARNING: Use '\'' to represent an apostrophe within the trap.
1565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566trap 'exit_status=$?
1567 # Save into config.log some information that might help in debugging.
1568 {
1569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001570
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 cat <<\_ASBOX
1572## ---------------- ##
1573## Cache variables. ##
1574## ---------------- ##
1575_ASBOX
1576 echo
1577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578(
1579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1580 eval ac_val=\$$ac_var
1581 case $ac_val in #(
1582 *${as_nl}*)
1583 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001584 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1585echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 esac
1587 case $ac_var in #(
1588 _ | IFS | as_nl) ;; #(
1589 *) $as_unset $ac_var ;;
1590 esac ;;
1591 esac
1592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 "s/'\''/'\''\\\\'\'''\''/g;
1598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1599 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001602 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 esac |
1604 sort
1605)
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001607
1608 cat <<\_ASBOX
1609## ----------------- ##
1610## Output variables. ##
1611## ----------------- ##
1612_ASBOX
1613 echo
1614 for ac_var in $ac_subst_vars
1615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 eval ac_val=\$$ac_var
1617 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001620 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 done | sort
1622 echo
1623
1624 if test -n "$ac_subst_files"; then
1625 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626## ------------------- ##
1627## File substitutions. ##
1628## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001629_ASBOX
1630 echo
1631 for ac_var in $ac_subst_files
1632 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 eval ac_val=\$$ac_var
1634 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001637 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001638 done | sort
1639 echo
1640 fi
1641
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 if test -s confdefs.h; then
1643 cat <<\_ASBOX
1644## ----------- ##
1645## confdefs.h. ##
1646## ----------- ##
1647_ASBOX
1648 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 echo
1651 fi
1652 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001653 echo "$as_me: caught signal $ac_signal"
1654 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001655 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656 rm -f core *.core core.conftest.* &&
1657 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001658 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001659' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001660for ac_signal in 1 2 13 15; do
1661 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1662done
1663ac_signal=0
1664
1665# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001667
1668# Predefined preprocessor variables.
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_NAME "$PACKAGE_NAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_VERSION "$PACKAGE_VERSION"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_STRING "$PACKAGE_STRING"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1692_ACEOF
1693
1694
1695# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001702 set x "$ac_default_prefix/share/config.site" \
1703 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001705shift
1706for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001707do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001709 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1710echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 . "$ac_site_file"
1713 fi
1714done
1715
1716if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 # Some versions of bash will fail to source /dev/null (special
1718 # files actually), so we avoid doing that.
1719 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001720 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1721echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001723 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1724 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 esac
1726 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001728 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1729echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 >$cache_file
1731fi
1732
1733# Check that the precious variables saved in the cache have kept the same
1734# value.
1735ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001737 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1738 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1740 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 case $ac_old_set,$ac_new_set in
1742 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1744echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 ac_cache_corrupted=: ;;
1746 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001747 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 ac_cache_corrupted=: ;;
1750 ,);;
1751 *)
1752 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001753 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1754echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1755 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1756echo "$as_me: former value: $ac_old_val" >&2;}
1757 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1758echo "$as_me: current value: $ac_new_val" >&2;}
1759 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 fi;;
1761 esac
1762 # Pass precious variables to config.status.
1763 if test "$ac_new_set" = set; then
1764 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001765 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001766 *) ac_arg=$ac_var=$ac_new_val ;;
1767 esac
1768 case " $ac_configure_args " in
1769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1770 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1771 esac
1772 fi
1773done
1774if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001775 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1776echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1777 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1778echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780fi
1781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
Guido van Rossum7f43da71994-08-01 12:15:30 +00001806ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001808ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1809ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1810ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
1816
Martin v. Löwis11437992002-04-12 09:54:03 +00001817
Benjamin Petersond23f8222009-04-05 19:13:16 +00001818if test "$prefix" != "/"; then
1819 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1820fi
1821
1822
Martin v. Löwis11437992002-04-12 09:54:03 +00001823
1824
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001825
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001826
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001827# We don't use PACKAGE_ variables, and they cause conflicts
1828# with other autoconf-based packages that include Python.h
1829grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1830rm confdefs.h
1831mv confdefs.h.new confdefs.h
1832
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001833
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001834VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001835
Martin v. Löwis1142de32002-03-29 16:28:31 +00001836
1837SOVERSION=1.0
1838
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001839# The later defininition of _XOPEN_SOURCE disables certain features
1840# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1841
1842cat >>confdefs.h <<\_ACEOF
1843#define _GNU_SOURCE 1
1844_ACEOF
1845
1846
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001847# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1848# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1849# them.
1850
1851cat >>confdefs.h <<\_ACEOF
1852#define _NETBSD_SOURCE 1
1853_ACEOF
1854
1855
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001856# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1857# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1858# them.
1859
1860cat >>confdefs.h <<\_ACEOF
1861#define __BSD_VISIBLE 1
1862_ACEOF
1863
1864
Martin v. Löwisd6320502004-08-12 13:45:08 +00001865# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1866# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1867
1868cat >>confdefs.h <<\_ACEOF
1869#define _BSD_TYPES 1
1870_ACEOF
1871
1872
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001873# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1874# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1875# them.
1876
1877cat >>confdefs.h <<\_ACEOF
1878#define _DARWIN_C_SOURCE 1
1879_ACEOF
1880
1881
1882
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001883define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001884
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001885# Arguments passed to configure.
1886
1887CONFIG_ARGS="$ac_configure_args"
1888
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001889{ echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1890echo $ECHO_N "checking for --enable-universalsdk... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001891# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001892if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001893 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001894 case $enableval in
1895 yes)
1896 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001897 if test ! -d "${enableval}"
1898 then
1899 enableval=/
1900 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001901 ;;
1902 esac
1903 case $enableval in
1904 no)
1905 UNIVERSALSDK=
1906 enable_universalsdk=
1907 ;;
1908 *)
1909 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001910 if test ! -d "${UNIVERSALSDK}"
1911 then
1912 { { echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
1913echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
1914 { (exit 1); exit 1; }; }
1915 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001916 ;;
1917 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001918
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001919
Thomas Wouters477c8d52006-05-27 19:21:47 +00001920else
1921
1922 UNIVERSALSDK=
1923 enable_universalsdk=
1924
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001925fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001926
Ronald Oussoren8af24c12010-02-07 12:03:42 +00001927if test -n "${UNIVERSALSDK}"
1928then
1929 { echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
1930echo "${ECHO_T}${UNIVERSALSDK}" >&6; }
1931else
1932 { echo "$as_me:$LINENO: result: no" >&5
1933echo "${ECHO_T}no" >&6; }
1934fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001936
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001937
1938
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001939UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001941{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1942echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001943
1944# Check whether --with-universal-archs was given.
1945if test "${with_universal_archs+set}" = set; then
1946 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001947 { echo "$as_me:$LINENO: result: $withval" >&5
1948echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001949 UNIVERSAL_ARCHS="$withval"
1950
1951else
1952
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001953 { echo "$as_me:$LINENO: result: 32-bit" >&5
1954echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001955
1956fi
1957
1958
1959
1960
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001961
1962# Check whether --with-framework-name was given.
1963if test "${with_framework_name+set}" = set; then
1964 withval=$with_framework_name;
1965 PYTHONFRAMEWORK=${withval}
1966 PYTHONFRAMEWORKDIR=${withval}.framework
1967 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1968
1969else
1970
1971 PYTHONFRAMEWORK=Python
1972 PYTHONFRAMEWORKDIR=Python.framework
1973 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1974
1975fi
1976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001977# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001979 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001980 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001981 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001982 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 esac
1984 case $enableval in
1985 no)
1986 PYTHONFRAMEWORK=
1987 PYTHONFRAMEWORKDIR=no-framework
1988 PYTHONFRAMEWORKPREFIX=
1989 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001990 FRAMEWORKINSTALLFIRST=
1991 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001992 FRAMEWORKALTINSTALLFIRST=
1993 FRAMEWORKALTINSTALLLAST=
1994 if test "x${prefix}" = "xNONE"; then
1995 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1996 else
1997 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1998 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001999 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002000 ;;
2001 *)
2002 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002003 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002004 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002005 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002006 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2007 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002008
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002014 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002016 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002017 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002018 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002020 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002021
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002022 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2023
2024 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2025
Jack Jansene578a632001-08-15 01:27:14 +00002026 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002027
Guido van Rossum563e7081996-09-10 18:20:48 +00002028else
Martin v. Löwis11437992002-04-12 09:54:03 +00002029
Jack Jansene578a632001-08-15 01:27:14 +00002030 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002031 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002032 PYTHONFRAMEWORKPREFIX=
2033 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002034 FRAMEWORKINSTALLFIRST=
2035 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002036 FRAMEWORKALTINSTALLFIRST=
2037 FRAMEWORKALTINSTALLLAST=
2038 if test "x${prefix}" = "xNONE" ; then
2039 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2040 else
2041 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2042 fi
Jack Jansene578a632001-08-15 01:27:14 +00002043 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002046fi
2047
Thomas Wouters477c8d52006-05-27 19:21:47 +00002048
2049
Michael W. Hudson54241132001-12-07 15:38:26 +00002050
2051
2052
2053
Jack Jansene578a632001-08-15 01:27:14 +00002054
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002055
2056
2057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002058
Jack Jansene578a632001-08-15 01:27:14 +00002059##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002060## AC_HELP_STRING(--with-dyld,
2061## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002062##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063# Set name for machine-dependent library files
2064
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002065{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2066echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002067if test -z "$MACHDEP"
2068then
Guido van Rossum563e7081996-09-10 18:20:48 +00002069 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002070 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002071 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002072 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002074 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002075 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002076 ac_md_system=`echo $ac_sys_system |
2077 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2078 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002079 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002080 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002081
Guido van Rossum07397971997-04-29 21:49:50 +00002082 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002083 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002084 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002085 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002086 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002087 esac
2088fi
Guido van Rossum91922671997-10-09 20:24:13 +00002089
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002090# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2091# disable features if it is defined, without any means to access these
2092# features as extensions. For these systems, we skip the definition of
2093# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2094# some feature, make sure there is no alternative way to access this
2095# feature. Also, when using wildcards, make sure you have verified the
2096# need for not defining _XOPEN_SOURCE on all systems matching the
2097# wildcard, and that the wildcard does not include future systems
2098# (which may remove their limitations).
2099case $ac_sys_system/$ac_sys_release in
2100 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2101 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002102 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002103 # In addition, Stefan Krah confirms that issue #1244610 exists through
2104 # OpenBSD 4.6, but is fixed in 4.7.
2105 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002106 define_xopen_source=no
2107 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2108 # also defined. This can be overridden by defining _BSD_SOURCE
2109 # As this has a different meaning on Linux, only define it on OpenBSD
2110
2111cat >>confdefs.h <<\_ACEOF
2112#define _BSD_SOURCE 1
2113_ACEOF
2114
2115 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00002116 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00002117 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2118 # also defined. This can be overridden by defining _BSD_SOURCE
2119 # As this has a different meaning on Linux, only define it on OpenBSD
2120
2121cat >>confdefs.h <<\_ACEOF
2122#define _BSD_SOURCE 1
2123_ACEOF
2124
2125 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002126 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2127 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2128 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002129 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002130 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002131 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2132 # of union __?sigval. Reported by Stuart Bishop.
2133 SunOS/5.6)
2134 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002135 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2136 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002137 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002138 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002139 define_xopen_source=no;;
2140 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002141 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002142 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002143 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002144 # On FreeBSD 4, the math functions C89 does not cover are never defined
2145 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2146 FreeBSD/4.*)
2147 define_xopen_source=no;;
2148 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2149 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2150 # identifies itself as Darwin/7.*
2151 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2152 # disables platform specific features beyond repair.
2153 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2154 # has no effect, don't bother defining them
2155 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002156 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00002157 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00002158 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002159 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2160 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2161 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002162 AIX/4)
2163 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002164 AIX/5)
2165 if test `uname -r` -eq 1; then
2166 define_xopen_source=no
2167 fi
2168 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002169 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2170 # defining NI_NUMERICHOST.
2171 QNX/6.3.2)
2172 define_xopen_source=no
2173 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002174
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002175esac
2176
2177if test $define_xopen_source = yes
2178then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002179 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2180 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2182 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002183 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002184 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002185
2186cat >>confdefs.h <<\_ACEOF
2187#define _XOPEN_SOURCE 500
2188_ACEOF
2189
2190 ;;
2191 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002192
2193cat >>confdefs.h <<\_ACEOF
2194#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195_ACEOF
2196
Skip Montanarof0d5f792004-08-15 14:08:23 +00002197 ;;
2198 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002199
2200 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2201 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2202 # several APIs are not declared. Since this is also needed in some
2203 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002204 # except for Solaris 10, where it must not be defined,
2205 # as it implies XPG4.2
2206 case $ac_sys_system/$ac_sys_release in
2207 SunOS/5.10)
2208 ;;
2209 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002210
2211cat >>confdefs.h <<\_ACEOF
2212#define _XOPEN_SOURCE_EXTENDED 1
2213_ACEOF
2214
Martin v. Löwis7dece662005-11-26 11:38:24 +00002215 ;;
2216 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002217
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002218
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002219cat >>confdefs.h <<\_ACEOF
2220#define _POSIX_C_SOURCE 200112L
2221_ACEOF
2222
2223
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002224fi
2225
Guido van Rossum91922671997-10-09 20:24:13 +00002226#
2227# SGI compilers allow the specification of the both the ABI and the
2228# ISA on the command line. Depending on the values of these switches,
2229# different and often incompatable code will be generated.
2230#
2231# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2232# thus supply support for various ABI/ISA combinations. The MACHDEP
2233# variable is also adjusted.
2234#
2235
2236if test ! -z "$SGI_ABI"
2237then
2238 CC="cc $SGI_ABI"
2239 LDFLAGS="$SGI_ABI $LDFLAGS"
2240 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002242{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2243echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002244
Jack Jansen6b08a402004-06-03 12:41:45 +00002245# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2246# it may influence the way we can build extensions, so distutils
2247# needs to check it
2248
Thomas Wouters477c8d52006-05-27 19:21:47 +00002249
Jack Jansen6b08a402004-06-03 12:41:45 +00002250CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002251EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002252
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002253{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2254echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002255ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002256{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2257echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002258
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002260
2261# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2262# for debug/optimization stuff. BASECFLAGS is for flags that are required
2263# just to get things to compile and link. Users are free to override OPT
2264# when running configure or make. The build should not break if they do.
2265# BASECFLAGS should generally not be messed with, however.
2266
2267# XXX shouldn't some/most/all of this code be merged with the stuff later
2268# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002269{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2270echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002272# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002273if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002274 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002275 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002276 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002277 without_gcc=yes;;
2278 yes) CC=gcc
2279 without_gcc=no;;
2280 *) CC=$withval
2281 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002282 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002283else
Martin v. Löwis11437992002-04-12 09:54:03 +00002284
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002285 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002286 AIX*) CC=cc_r
2287 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002288 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002289 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002290fi
2291
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002292{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2293echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002294
Guido van Rossum8b131c51995-03-09 14:10:13 +00002295# If the user switches compilers, we can't believe the cache
2296if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2297then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002298 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002299(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002300echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002301(it is also a good idea to do 'make clean' before compiling)" >&2;}
2302 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002303fi
2304
Victor Stinner00d6a1d2010-03-25 01:02:29 +00002305save_CFLAGS=$CFLAGS
Martin v. Löwis11437992002-04-12 09:54:03 +00002306ac_ext=c
2307ac_cpp='$CPP $CPPFLAGS'
2308ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2309ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2310ac_compiler_gnu=$ac_cv_c_compiler_gnu
2311if test -n "$ac_tool_prefix"; then
2312 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2313set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002314{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002316if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002318else
2319 if test -n "$CC"; then
2320 ac_cv_prog_CC="$CC" # Let the user override the test.
2321else
Martin v. Löwis11437992002-04-12 09:54:03 +00002322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2323for as_dir in $PATH
2324do
2325 IFS=$as_save_IFS
2326 test -z "$as_dir" && as_dir=.
2327 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002328 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 +00002329 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002331 break 2
2332 fi
2333done
2334done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002336
Jack Jansendd19cf82001-12-06 22:36:17 +00002337fi
2338fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002339CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002340if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002341 { echo "$as_me:$LINENO: result: $CC" >&5
2342echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002344 { echo "$as_me:$LINENO: result: no" >&5
2345echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002346fi
2347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348
Martin v. Löwis11437992002-04-12 09:54:03 +00002349fi
2350if test -z "$ac_cv_prog_CC"; then
2351 ac_ct_CC=$CC
2352 # Extract the first word of "gcc", so it can be a program name with args.
2353set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002354{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2355echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002357 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002358else
2359 if test -n "$ac_ct_CC"; then
2360 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2361else
2362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2363for as_dir in $PATH
2364do
2365 IFS=$as_save_IFS
2366 test -z "$as_dir" && as_dir=.
2367 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368 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 +00002369 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002371 break 2
2372 fi
2373done
2374done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002375IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377fi
2378fi
2379ac_ct_CC=$ac_cv_prog_ac_ct_CC
2380if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002381 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2382echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002383else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002384 { echo "$as_me:$LINENO: result: no" >&5
2385echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002386fi
2387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002388 if test "x$ac_ct_CC" = x; then
2389 CC=""
2390 else
2391 case $cross_compiling:$ac_tool_warned in
2392yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002393{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2394whose name does not start with the host triplet. If you think this
2395configuration is useful to you, please write to autoconf@gnu.org." >&5
2396echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2397whose name does not start with the host triplet. If you think this
2398configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399ac_tool_warned=yes ;;
2400esac
2401 CC=$ac_ct_CC
2402 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002403else
2404 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002405fi
2406
Jack Jansendd19cf82001-12-06 22:36:17 +00002407if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408 if test -n "$ac_tool_prefix"; then
2409 # 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 +00002410set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002411{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002414 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002415else
2416 if test -n "$CC"; then
2417 ac_cv_prog_CC="$CC" # Let the user override the test.
2418else
Martin v. Löwis11437992002-04-12 09:54:03 +00002419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2420for as_dir in $PATH
2421do
2422 IFS=$as_save_IFS
2423 test -z "$as_dir" && as_dir=.
2424 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425 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 +00002426 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002427 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002428 break 2
2429 fi
2430done
2431done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434fi
2435fi
2436CC=$ac_cv_prog_CC
2437if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002438 { echo "$as_me:$LINENO: result: $CC" >&5
2439echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002441 { echo "$as_me:$LINENO: result: no" >&5
2442echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002443fi
2444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002447fi
2448if test -z "$CC"; then
2449 # Extract the first word of "cc", so it can be a program name with args.
2450set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002451{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2452echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002453if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002454 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002455else
2456 if test -n "$CC"; then
2457 ac_cv_prog_CC="$CC" # Let the user override the test.
2458else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2461for as_dir in $PATH
2462do
2463 IFS=$as_save_IFS
2464 test -z "$as_dir" && as_dir=.
2465 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 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 +00002467 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2468 ac_prog_rejected=yes
2469 continue
2470 fi
2471 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002472 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 break 2
2474 fi
2475done
2476done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002478
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002479if test $ac_prog_rejected = yes; then
2480 # We found a bogon in the path, so make sure we never use it.
2481 set dummy $ac_cv_prog_CC
2482 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002484 # We chose a different compiler from the bogus one.
2485 # However, it has the same basename, so the bogon will be chosen
2486 # first if we set CC to just the basename; use the full file name.
2487 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002489 fi
2490fi
2491fi
2492fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002493CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002494if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002495 { echo "$as_me:$LINENO: result: $CC" >&5
2496echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002498 { echo "$as_me:$LINENO: result: no" >&5
2499echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002500fi
2501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502
Martin v. Löwis11437992002-04-12 09:54:03 +00002503fi
2504if test -z "$CC"; then
2505 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 do
2508 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2509set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002510{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002512if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002513 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002514else
2515 if test -n "$CC"; then
2516 ac_cv_prog_CC="$CC" # Let the user override the test.
2517else
Martin v. Löwis11437992002-04-12 09:54:03 +00002518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2519for as_dir in $PATH
2520do
2521 IFS=$as_save_IFS
2522 test -z "$as_dir" && as_dir=.
2523 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 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 +00002525 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002529done
2530done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002532
2533fi
2534fi
2535CC=$ac_cv_prog_CC
2536if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002537 { echo "$as_me:$LINENO: result: $CC" >&5
2538echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002539else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002540 { echo "$as_me:$LINENO: result: no" >&5
2541echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002542fi
2543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 test -n "$CC" && break
2546 done
2547fi
2548if test -z "$CC"; then
2549 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002551do
2552 # Extract the first word of "$ac_prog", so it can be a program name with args.
2553set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002554{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2555echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002557 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002558else
2559 if test -n "$ac_ct_CC"; then
2560 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2561else
2562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2563for as_dir in $PATH
2564do
2565 IFS=$as_save_IFS
2566 test -z "$as_dir" && as_dir=.
2567 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 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 +00002569 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002570 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 break 2
2572 fi
2573done
2574done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577fi
2578fi
2579ac_ct_CC=$ac_cv_prog_ac_ct_CC
2580if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2582echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002583else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002584 { echo "$as_me:$LINENO: result: no" >&5
2585echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002586fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 test -n "$ac_ct_CC" && break
2590done
Michael W. Hudson54241132001-12-07 15:38:26 +00002591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 if test "x$ac_ct_CC" = x; then
2593 CC=""
2594 else
2595 case $cross_compiling:$ac_tool_warned in
2596yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002597{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2598whose name does not start with the host triplet. If you think this
2599configuration is useful to you, please write to autoconf@gnu.org." >&5
2600echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2601whose name does not start with the host triplet. If you think this
2602configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603ac_tool_warned=yes ;;
2604esac
2605 CC=$ac_ct_CC
2606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002607fi
2608
2609fi
2610
2611
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002612test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002613See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002614echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002615See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002616 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002617
2618# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002619echo "$as_me:$LINENO: checking for C compiler version" >&5
2620ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621{ (ac_try="$ac_compiler --version >&5"
2622case "(($ac_try" in
2623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2624 *) ac_try_echo=$ac_try;;
2625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631{ (ac_try="$ac_compiler -v >&5"
2632case "(($ac_try" in
2633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2634 *) ac_try_echo=$ac_try;;
2635esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641{ (ac_try="$ac_compiler -V >&5"
2642case "(($ac_try" in
2643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2644 *) ac_try_echo=$ac_try;;
2645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 (exit $ac_status); }
2651
2652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002653/* confdefs.h. */
2654_ACEOF
2655cat confdefs.h >>conftest.$ac_ext
2656cat >>conftest.$ac_ext <<_ACEOF
2657/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659int
2660main ()
2661{
2662
2663 ;
2664 return 0;
2665}
2666_ACEOF
2667ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002668ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002669# Try to create an executable without -o first, disregard a.out.
2670# It will help us diagnose broken compilers, and finding out an intuition
2671# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002672{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2673echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2674ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2675#
2676# List of possible output files, starting from the most likely.
2677# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2678# only as a last resort. b.out is created by i960 compilers.
2679ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2680#
2681# The IRIX 6 linker writes into existing files which may not be
2682# executable, retaining their permissions. Remove them first so a
2683# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684ac_rmfiles=
2685for ac_file in $ac_files
2686do
2687 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002688 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2690 esac
2691done
2692rm -f $ac_rmfiles
2693
2694if { (ac_try="$ac_link_default"
2695case "(($ac_try" in
2696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2697 *) ac_try_echo=$ac_try;;
2698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2705# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2706# in a Makefile. We should not override ac_cv_exeext if it was cached,
2707# so that the user can short-circuit this test for compilers unknown to
2708# Autoconf.
2709for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002710do
2711 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002712 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002713 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002714 ;;
2715 [ab].out )
2716 # We found the default executable, but exeext='' is most
2717 # certainly right.
2718 break;;
2719 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2721 then :; else
2722 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2723 fi
2724 # We set ac_cv_exeext here because the later test for it is not
2725 # safe: cross compilers may not add the suffix if given an `-o'
2726 # argument, so we may need to know it at that point already.
2727 # Even if this section looks crufty: it has the advantage of
2728 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002729 break;;
2730 * )
2731 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734test "$ac_cv_exeext" = no && ac_cv_exeext=
2735
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002736else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 ac_file=''
2738fi
2739
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002740{ echo "$as_me:$LINENO: result: $ac_file" >&5
2741echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002742if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002744sed 's/^/| /' conftest.$ac_ext >&5
2745
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002746{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002747See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002748echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002749See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002750 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002751fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002752
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002755# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002756# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002757{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2758echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2760# If not cross compiling, check that we can run a simple program.
2761if test "$cross_compiling" != yes; then
2762 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763 { (case "(($ac_try" in
2764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2765 *) ac_try_echo=$ac_try;;
2766esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 (exit $ac_status); }; }; then
2772 cross_compiling=no
2773 else
2774 if test "$cross_compiling" = maybe; then
2775 cross_compiling=yes
2776 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002777 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002778If you meant to cross compile, use \`--host'.
2779See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002780echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002781If you meant to cross compile, use \`--host'.
2782See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002783 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 fi
2785 fi
2786fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787{ echo "$as_me:$LINENO: result: yes" >&5
2788echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002789
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002790rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002791ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002793# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002794{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2795echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2796{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2797echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002798
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002799{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2800echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801if { (ac_try="$ac_link"
2802case "(($ac_try" in
2803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2804 *) ac_try_echo=$ac_try;;
2805esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002807 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002811 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2812# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2813# work properly (i.e., refer to `conftest.exe'), while it won't with
2814# `rm'.
2815for ac_file in conftest.exe conftest conftest.*; do
2816 test -f "$ac_file" || continue
2817 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002819 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2820 break;;
2821 * ) break;;
2822 esac
2823done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002825 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002826See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002828See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002829 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002830fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002831
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002832rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002833{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2834echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002835
2836rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002837EXEEXT=$ac_cv_exeext
2838ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002839{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2840echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002841if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002842 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002843else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002844 cat >conftest.$ac_ext <<_ACEOF
2845/* confdefs.h. */
2846_ACEOF
2847cat confdefs.h >>conftest.$ac_ext
2848cat >>conftest.$ac_ext <<_ACEOF
2849/* end confdefs.h. */
2850
2851int
2852main ()
2853{
2854
2855 ;
2856 return 0;
2857}
2858_ACEOF
2859rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002860if { (ac_try="$ac_compile"
2861case "(($ac_try" in
2862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2863 *) ac_try_echo=$ac_try;;
2864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002866 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002869 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870 for ac_file in conftest.o conftest.obj conftest.*; do
2871 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002872 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002873 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002874 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2875 break;;
2876 esac
2877done
2878else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002880sed 's/^/| /' conftest.$ac_ext >&5
2881
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002882{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002883See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002884echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002885See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002886 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002887fi
2888
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002889rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002890fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002891{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2892echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002893OBJEXT=$ac_cv_objext
2894ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002895{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2896echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002897if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002898 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002899else
2900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002901/* confdefs.h. */
2902_ACEOF
2903cat confdefs.h >>conftest.$ac_ext
2904cat >>conftest.$ac_ext <<_ACEOF
2905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002906
Martin v. Löwis11437992002-04-12 09:54:03 +00002907int
2908main ()
2909{
2910#ifndef __GNUC__
2911 choke me
2912#endif
2913
2914 ;
2915 return 0;
2916}
2917_ACEOF
2918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002919if { (ac_try="$ac_compile"
2920case "(($ac_try" in
2921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2922 *) ac_try_echo=$ac_try;;
2923esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002927 grep -v '^ *+' conftest.er1 >conftest.err
2928 rm -f conftest.er1
2929 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 (exit $ac_status); } && {
2932 test -z "$ac_c_werror_flag" ||
2933 test ! -s conftest.err
2934 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 ac_compiler_gnu=yes
2936else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002938sed 's/^/| /' conftest.$ac_ext >&5
2939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002940 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002942
2943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002944ac_cv_c_compiler_gnu=$ac_compiler_gnu
2945
2946fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002947{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2948echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2949GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002950ac_test_CFLAGS=${CFLAGS+set}
2951ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002952{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2953echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002954if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002955 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002956else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 ac_save_c_werror_flag=$ac_c_werror_flag
2958 ac_c_werror_flag=yes
2959 ac_cv_prog_cc_g=no
2960 CFLAGS="-g"
2961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002962/* confdefs.h. */
2963_ACEOF
2964cat confdefs.h >>conftest.$ac_ext
2965cat >>conftest.$ac_ext <<_ACEOF
2966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
Martin v. Löwis11437992002-04-12 09:54:03 +00002968int
2969main ()
2970{
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002977if { (ac_try="$ac_compile"
2978case "(($ac_try" in
2979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980 *) ac_try_echo=$ac_try;;
2981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002985 grep -v '^ *+' conftest.er1 >conftest.err
2986 rm -f conftest.er1
2987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002989 (exit $ac_status); } && {
2990 test -z "$ac_c_werror_flag" ||
2991 test ! -s conftest.err
2992 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002993 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002996sed 's/^/| /' conftest.$ac_ext >&5
2997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002998 CFLAGS=""
2999 cat >conftest.$ac_ext <<_ACEOF
3000/* confdefs.h. */
3001_ACEOF
3002cat confdefs.h >>conftest.$ac_ext
3003cat >>conftest.$ac_ext <<_ACEOF
3004/* end confdefs.h. */
3005
3006int
3007main ()
3008{
3009
3010 ;
3011 return 0;
3012}
3013_ACEOF
3014rm -f conftest.$ac_objext
3015if { (ac_try="$ac_compile"
3016case "(($ac_try" in
3017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018 *) ac_try_echo=$ac_try;;
3019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 (eval "$ac_compile") 2>conftest.er1
3022 ac_status=$?
3023 grep -v '^ *+' conftest.er1 >conftest.err
3024 rm -f conftest.er1
3025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003027 (exit $ac_status); } && {
3028 test -z "$ac_c_werror_flag" ||
3029 test ! -s conftest.err
3030 } && test -s conftest.$ac_objext; then
3031 :
3032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003033 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034sed 's/^/| /' conftest.$ac_ext >&5
3035
3036 ac_c_werror_flag=$ac_save_c_werror_flag
3037 CFLAGS="-g"
3038 cat >conftest.$ac_ext <<_ACEOF
3039/* confdefs.h. */
3040_ACEOF
3041cat confdefs.h >>conftest.$ac_ext
3042cat >>conftest.$ac_ext <<_ACEOF
3043/* end confdefs.h. */
3044
3045int
3046main ()
3047{
3048
3049 ;
3050 return 0;
3051}
3052_ACEOF
3053rm -f conftest.$ac_objext
3054if { (ac_try="$ac_compile"
3055case "(($ac_try" in
3056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3057 *) ac_try_echo=$ac_try;;
3058esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060 (eval "$ac_compile") 2>conftest.er1
3061 ac_status=$?
3062 grep -v '^ *+' conftest.er1 >conftest.err
3063 rm -f conftest.er1
3064 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066 (exit $ac_status); } && {
3067 test -z "$ac_c_werror_flag" ||
3068 test ! -s conftest.err
3069 } && test -s conftest.$ac_objext; then
3070 ac_cv_prog_cc_g=yes
3071else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003072 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073sed 's/^/| /' conftest.$ac_ext >&5
3074
3075
Guido van Rossum627b2d71993-12-24 10:39:16 +00003076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003077
3078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080
3081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3082fi
3083
3084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3085 ac_c_werror_flag=$ac_save_c_werror_flag
3086fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003087{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3088echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003089if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003090 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003091elif test $ac_cv_prog_cc_g = yes; then
3092 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003093 CFLAGS="-g -O2"
3094 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003095 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096 fi
3097else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003098 if test "$GCC" = yes; then
3099 CFLAGS="-O2"
3100 else
3101 CFLAGS=
3102 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003104{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3105echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003107 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003108else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003110ac_save_CC=$CC
3111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003112/* confdefs.h. */
3113_ACEOF
3114cat confdefs.h >>conftest.$ac_ext
3115cat >>conftest.$ac_ext <<_ACEOF
3116/* end confdefs.h. */
3117#include <stdarg.h>
3118#include <stdio.h>
3119#include <sys/types.h>
3120#include <sys/stat.h>
3121/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3122struct buf { int x; };
3123FILE * (*rcsopen) (struct buf *, struct stat *, int);
3124static char *e (p, i)
3125 char **p;
3126 int i;
3127{
3128 return p[i];
3129}
3130static char *f (char * (*g) (char **, int), char **p, ...)
3131{
3132 char *s;
3133 va_list v;
3134 va_start (v,p);
3135 s = g (p, va_arg (v,int));
3136 va_end (v);
3137 return s;
3138}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003139
3140/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3141 function prototypes and stuff, but not '\xHH' hex character constants.
3142 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003144 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3145 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003147int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3150 inside strings and character constants. */
3151#define FOO(x) 'x'
3152int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3153
Skip Montanaro6dead952003-09-25 14:50:04 +00003154int test (int i, double x);
3155struct s1 {int (*f) (int a);};
3156struct s2 {int (*f) (double a);};
3157int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3158int argc;
3159char **argv;
3160int
3161main ()
3162{
3163return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3164 ;
3165 return 0;
3166}
3167_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3169 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003170do
3171 CC="$ac_save_CC $ac_arg"
3172 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173if { (ac_try="$ac_compile"
3174case "(($ac_try" in
3175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3176 *) ac_try_echo=$ac_try;;
3177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003181 grep -v '^ *+' conftest.er1 >conftest.err
3182 rm -f conftest.er1
3183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185 (exit $ac_status); } && {
3186 test -z "$ac_c_werror_flag" ||
3187 test ! -s conftest.err
3188 } && test -s conftest.$ac_objext; then
3189 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003192sed 's/^/| /' conftest.$ac_ext >&5
3193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003194
Skip Montanaro6dead952003-09-25 14:50:04 +00003195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196
3197rm -f core conftest.err conftest.$ac_objext
3198 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003199done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003201CC=$ac_save_CC
3202
3203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204# AC_CACHE_VAL
3205case "x$ac_cv_prog_cc_c89" in
3206 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003207 { echo "$as_me:$LINENO: result: none needed" >&5
3208echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003209 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003210 { echo "$as_me:$LINENO: result: unsupported" >&5
3211echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003212 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003214 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3215echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003216esac
3217
Skip Montanaro6dead952003-09-25 14:50:04 +00003218
Martin v. Löwis11437992002-04-12 09:54:03 +00003219ac_ext=c
3220ac_cpp='$CPP $CPPFLAGS'
3221ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3222ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3223ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224
Victor Stinner00d6a1d2010-03-25 01:02:29 +00003225CFLAGS=$save_CFLAGS
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003226
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227
3228
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003229{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3230echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003233if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003234 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003235
3236 case $withval in
3237 no) with_cxx_main=no
3238 MAINCC='$(CC)';;
3239 yes) with_cxx_main=yes
3240 MAINCC='$(CXX)';;
3241 *) with_cxx_main=yes
3242 MAINCC=$withval
3243 if test -z "$CXX"
3244 then
3245 CXX=$withval
3246 fi;;
3247 esac
3248else
3249
3250 with_cxx_main=no
3251 MAINCC='$(CC)'
3252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003255{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3256echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003257
3258preset_cxx="$CXX"
3259if test -z "$CXX"
3260then
3261 case "$CC" in
3262 gcc) # Extract the first word of "g++", so it can be a program name with args.
3263set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003264{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003266if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003267 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268else
3269 case $CXX in
3270 [\\/]* | ?:[\\/]*)
3271 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3272 ;;
3273 *)
3274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3275for as_dir in notfound
3276do
3277 IFS=$as_save_IFS
3278 test -z "$as_dir" && as_dir=.
3279 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003280 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 +00003281 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003282 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003283 break 2
3284 fi
3285done
3286done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003288
3289 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3290 ;;
3291esac
3292fi
3293CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003294if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003295 { echo "$as_me:$LINENO: result: $CXX" >&5
3296echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003298 { echo "$as_me:$LINENO: result: no" >&5
3299echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302 ;;
3303 cc) # Extract the first word of "c++", so it can be a program name with args.
3304set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003305{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003307if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003308 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003309else
3310 case $CXX in
3311 [\\/]* | ?:[\\/]*)
3312 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3313 ;;
3314 *)
3315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in notfound
3317do
3318 IFS=$as_save_IFS
3319 test -z "$as_dir" && as_dir=.
3320 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 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 +00003322 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003324 break 2
3325 fi
3326done
3327done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003328IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003329
3330 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3331 ;;
3332esac
3333fi
3334CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003335if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003336 { echo "$as_me:$LINENO: result: $CXX" >&5
3337echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003338else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003339 { echo "$as_me:$LINENO: result: no" >&5
3340echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003343 ;;
3344 esac
3345 if test "$CXX" = "notfound"
3346 then
3347 CXX=""
3348 fi
3349fi
3350if test -z "$CXX"
3351then
3352 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3353do
3354 # Extract the first word of "$ac_prog", so it can be a program name with args.
3355set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003356{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3357echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003359 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360else
3361 if test -n "$CXX"; then
3362 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3363else
3364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3365for as_dir in $PATH
3366do
3367 IFS=$as_save_IFS
3368 test -z "$as_dir" && as_dir=.
3369 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003370 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 +00003371 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003372 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003373 break 2
3374 fi
3375done
3376done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003377IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003378
3379fi
3380fi
3381CXX=$ac_cv_prog_CXX
3382if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003383 { echo "$as_me:$LINENO: result: $CXX" >&5
3384echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003386 { echo "$as_me:$LINENO: result: no" >&5
3387echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388fi
3389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003390
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003391 test -n "$CXX" && break
3392done
3393test -n "$CXX" || CXX="notfound"
3394
3395 if test "$CXX" = "notfound"
3396 then
3397 CXX=""
3398 fi
3399fi
3400if test "$preset_cxx" != "$CXX"
3401then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003402 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003403
3404 By default, distutils will build C++ extension modules with \"$CXX\".
3405 If this is not intended, then set CXX on the configure command line.
3406 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003407echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003408
3409 By default, distutils will build C++ extension modules with \"$CXX\".
3410 If this is not intended, then set CXX on the configure command line.
3411 " >&2;}
3412fi
3413
3414
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003422{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3423echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003424# On Suns, sometimes $CPP names a directory.
3425if test -n "$CPP" && test -d "$CPP"; then
3426 CPP=
3427fi
3428if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003430 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003431else
Martin v. Löwis11437992002-04-12 09:54:03 +00003432 # Double quotes because CPP needs to be expanded
3433 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3434 do
3435 ac_preproc_ok=false
3436for ac_c_preproc_warn_flag in '' yes
3437do
3438 # Use a header file that comes with gcc, so configuring glibc
3439 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003440 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3441 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003442 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003443 # not just through cpp. "Syntax error" is here to catch this case.
3444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003445/* confdefs.h. */
3446_ACEOF
3447cat confdefs.h >>conftest.$ac_ext
3448cat >>conftest.$ac_ext <<_ACEOF
3449/* end confdefs.h. */
3450#ifdef __STDC__
3451# include <limits.h>
3452#else
3453# include <assert.h>
3454#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003455 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457if { (ac_try="$ac_cpp conftest.$ac_ext"
3458case "(($ac_try" in
3459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3460 *) ac_try_echo=$ac_try;;
3461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003465 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 rm -f conftest.er1
3467 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469 (exit $ac_status); } >/dev/null && {
3470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3471 test ! -s conftest.err
3472 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003473 :
3474else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003476sed 's/^/| /' conftest.$ac_ext >&5
3477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 # Broken: fails on valid input.
3479continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 # can be detected and how.
3486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003487/* confdefs.h. */
3488_ACEOF
3489cat confdefs.h >>conftest.$ac_ext
3490cat >>conftest.$ac_ext <<_ACEOF
3491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003492#include <ac_nonexistent.h>
3493_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494if { (ac_try="$ac_cpp conftest.$ac_ext"
3495case "(($ac_try" in
3496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497 *) ac_try_echo=$ac_try;;
3498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003500 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003502 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003503 rm -f conftest.er1
3504 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 (exit $ac_status); } >/dev/null && {
3507 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3508 test ! -s conftest.err
3509 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003510 # Broken: success on invalid input.
3511continue
3512else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003514sed 's/^/| /' conftest.$ac_ext >&5
3515
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 # Passes both tests.
3517ac_preproc_ok=:
3518break
3519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521rm -f conftest.err conftest.$ac_ext
3522
3523done
3524# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3525rm -f conftest.err conftest.$ac_ext
3526if $ac_preproc_ok; then
3527 break
3528fi
3529
3530 done
3531 ac_cv_prog_CPP=$CPP
3532
3533fi
3534 CPP=$ac_cv_prog_CPP
3535else
3536 ac_cv_prog_CPP=$CPP
3537fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003538{ echo "$as_me:$LINENO: result: $CPP" >&5
3539echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003540ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 # On the NeXT, cc -E runs the code through the compiler's parser,
3548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003560 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003570 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 rm -f conftest.er1
3572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574 (exit $ac_status); } >/dev/null && {
3575 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 :
3579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003581sed 's/^/| /' conftest.$ac_ext >&5
3582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583 # Broken: fails on valid input.
3584continue
3585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587rm -f conftest.err conftest.$ac_ext
3588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 # can be detected and how.
3591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003592/* confdefs.h. */
3593_ACEOF
3594cat confdefs.h >>conftest.$ac_ext
3595cat >>conftest.$ac_ext <<_ACEOF
3596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003597#include <ac_nonexistent.h>
3598_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599if { (ac_try="$ac_cpp conftest.$ac_ext"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003607 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 rm -f conftest.er1
3609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (exit $ac_status); } >/dev/null && {
3612 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3613 test ! -s conftest.err
3614 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 # Broken: success on invalid input.
3616continue
3617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003619sed 's/^/| /' conftest.$ac_ext >&5
3620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Passes both tests.
3622ac_preproc_ok=:
3623break
3624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626rm -f conftest.err conftest.$ac_ext
3627
3628done
3629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3630rm -f conftest.err conftest.$ac_ext
3631if $ac_preproc_ok; then
3632 :
3633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003634 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003635See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003636echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003637See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003638 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640
3641ac_ext=c
3642ac_cpp='$CPP $CPPFLAGS'
3643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3645ac_compiler_gnu=$ac_cv_c_compiler_gnu
3646
3647
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003648{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3649echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003651 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003653 # Extract the first word of "grep ggrep" to use in msg output
3654if test -z "$GREP"; then
3655set dummy grep ggrep; ac_prog_name=$2
3656if test "${ac_cv_path_GREP+set}" = set; then
3657 echo $ECHO_N "(cached) $ECHO_C" >&6
3658else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003660# Loop through the user's path and test for each of PROGNAME-LIST
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
3666 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003667 for ac_exec_ext in '' $ac_executable_extensions; do
3668 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3669 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3670 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003671 # Check for GNU $ac_path_GREP
3672case `"$ac_path_GREP" --version 2>&1` in
3673*GNU*)
3674 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3675*)
3676 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003677 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678 while :
3679 do
3680 cat "conftest.in" "conftest.in" >"conftest.tmp"
3681 mv "conftest.tmp" "conftest.in"
3682 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3685 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3686 ac_count=`expr $ac_count + 1`
3687 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3688 # Best one so far, save it but keep looking for a better one
3689 ac_cv_path_GREP="$ac_path_GREP"
3690 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003691 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692 # 10*(2^10) chars as input seems more than enough
3693 test $ac_count -gt 10 && break
3694 done
3695 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3696esac
3697
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003698
3699 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700 done
3701done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003702
3703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003705
3706
3707fi
3708
3709GREP="$ac_cv_path_GREP"
3710if test -z "$GREP"; then
3711 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3712echo "$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 +00003713 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003714fi
3715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716else
3717 ac_cv_path_GREP=$GREP
3718fi
3719
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003722{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3723echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 GREP="$ac_cv_path_GREP"
3725
3726
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003727{ echo "$as_me:$LINENO: checking for egrep" >&5
3728echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003730 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003731else
3732 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3733 then ac_cv_path_EGREP="$GREP -E"
3734 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003735 # Extract the first word of "egrep" to use in msg output
3736if test -z "$EGREP"; then
3737set dummy egrep; ac_prog_name=$2
3738if test "${ac_cv_path_EGREP+set}" = set; then
3739 echo $ECHO_N "(cached) $ECHO_C" >&6
3740else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003742# Loop through the user's path and test for each of PROGNAME-LIST
3743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3745do
3746 IFS=$as_save_IFS
3747 test -z "$as_dir" && as_dir=.
3748 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003749 for ac_exec_ext in '' $ac_executable_extensions; do
3750 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3751 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3752 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753 # Check for GNU $ac_path_EGREP
3754case `"$ac_path_EGREP" --version 2>&1` in
3755*GNU*)
3756 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3757*)
3758 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003759 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003760 while :
3761 do
3762 cat "conftest.in" "conftest.in" >"conftest.tmp"
3763 mv "conftest.tmp" "conftest.in"
3764 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003765 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3767 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3768 ac_count=`expr $ac_count + 1`
3769 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3770 # Best one so far, save it but keep looking for a better one
3771 ac_cv_path_EGREP="$ac_path_EGREP"
3772 ac_path_EGREP_max=$ac_count
3773 fi
3774 # 10*(2^10) chars as input seems more than enough
3775 test $ac_count -gt 10 && break
3776 done
3777 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3778esac
3779
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780
3781 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782 done
3783done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003784
3785done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003787
3788
3789fi
3790
3791EGREP="$ac_cv_path_EGREP"
3792if test -z "$EGREP"; then
3793 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3794echo "$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 +00003795 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003796fi
3797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798else
3799 ac_cv_path_EGREP=$EGREP
3800fi
3801
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 fi
3804fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003805{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3806echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003808
3809
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003810
3811{ echo "$as_me:$LINENO: checking for AIX" >&5
3812echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3813cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003814/* confdefs.h. */
3815_ACEOF
3816cat confdefs.h >>conftest.$ac_ext
3817cat >>conftest.$ac_ext <<_ACEOF
3818/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003819#ifdef _AIX
3820 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003821#endif
3822
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003823_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3825 $EGREP "yes" >/dev/null 2>&1; then
3826 { echo "$as_me:$LINENO: result: yes" >&5
3827echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003828cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003829#define _ALL_SOURCE 1
3830_ACEOF
3831
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003832else
3833 { echo "$as_me:$LINENO: result: no" >&5
3834echo "${ECHO_T}no" >&6; }
3835fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00003836rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837
3838
3839
3840# Check for unsupported systems
3841case $ac_sys_system/$ac_sys_release in
3842atheos*|Linux*/1*)
3843 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3844 echo See README for details.
3845 exit 1;;
3846esac
3847
3848
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003849{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3850echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003851
3852# Check whether --with-suffix was given.
3853if test "${with_suffix+set}" = set; then
3854 withval=$with_suffix;
3855 case $withval in
3856 no) EXEEXT=;;
3857 yes) EXEEXT=.exe;;
3858 *) EXEEXT=$withval;;
3859 esac
3860fi
3861
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003862{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3863echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003864
3865# Test whether we're running on a non-case-sensitive system, in which
3866# case we give a warning if no ext is given
3867
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003868{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3869echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003870if test ! -d CaseSensitiveTestDir; then
3871mkdir CaseSensitiveTestDir
3872fi
3873
3874if test -d casesensitivetestdir
3875then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003876 { echo "$as_me:$LINENO: result: yes" >&5
3877echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003878 BUILDEXEEXT=.exe
3879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003880 { echo "$as_me:$LINENO: result: no" >&5
3881echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003882 BUILDEXEEXT=$EXEEXT
3883fi
3884rmdir CaseSensitiveTestDir
3885
3886case $MACHDEP in
3887bsdos*)
3888 case $CC in
3889 gcc) CC="$CC -D_HAVE_BSDI";;
3890 esac;;
3891esac
3892
3893case $ac_sys_system in
3894hp*|HP*)
3895 case $CC in
3896 cc|*/cc) CC="$CC -Ae";;
3897 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003898SunOS*)
3899 # Some functions have a prototype only with that define, e.g. confstr
3900
3901cat >>confdefs.h <<\_ACEOF
3902#define __EXTENSIONS__ 1
3903_ACEOF
3904
3905 ;;
3906esac
3907
3908
3909
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003910{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3911echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003912if test -z "$LIBRARY"
3913then
3914 LIBRARY='libpython$(VERSION).a'
3915fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003916{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3917echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003918
3919# LDLIBRARY is the name of the library to link against (as opposed to the
3920# name of the library into which to insert object files). BLDLIBRARY is also
3921# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3922# is blank as the main program is not linked directly against LDLIBRARY.
3923# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3924# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3925# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3926# DLLLIBRARY is the shared (i.e., DLL) library.
3927#
3928# RUNSHARED is used to run shared python without installed libraries
3929#
3930# INSTSONAME is the name of the shared library that will be use to install
3931# on the system - some systems like version suffix, others don't
3932
3933
3934
3935
3936
3937
3938LDLIBRARY="$LIBRARY"
3939BLDLIBRARY='$(LDLIBRARY)'
3940INSTSONAME='$(LDLIBRARY)'
3941DLLLIBRARY=''
3942LDLIBRARYDIR=''
3943RUNSHARED=''
3944
3945# LINKCC is the command that links the python executable -- default is $(CC).
3946# If CXX is set, and if it is needed to link a main function that was
3947# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3948# python might then depend on the C++ runtime
3949# This is altered for AIX in order to build the export list before
3950# linking.
3951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003952{ echo "$as_me:$LINENO: checking LINKCC" >&5
3953echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003954if test -z "$LINKCC"
3955then
3956 LINKCC='$(PURIFY) $(MAINCC)'
3957 case $ac_sys_system in
3958 AIX*)
3959 exp_extra="\"\""
3960 if test $ac_sys_release -ge 5 -o \
3961 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3962 exp_extra="."
3963 fi
3964 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003965 QNX*)
3966 # qcc must be used because the other compilers do not
3967 # support -N.
3968 LINKCC=qcc;;
3969 esac
3970fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003971{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3972echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003973
3974# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3975# make sure we default having it set to "no": this is used by
3976# distutils.unixccompiler to know if it should add --enable-new-dtags
3977# to linker command lines, and failing to detect GNU ld simply results
3978# in the same bahaviour as before.
3979
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003980{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3981echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003982ac_prog=ld
3983if test "$GCC" = yes; then
3984 ac_prog=`$CC -print-prog-name=ld`
3985fi
3986case `"$ac_prog" -V 2>&1 < /dev/null` in
3987 *GNU*)
3988 GNULD=yes;;
3989 *)
3990 GNULD=no;;
3991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003992{ echo "$as_me:$LINENO: result: $GNULD" >&5
3993echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003994
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003995{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3996echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003997# Check whether --enable-shared was given.
3998if test "${enable_shared+set}" = set; then
3999 enableval=$enable_shared;
4000fi
4001
4002
4003if test -z "$enable_shared"
4004then
4005 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004006 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004007 enable_shared="yes";;
4008 *)
4009 enable_shared="no";;
4010 esac
4011fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004012{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4013echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004014
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4016echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017# Check whether --enable-profiling was given.
4018if test "${enable_profiling+set}" = set; then
4019 enableval=$enable_profiling; ac_save_cc="$CC"
4020 CC="$CC -pg"
4021 if test "$cross_compiling" = yes; then
4022 ac_enable_profiling="no"
4023else
4024 cat >conftest.$ac_ext <<_ACEOF
4025/* confdefs.h. */
4026_ACEOF
4027cat confdefs.h >>conftest.$ac_ext
4028cat >>conftest.$ac_ext <<_ACEOF
4029/* end confdefs.h. */
4030int main() { return 0; }
4031_ACEOF
4032rm -f conftest$ac_exeext
4033if { (ac_try="$ac_link"
4034case "(($ac_try" in
4035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4036 *) ac_try_echo=$ac_try;;
4037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039 (eval "$ac_link") 2>&5
4040 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4043 { (case "(($ac_try" in
4044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4045 *) ac_try_echo=$ac_try;;
4046esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048 (eval "$ac_try") 2>&5
4049 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004051 (exit $ac_status); }; }; then
4052 ac_enable_profiling="yes"
4053else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004054 echo "$as_me: program exited with status $ac_status" >&5
4055echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004056sed 's/^/| /' conftest.$ac_ext >&5
4057
4058( exit $ac_status )
4059ac_enable_profiling="no"
4060fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4062fi
4063
4064
4065 CC="$ac_save_cc"
4066fi
4067
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004068{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4069echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004070
4071case "$ac_enable_profiling" in
4072 "yes")
4073 BASECFLAGS="-pg $BASECFLAGS"
4074 LDFLAGS="-pg $LDFLAGS"
4075 ;;
4076esac
4077
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004078{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4079echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004080
4081# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4082# library that we build, but we do not want to link against it (we
4083# will find it with a -framework option). For this reason there is an
4084# extra variable BLDLIBRARY against which Python and the extension
4085# modules are linked, BLDLIBRARY. This is normally the same as
4086# LDLIBRARY, but empty for MacOSX framework builds.
4087if test "$enable_framework"
4088then
4089 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4090 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4091 BLDLIBRARY=''
4092else
4093 BLDLIBRARY='$(LDLIBRARY)'
4094fi
4095
4096# Other platforms follow
4097if test $enable_shared = "yes"; then
4098
4099cat >>confdefs.h <<\_ACEOF
4100#define Py_ENABLE_SHARED 1
4101_ACEOF
4102
4103 case $ac_sys_system in
4104 CYGWIN*)
4105 LDLIBRARY='libpython$(VERSION).dll.a'
4106 DLLLIBRARY='libpython$(VERSION).dll'
4107 ;;
4108 SunOS*)
4109 LDLIBRARY='libpython$(VERSION).so'
4110 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4111 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4112 INSTSONAME="$LDLIBRARY".$SOVERSION
4113 ;;
4114 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4115 LDLIBRARY='libpython$(VERSION).so'
4116 BLDLIBRARY='-L. -lpython$(VERSION)'
4117 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4118 case $ac_sys_system in
4119 FreeBSD*)
4120 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4121 ;;
4122 esac
4123 INSTSONAME="$LDLIBRARY".$SOVERSION
4124 ;;
4125 hp*|HP*)
4126 case `uname -m` in
4127 ia64)
4128 LDLIBRARY='libpython$(VERSION).so'
4129 ;;
4130 *)
4131 LDLIBRARY='libpython$(VERSION).sl'
4132 ;;
4133 esac
4134 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4135 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4136 ;;
4137 OSF*)
4138 LDLIBRARY='libpython$(VERSION).so'
4139 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4140 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4141 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004142 Darwin*)
4143 LDLIBRARY='libpython$(VERSION).dylib'
4144 BLDLIBRARY='-L. -lpython$(VERSION)'
4145 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4146 ;;
4147
4148 esac
4149else # shared is disabled
4150 case $ac_sys_system in
4151 CYGWIN*)
4152 BLDLIBRARY='$(LIBRARY)'
4153 LDLIBRARY='libpython$(VERSION).dll.a'
4154 ;;
4155 esac
4156fi
4157
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004158{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4159echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004160
4161if test -n "$ac_tool_prefix"; then
4162 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4163set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004164{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4165echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004166if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004167 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004168else
4169 if test -n "$RANLIB"; then
4170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4171else
4172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4173for as_dir in $PATH
4174do
4175 IFS=$as_save_IFS
4176 test -z "$as_dir" && as_dir=.
4177 for ac_exec_ext in '' $ac_executable_extensions; do
4178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004180 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004181 break 2
4182 fi
4183done
4184done
4185IFS=$as_save_IFS
4186
4187fi
4188fi
4189RANLIB=$ac_cv_prog_RANLIB
4190if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004191 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4192echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004193else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004194 { echo "$as_me:$LINENO: result: no" >&5
4195echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004196fi
4197
4198
4199fi
4200if test -z "$ac_cv_prog_RANLIB"; then
4201 ac_ct_RANLIB=$RANLIB
4202 # Extract the first word of "ranlib", so it can be a program name with args.
4203set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004206if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004207 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004208else
4209 if test -n "$ac_ct_RANLIB"; then
4210 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4211else
4212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213for as_dir in $PATH
4214do
4215 IFS=$as_save_IFS
4216 test -z "$as_dir" && as_dir=.
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4219 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004221 break 2
4222 fi
4223done
4224done
4225IFS=$as_save_IFS
4226
4227fi
4228fi
4229ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4230if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004231 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4232echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004234 { echo "$as_me:$LINENO: result: no" >&5
4235echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004236fi
4237
4238 if test "x$ac_ct_RANLIB" = x; then
4239 RANLIB=":"
4240 else
4241 case $cross_compiling:$ac_tool_warned in
4242yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004243{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4244whose name does not start with the host triplet. If you think this
4245configuration is useful to you, please write to autoconf@gnu.org." >&5
4246echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4247whose name does not start with the host triplet. If you think this
4248configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004249ac_tool_warned=yes ;;
4250esac
4251 RANLIB=$ac_ct_RANLIB
4252 fi
4253else
4254 RANLIB="$ac_cv_prog_RANLIB"
4255fi
4256
4257
4258for ac_prog in ar aal
4259do
4260 # Extract the first word of "$ac_prog", so it can be a program name with args.
4261set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004262{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004264if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004265 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004266else
4267 if test -n "$AR"; then
4268 ac_cv_prog_AR="$AR" # Let the user override the test.
4269else
4270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4271for as_dir in $PATH
4272do
4273 IFS=$as_save_IFS
4274 test -z "$as_dir" && as_dir=.
4275 for ac_exec_ext in '' $ac_executable_extensions; do
4276 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4277 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004278 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004279 break 2
4280 fi
4281done
4282done
4283IFS=$as_save_IFS
4284
4285fi
4286fi
4287AR=$ac_cv_prog_AR
4288if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004289 { echo "$as_me:$LINENO: result: $AR" >&5
4290echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004291else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004292 { echo "$as_me:$LINENO: result: no" >&5
4293echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004294fi
4295
4296
4297 test -n "$AR" && break
4298done
4299test -n "$AR" || AR="ar"
4300
4301
4302# tweak ARFLAGS only if the user didn't set it on the command line
4303
4304if test -z "$ARFLAGS"
4305then
4306 ARFLAGS="rc"
4307fi
4308
4309
4310# Extract the first word of "svnversion", so it can be a program name with args.
4311set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004314if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004315 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004316else
4317 if test -n "$SVNVERSION"; then
4318 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4319else
4320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4321for as_dir in $PATH
4322do
4323 IFS=$as_save_IFS
4324 test -z "$as_dir" && as_dir=.
4325 for ac_exec_ext in '' $ac_executable_extensions; do
4326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4327 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004329 break 2
4330 fi
4331done
4332done
4333IFS=$as_save_IFS
4334
4335 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4336fi
4337fi
4338SVNVERSION=$ac_cv_prog_SVNVERSION
4339if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004340 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4341echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004342else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004343 { echo "$as_me:$LINENO: result: no" >&5
4344echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004345fi
4346
4347
4348if test $SVNVERSION = found
4349then
4350 SVNVERSION="svnversion \$(srcdir)"
4351else
4352 SVNVERSION="echo Unversioned directory"
4353fi
4354
4355case $MACHDEP in
4356bsdos*|hp*|HP*)
4357 # install -d does not work on BSDI or HP-UX
4358 if test -z "$INSTALL"
4359 then
4360 INSTALL="${srcdir}/install-sh -c"
4361 fi
4362esac
4363ac_aux_dir=
4364for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4365 if test -f "$ac_dir/install-sh"; then
4366 ac_aux_dir=$ac_dir
4367 ac_install_sh="$ac_aux_dir/install-sh -c"
4368 break
4369 elif test -f "$ac_dir/install.sh"; then
4370 ac_aux_dir=$ac_dir
4371 ac_install_sh="$ac_aux_dir/install.sh -c"
4372 break
4373 elif test -f "$ac_dir/shtool"; then
4374 ac_aux_dir=$ac_dir
4375 ac_install_sh="$ac_aux_dir/shtool install -c"
4376 break
4377 fi
4378done
4379if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004380 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4381echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004382 { (exit 1); exit 1; }; }
4383fi
4384
4385# These three variables are undocumented and unsupported,
4386# and are intended to be withdrawn in a future Autoconf release.
4387# They can cause serious problems if a builder's source tree is in a directory
4388# whose full name contains unusual characters.
4389ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4390ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4391ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4392
4393
4394# Find a good install program. We prefer a C program (faster),
4395# so one script is as good as another. But avoid the broken or
4396# incompatible versions:
4397# SysV /etc/install, /usr/sbin/install
4398# SunOS /usr/etc/install
4399# IRIX /sbin/install
4400# AIX /bin/install
4401# AmigaOS /C/install, which installs bootblocks on floppy discs
4402# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4403# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4404# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4405# OS/2's system install, which has a completely different semantic
4406# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004407{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4408echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409if test -z "$INSTALL"; then
4410if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004411 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004412else
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in $PATH
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
4418 # Account for people who put trailing slashes in PATH elements.
4419case $as_dir/ in
4420 ./ | .// | /cC/* | \
4421 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4422 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4423 /usr/ucb/* ) ;;
4424 *)
4425 # OSF1 and SCO ODT 3.0 have their own names for install.
4426 # Don't use installbsd from OSF since it installs stuff as root
4427 # by default.
4428 for ac_prog in ginstall scoinst install; do
4429 for ac_exec_ext in '' $ac_executable_extensions; do
4430 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4431 if test $ac_prog = install &&
4432 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4433 # AIX install. It has an incompatible calling convention.
4434 :
4435 elif test $ac_prog = install &&
4436 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4437 # program-specific install script used by HP pwplus--don't use.
4438 :
4439 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004440 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4441 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004442 fi
4443 fi
4444 done
4445 done
4446 ;;
4447esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448done
4449IFS=$as_save_IFS
4450
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004451
4452fi
4453 if test "${ac_cv_path_install+set}" = set; then
4454 INSTALL=$ac_cv_path_install
4455 else
4456 # As a last resort, use the slow shell script. Don't cache a
4457 # value for INSTALL within a source directory, because that will
4458 # break other packages using the cache if that directory is
4459 # removed, or if the value is a relative name.
4460 INSTALL=$ac_install_sh
4461 fi
4462fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004463{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4464echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004465
4466# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4467# It thinks the first close brace ends the variable substitution.
4468test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4469
4470test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4471
4472test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4473
4474
4475# Not every filesystem supports hard links
4476
4477if test -z "$LN" ; then
4478 case $ac_sys_system in
4479 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004480 *) LN=ln;;
4481 esac
4482fi
4483
4484# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004485{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4486echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487
4488# Check whether --with-pydebug was given.
4489if test "${with_pydebug+set}" = set; then
4490 withval=$with_pydebug;
4491if test "$withval" != no
4492then
4493
4494cat >>confdefs.h <<\_ACEOF
4495#define Py_DEBUG 1
4496_ACEOF
4497
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004498 { echo "$as_me:$LINENO: result: yes" >&5
4499echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004500 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004501else { echo "$as_me:$LINENO: result: no" >&5
4502echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004503fi
4504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004505 { echo "$as_me:$LINENO: result: no" >&5
4506echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004507fi
4508
4509
4510# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4511# merged with this chunk of code?
4512
4513# Optimizer/debugger flags
4514# ------------------------
4515# (The following bit of code is complicated enough - please keep things
4516# indented properly. Just pretend you're editing Python code. ;-)
4517
4518# There are two parallel sets of case statements below, one that checks to
4519# see if OPT was set and one that does BASECFLAGS setting based upon
4520# compiler and platform. BASECFLAGS tweaks need to be made even if the
4521# user set OPT.
4522
4523# tweak OPT based on compiler and platform, only if the user didn't set
4524# it on the command line
4525
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00004526if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004527then
4528 case $GCC in
4529 yes)
4530 if test "$CC" != 'g++' ; then
4531 STRICT_PROTO="-Wstrict-prototypes"
4532 fi
4533 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4534 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4535 WRAP="-fwrapv"
4536 fi
4537 case $ac_cv_prog_cc_g in
4538 yes)
4539 if test "$Py_DEBUG" = 'true' ; then
4540 # Optimization messes up debuggers, so turn it off for
4541 # debug builds.
4542 OPT="-g -Wall $STRICT_PROTO"
4543 else
4544 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4545 fi
4546 ;;
4547 *)
4548 OPT="-O3 -Wall $STRICT_PROTO"
4549 ;;
4550 esac
4551 case $ac_sys_system in
4552 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4553 ;;
4554 esac
4555 ;;
4556
4557 *)
4558 OPT="-O"
4559 ;;
4560 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004561fi
4562
4563
4564
4565# The -arch flags for universal builds on OSX
4566UNIVERSAL_ARCH_FLAGS=
4567
4568
4569# tweak BASECFLAGS based on compiler and platform
4570case $GCC in
4571yes)
4572 # Python violates C99 rules, by casting between incompatible
4573 # pointer types. GCC may generate bad code as a result of that,
4574 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004575 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4576echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004577 ac_save_cc="$CC"
4578 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004579 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004580 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004581else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004582 cat >conftest.$ac_ext <<_ACEOF
4583/* confdefs.h. */
4584_ACEOF
4585cat confdefs.h >>conftest.$ac_ext
4586cat >>conftest.$ac_ext <<_ACEOF
4587/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004588
4589int
4590main ()
4591{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004593 ;
4594 return 0;
4595}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004597rm -f conftest.$ac_objext
4598if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004599case "(($ac_try" in
4600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4601 *) ac_try_echo=$ac_try;;
4602esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004604 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004605 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004606 grep -v '^ *+' conftest.er1 >conftest.err
4607 rm -f conftest.er1
4608 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004610 (exit $ac_status); } && {
4611 test -z "$ac_c_werror_flag" ||
4612 test ! -s conftest.err
4613 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004614 ac_cv_no_strict_aliasing_ok=yes
4615else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004616 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617sed 's/^/| /' conftest.$ac_ext >&5
4618
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004619 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004620fi
4621
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004623fi
4624
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004626 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4627echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628 if test $ac_cv_no_strict_aliasing_ok = yes
4629 then
4630 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4631 fi
4632
4633 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4634 # support. Without this, treatment of subnormals doesn't follow
4635 # the standard.
4636 case $ac_sys_machine in
4637 alpha*)
4638 BASECFLAGS="$BASECFLAGS -mieee"
4639 ;;
4640 esac
4641
4642 case $ac_sys_system in
4643 SCO_SV*)
4644 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4645 ;;
4646 # is there any other compiler on Darwin besides gcc?
4647 Darwin*)
4648 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4649 # used to be here, but non-Apple gcc doesn't accept them.
4650
4651
4652 if test "${enable_universalsdk}"; then
4653 UNIVERSAL_ARCH_FLAGS=""
4654 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4655 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4656 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004657 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004658
Ronald Oussoren755740f2010-02-07 19:56:39 +00004659 # You have to use different flags on various versions of
4660 # OSX to extract PPC code from an universal binary, basically
4661 # '-arch ppc' on OSX 10.4 and '-arch ppc7400' on anything
4662 # newer.
4663 # Because '-arch pp7400' works on OSX 10.5 or higher this
4664 # test is only present in the '32-bit' branch, all other
4665 # branches require OSX 10.5 to compile.
4666
4667 { echo "$as_me:$LINENO: checking lipo flag for extracting ppc code" >&5
4668echo $ECHO_N "checking lipo flag for extracting ppc code... $ECHO_C" >&6; }
4669 FN="test.$$"
4670 cat >${FN}.c <<-EOF
4671 int main() { return 0; }
4672EOF
4673 ${CC} ${CFLAGS} -arch ppc -arch i386 -o ${FN} ${FN}.c -isysroot ${UNIVERSALSDK}
4674 if test $? != 0 ; then
4675 rm ${FN} ${FN}.c
4676 { echo "$as_me:$LINENO: result: failed, assumee -extract ppc7400" >&5
4677echo "${ECHO_T}failed, assumee -extract ppc7400" >&6; }
4678 else
4679 lipo "${FN}" -extract ppc7400 -output "${FN}.out" 2>/dev/null
4680 if test $? != 0 ; then
4681 LIPO_32BIT_FLAGS="-extract ppc -extract i386"
4682 { echo "$as_me:$LINENO: result: \"'-extract ppc'\"" >&5
4683echo "${ECHO_T}\"'-extract ppc'\"" >&6; }
4684 else
4685 { echo "$as_me:$LINENO: result: \"'-extract ppc7400'\"" >&5
4686echo "${ECHO_T}\"'-extract ppc7400'\"" >&6; }
4687 fi
4688 rm -f ${FN} ${FN}.c ${FN}.out
4689 fi
4690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004691 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4692 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004693 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004694 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004695
4696 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4697 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004698 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004699 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004700
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004701 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4702 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004703 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004704 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004705
4706 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4707 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004708 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00004709 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004711 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004712 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4713echo "$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 +00004714 { (exit 1); exit 1; }; }
4715
4716 fi
4717
4718
4719 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4720 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4721 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4722 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4723 fi
4724 fi
4725
4726 # Calculate the right deployment target for this build.
4727 #
4728 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4729 if test ${cur_target} '>' 10.2; then
4730 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004731 if test ${enable_universalsdk}; then
4732 if test "${UNIVERSAL_ARCHS}" = "all"; then
4733 # Ensure that the default platform for a
4734 # 4-way universal build is OSX 10.5,
4735 # that's the first OS release where
4736 # 4-way builds make sense.
4737 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004738
4739 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4740 cur_target='10.5'
4741
4742 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4743 cur_target='10.5'
4744
4745 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4746 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004747 fi
4748 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00004749 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004750 # On Intel macs default to a deployment
4751 # target of 10.4, that's the first OSX
4752 # release with Intel support.
4753 cur_target="10.4"
4754 fi
4755 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756 fi
4757 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4758
4759 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4760 # environment with a value that is the same as what we'll use
4761 # in the Makefile to ensure that we'll get the same compiler
4762 # environment during configure and build time.
4763 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4764 export MACOSX_DEPLOYMENT_TARGET
4765 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4766
4767 ;;
4768 OSF*)
4769 BASECFLAGS="$BASECFLAGS -mieee"
4770 ;;
4771 esac
4772 ;;
4773
4774*)
4775 case $ac_sys_system in
4776 OpenUNIX*|UnixWare*)
4777 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4778 ;;
4779 OSF*)
4780 BASECFLAGS="$BASECFLAGS -ieee -std"
4781 ;;
4782 SCO_SV*)
4783 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4784 ;;
4785 esac
4786 ;;
4787esac
4788
4789if test "$Py_DEBUG" = 'true'; then
4790 :
4791else
4792 OPT="-DNDEBUG $OPT"
4793fi
4794
4795if test "$ac_arch_flags"
4796then
4797 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4798fi
4799
4800# disable check for icc since it seems to pass, but generates a warning
4801if test "$CC" = icc
4802then
4803 ac_cv_opt_olimit_ok=no
4804fi
4805
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004806{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4807echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004809 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810else
4811 ac_save_cc="$CC"
4812CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004813cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004814/* confdefs.h. */
4815_ACEOF
4816cat confdefs.h >>conftest.$ac_ext
4817cat >>conftest.$ac_ext <<_ACEOF
4818/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004819
4820int
4821main ()
4822{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004823int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004824 ;
4825 return 0;
4826}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004827_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004828rm -f conftest.$ac_objext
4829if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830case "(($ac_try" in
4831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832 *) ac_try_echo=$ac_try;;
4833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004837 grep -v '^ *+' conftest.er1 >conftest.err
4838 rm -f conftest.er1
4839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841 (exit $ac_status); } && {
4842 test -z "$ac_c_werror_flag" ||
4843 test ! -s conftest.err
4844 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 ac_cv_opt_olimit_ok=yes
4846else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004847 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848sed 's/^/| /' conftest.$ac_ext >&5
4849
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004850 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851fi
4852
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854CC="$ac_save_cc"
4855fi
4856
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004857{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4858echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859if test $ac_cv_opt_olimit_ok = yes; then
4860 case $ac_sys_system in
4861 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4862 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4863 # environment?
4864 Darwin*)
4865 ;;
4866 *)
4867 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4868 ;;
4869 esac
4870else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004871 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4872echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004874 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875else
4876 ac_save_cc="$CC"
4877 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004878 cat >conftest.$ac_ext <<_ACEOF
4879/* confdefs.h. */
4880_ACEOF
4881cat confdefs.h >>conftest.$ac_ext
4882cat >>conftest.$ac_ext <<_ACEOF
4883/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004884
4885int
4886main ()
4887{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004889 ;
4890 return 0;
4891}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004892_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004893rm -f conftest.$ac_objext
4894if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895case "(($ac_try" in
4896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4897 *) ac_try_echo=$ac_try;;
4898esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004900 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004901 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004902 grep -v '^ *+' conftest.er1 >conftest.err
4903 rm -f conftest.er1
4904 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004906 (exit $ac_status); } && {
4907 test -z "$ac_c_werror_flag" ||
4908 test ! -s conftest.err
4909 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910 ac_cv_olimit_ok=yes
4911else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004912 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004913sed 's/^/| /' conftest.$ac_ext >&5
4914
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004915 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916fi
4917
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 CC="$ac_save_cc"
4920fi
4921
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004922 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4923echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 if test $ac_cv_olimit_ok = yes; then
4925 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4926 fi
4927fi
4928
4929# Check whether GCC supports PyArg_ParseTuple format
4930if test "$GCC" = "yes"
4931then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004932 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4933echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004934 save_CFLAGS=$CFLAGS
4935 CFLAGS="$CFLAGS -Werror"
4936 cat >conftest.$ac_ext <<_ACEOF
4937/* confdefs.h. */
4938_ACEOF
4939cat confdefs.h >>conftest.$ac_ext
4940cat >>conftest.$ac_ext <<_ACEOF
4941/* end confdefs.h. */
4942
4943 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4944
4945int
4946main ()
4947{
4948
4949 ;
4950 return 0;
4951}
4952_ACEOF
4953rm -f conftest.$ac_objext
4954if { (ac_try="$ac_compile"
4955case "(($ac_try" in
4956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4957 *) ac_try_echo=$ac_try;;
4958esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004960 (eval "$ac_compile") 2>conftest.er1
4961 ac_status=$?
4962 grep -v '^ *+' conftest.er1 >conftest.err
4963 rm -f conftest.er1
4964 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 (exit $ac_status); } && {
4967 test -z "$ac_c_werror_flag" ||
4968 test ! -s conftest.err
4969 } && test -s conftest.$ac_objext; then
4970
4971cat >>confdefs.h <<\_ACEOF
4972#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4973_ACEOF
4974
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004975 { echo "$as_me:$LINENO: result: yes" >&5
4976echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004978 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004979sed 's/^/| /' conftest.$ac_ext >&5
4980
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004981 { echo "$as_me:$LINENO: result: no" >&5
4982echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983
4984fi
4985
4986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4987 CFLAGS=$save_CFLAGS
4988fi
4989
4990# On some compilers, pthreads are available without further options
4991# (e.g. MacOS X). On some of these systems, the compiler will not
4992# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4993# So we have to see first whether pthreads are available without
4994# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004995{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4996echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004997if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004998 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999else
5000 if test "$cross_compiling" = yes; then
5001 ac_cv_pthread_is_default=no
5002else
5003 cat >conftest.$ac_ext <<_ACEOF
5004/* confdefs.h. */
5005_ACEOF
5006cat confdefs.h >>conftest.$ac_ext
5007cat >>conftest.$ac_ext <<_ACEOF
5008/* end confdefs.h. */
5009
5010#include <pthread.h>
5011
5012void* routine(void* p){return NULL;}
5013
5014int main(){
5015 pthread_t p;
5016 if(pthread_create(&p,NULL,routine,NULL)!=0)
5017 return 1;
5018 (void)pthread_detach(p);
5019 return 0;
5020}
5021
5022_ACEOF
5023rm -f conftest$ac_exeext
5024if { (ac_try="$ac_link"
5025case "(($ac_try" in
5026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5027 *) ac_try_echo=$ac_try;;
5028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030 (eval "$ac_link") 2>&5
5031 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5034 { (case "(($ac_try" in
5035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5036 *) ac_try_echo=$ac_try;;
5037esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039 (eval "$ac_try") 2>&5
5040 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 (exit $ac_status); }; }; then
5043
5044 ac_cv_pthread_is_default=yes
5045 ac_cv_kthread=no
5046 ac_cv_pthread=no
5047
5048else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005049 echo "$as_me: program exited with status $ac_status" >&5
5050echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051sed 's/^/| /' conftest.$ac_ext >&5
5052
5053( exit $ac_status )
5054ac_cv_pthread_is_default=no
5055fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5057fi
5058
5059
5060
5061fi
5062
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005063{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5064echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066
5067if test $ac_cv_pthread_is_default = yes
5068then
5069 ac_cv_kpthread=no
5070else
5071# -Kpthread, if available, provides the right #defines
5072# and linker options to make pthread_create available
5073# Some compilers won't report that they do not support -Kpthread,
5074# so we need to run a program to see whether it really made the
5075# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005076{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5077echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005079 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005080else
5081 ac_save_cc="$CC"
5082CC="$CC -Kpthread"
5083if test "$cross_compiling" = yes; then
5084 ac_cv_kpthread=no
5085else
5086 cat >conftest.$ac_ext <<_ACEOF
5087/* confdefs.h. */
5088_ACEOF
5089cat confdefs.h >>conftest.$ac_ext
5090cat >>conftest.$ac_ext <<_ACEOF
5091/* end confdefs.h. */
5092
5093#include <pthread.h>
5094
5095void* routine(void* p){return NULL;}
5096
5097int main(){
5098 pthread_t p;
5099 if(pthread_create(&p,NULL,routine,NULL)!=0)
5100 return 1;
5101 (void)pthread_detach(p);
5102 return 0;
5103}
5104
5105_ACEOF
5106rm -f conftest$ac_exeext
5107if { (ac_try="$ac_link"
5108case "(($ac_try" in
5109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5110 *) ac_try_echo=$ac_try;;
5111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005113 (eval "$ac_link") 2>&5
5114 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5117 { (case "(($ac_try" in
5118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5119 *) ac_try_echo=$ac_try;;
5120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 (eval "$ac_try") 2>&5
5123 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005125 (exit $ac_status); }; }; then
5126 ac_cv_kpthread=yes
5127else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005128 echo "$as_me: program exited with status $ac_status" >&5
5129echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005130sed 's/^/| /' conftest.$ac_ext >&5
5131
5132( exit $ac_status )
5133ac_cv_kpthread=no
5134fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5136fi
5137
5138
5139CC="$ac_save_cc"
5140fi
5141
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005142{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5143echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144fi
5145
5146if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5147then
5148# -Kthread, if available, provides the right #defines
5149# and linker options to make pthread_create available
5150# Some compilers won't report that they do not support -Kthread,
5151# so we need to run a program to see whether it really made the
5152# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005153{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5154echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005157else
5158 ac_save_cc="$CC"
5159CC="$CC -Kthread"
5160if test "$cross_compiling" = yes; then
5161 ac_cv_kthread=no
5162else
5163 cat >conftest.$ac_ext <<_ACEOF
5164/* confdefs.h. */
5165_ACEOF
5166cat confdefs.h >>conftest.$ac_ext
5167cat >>conftest.$ac_ext <<_ACEOF
5168/* end confdefs.h. */
5169
5170#include <pthread.h>
5171
5172void* routine(void* p){return NULL;}
5173
5174int main(){
5175 pthread_t p;
5176 if(pthread_create(&p,NULL,routine,NULL)!=0)
5177 return 1;
5178 (void)pthread_detach(p);
5179 return 0;
5180}
5181
5182_ACEOF
5183rm -f conftest$ac_exeext
5184if { (ac_try="$ac_link"
5185case "(($ac_try" in
5186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5187 *) ac_try_echo=$ac_try;;
5188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005190 (eval "$ac_link") 2>&5
5191 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5194 { (case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 (eval "$ac_try") 2>&5
5200 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202 (exit $ac_status); }; }; then
5203 ac_cv_kthread=yes
5204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205 echo "$as_me: program exited with status $ac_status" >&5
5206echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005207sed 's/^/| /' conftest.$ac_ext >&5
5208
5209( exit $ac_status )
5210ac_cv_kthread=no
5211fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5213fi
5214
5215
5216CC="$ac_save_cc"
5217fi
5218
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005219{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5220echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005221fi
5222
5223if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5224then
5225# -pthread, if available, provides the right #defines
5226# and linker options to make pthread_create available
5227# Some compilers won't report that they do not support -pthread,
5228# so we need to run a program to see whether it really made the
5229# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005230{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5231echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005233 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005234else
5235 ac_save_cc="$CC"
5236CC="$CC -pthread"
5237if test "$cross_compiling" = yes; then
5238 ac_cv_pthread=no
5239else
5240 cat >conftest.$ac_ext <<_ACEOF
5241/* confdefs.h. */
5242_ACEOF
5243cat confdefs.h >>conftest.$ac_ext
5244cat >>conftest.$ac_ext <<_ACEOF
5245/* end confdefs.h. */
5246
5247#include <pthread.h>
5248
5249void* routine(void* p){return NULL;}
5250
5251int main(){
5252 pthread_t p;
5253 if(pthread_create(&p,NULL,routine,NULL)!=0)
5254 return 1;
5255 (void)pthread_detach(p);
5256 return 0;
5257}
5258
5259_ACEOF
5260rm -f conftest$ac_exeext
5261if { (ac_try="$ac_link"
5262case "(($ac_try" in
5263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5264 *) ac_try_echo=$ac_try;;
5265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267 (eval "$ac_link") 2>&5
5268 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5271 { (case "(($ac_try" in
5272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5273 *) ac_try_echo=$ac_try;;
5274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276 (eval "$ac_try") 2>&5
5277 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005279 (exit $ac_status); }; }; then
5280 ac_cv_pthread=yes
5281else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005282 echo "$as_me: program exited with status $ac_status" >&5
5283echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284sed 's/^/| /' conftest.$ac_ext >&5
5285
5286( exit $ac_status )
5287ac_cv_pthread=no
5288fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5290fi
5291
5292
5293CC="$ac_save_cc"
5294fi
5295
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005296{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5297echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298fi
5299
5300# If we have set a CC compiler flag for thread support then
5301# check if it works for CXX, too.
5302ac_cv_cxx_thread=no
5303if test ! -z "$CXX"
5304then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005305{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5306echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307ac_save_cxx="$CXX"
5308
5309if test "$ac_cv_kpthread" = "yes"
5310then
5311 CXX="$CXX -Kpthread"
5312 ac_cv_cxx_thread=yes
5313elif test "$ac_cv_kthread" = "yes"
5314then
5315 CXX="$CXX -Kthread"
5316 ac_cv_cxx_thread=yes
5317elif test "$ac_cv_pthread" = "yes"
5318then
5319 CXX="$CXX -pthread"
5320 ac_cv_cxx_thread=yes
5321fi
5322
5323if test $ac_cv_cxx_thread = yes
5324then
5325 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5326 $CXX -c conftest.$ac_ext 2>&5
5327 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5328 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5329 then
5330 ac_cv_cxx_thread=yes
5331 else
5332 ac_cv_cxx_thread=no
5333 fi
5334 rm -fr conftest*
5335fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005336{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5337echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338fi
5339CXX="$ac_save_cxx"
5340
5341
5342# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005343{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5344echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005346 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005347else
5348 cat >conftest.$ac_ext <<_ACEOF
5349/* confdefs.h. */
5350_ACEOF
5351cat confdefs.h >>conftest.$ac_ext
5352cat >>conftest.$ac_ext <<_ACEOF
5353/* end confdefs.h. */
5354#include <stdlib.h>
5355#include <stdarg.h>
5356#include <string.h>
5357#include <float.h>
5358
5359int
5360main ()
5361{
5362
5363 ;
5364 return 0;
5365}
5366_ACEOF
5367rm -f conftest.$ac_objext
5368if { (ac_try="$ac_compile"
5369case "(($ac_try" in
5370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5371 *) ac_try_echo=$ac_try;;
5372esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374 (eval "$ac_compile") 2>conftest.er1
5375 ac_status=$?
5376 grep -v '^ *+' conftest.er1 >conftest.err
5377 rm -f conftest.er1
5378 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380 (exit $ac_status); } && {
5381 test -z "$ac_c_werror_flag" ||
5382 test ! -s conftest.err
5383 } && test -s conftest.$ac_objext; then
5384 ac_cv_header_stdc=yes
5385else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005386 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387sed 's/^/| /' conftest.$ac_ext >&5
5388
5389 ac_cv_header_stdc=no
5390fi
5391
5392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5393
5394if test $ac_cv_header_stdc = yes; then
5395 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5396 cat >conftest.$ac_ext <<_ACEOF
5397/* confdefs.h. */
5398_ACEOF
5399cat confdefs.h >>conftest.$ac_ext
5400cat >>conftest.$ac_ext <<_ACEOF
5401/* end confdefs.h. */
5402#include <string.h>
5403
5404_ACEOF
5405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5406 $EGREP "memchr" >/dev/null 2>&1; then
5407 :
5408else
5409 ac_cv_header_stdc=no
5410fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005411rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412
5413fi
5414
5415if test $ac_cv_header_stdc = yes; then
5416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5417 cat >conftest.$ac_ext <<_ACEOF
5418/* confdefs.h. */
5419_ACEOF
5420cat confdefs.h >>conftest.$ac_ext
5421cat >>conftest.$ac_ext <<_ACEOF
5422/* end confdefs.h. */
5423#include <stdlib.h>
5424
5425_ACEOF
5426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5427 $EGREP "free" >/dev/null 2>&1; then
5428 :
5429else
5430 ac_cv_header_stdc=no
5431fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00005432rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433
5434fi
5435
5436if test $ac_cv_header_stdc = yes; then
5437 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5438 if test "$cross_compiling" = yes; then
5439 :
5440else
5441 cat >conftest.$ac_ext <<_ACEOF
5442/* confdefs.h. */
5443_ACEOF
5444cat confdefs.h >>conftest.$ac_ext
5445cat >>conftest.$ac_ext <<_ACEOF
5446/* end confdefs.h. */
5447#include <ctype.h>
5448#include <stdlib.h>
5449#if ((' ' & 0x0FF) == 0x020)
5450# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5451# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5452#else
5453# define ISLOWER(c) \
5454 (('a' <= (c) && (c) <= 'i') \
5455 || ('j' <= (c) && (c) <= 'r') \
5456 || ('s' <= (c) && (c) <= 'z'))
5457# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5458#endif
5459
5460#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5461int
5462main ()
5463{
5464 int i;
5465 for (i = 0; i < 256; i++)
5466 if (XOR (islower (i), ISLOWER (i))
5467 || toupper (i) != TOUPPER (i))
5468 return 2;
5469 return 0;
5470}
5471_ACEOF
5472rm -f conftest$ac_exeext
5473if { (ac_try="$ac_link"
5474case "(($ac_try" in
5475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5476 *) ac_try_echo=$ac_try;;
5477esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479 (eval "$ac_link") 2>&5
5480 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5483 { (case "(($ac_try" in
5484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5485 *) ac_try_echo=$ac_try;;
5486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005488 (eval "$ac_try") 2>&5
5489 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491 (exit $ac_status); }; }; then
5492 :
5493else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005494 echo "$as_me: program exited with status $ac_status" >&5
5495echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496sed 's/^/| /' conftest.$ac_ext >&5
5497
5498( exit $ac_status )
5499ac_cv_header_stdc=no
5500fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5502fi
5503
5504
5505fi
5506fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005507{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5508echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509if test $ac_cv_header_stdc = yes; then
5510
5511cat >>confdefs.h <<\_ACEOF
5512#define STDC_HEADERS 1
5513_ACEOF
5514
5515fi
5516
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005517# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5528 inttypes.h stdint.h unistd.h
5529do
5530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5531{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5533if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5534 echo $ECHO_N "(cached) $ECHO_C" >&6
5535else
5536 cat >conftest.$ac_ext <<_ACEOF
5537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
5542$ac_includes_default
5543
5544#include <$ac_header>
5545_ACEOF
5546rm -f conftest.$ac_objext
5547if { (ac_try="$ac_compile"
5548case "(($ac_try" in
5549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5550 *) ac_try_echo=$ac_try;;
5551esac
5552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5553 (eval "$ac_compile") 2>conftest.er1
5554 ac_status=$?
5555 grep -v '^ *+' conftest.er1 >conftest.err
5556 rm -f conftest.er1
5557 cat conftest.err >&5
5558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } && {
5560 test -z "$ac_c_werror_flag" ||
5561 test ! -s conftest.err
5562 } && test -s conftest.$ac_objext; then
5563 eval "$as_ac_Header=yes"
5564else
5565 echo "$as_me: failed program was:" >&5
5566sed 's/^/| /' conftest.$ac_ext >&5
5567
5568 eval "$as_ac_Header=no"
5569fi
5570
5571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5572fi
5573ac_res=`eval echo '${'$as_ac_Header'}'`
5574 { echo "$as_me:$LINENO: result: $ac_res" >&5
5575echo "${ECHO_T}$ac_res" >&6; }
5576if test `eval echo '${'$as_ac_Header'}'` = yes; then
5577 cat >>confdefs.h <<_ACEOF
5578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5579_ACEOF
5580
5581fi
5582
5583done
5584
5585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586
Martin v. Löwis11437992002-04-12 09:54:03 +00005587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
Anthony Baxter8a560de2004-10-13 15:30:56 +00005622
Martin v. Löwisc3001752005-01-23 09:27:24 +00005623
Martin v. Löwis11017b12006-01-14 18:12:57 +00005624
Thomas Wouters477c8d52006-05-27 19:21:47 +00005625
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005626
5627
5628
5629
5630
5631
5632
5633
Thomas Wouters89f507f2006-12-13 04:49:30 +00005634
Christian Heimes043d6f62008-01-07 17:19:16 +00005635
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005636
5637
Christian Heimesbbe741d2008-03-28 10:53:29 +00005638
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005639
Ronald Oussoren755740f2010-02-07 19:56:39 +00005640
5641
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005642for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5643fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005644ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005645shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005646unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005647sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5648sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005649sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005650sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005651sys/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 +00005652sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00005653bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005655as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005656if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005657 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5658echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005659if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005660 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005661fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005662ac_res=`eval echo '${'$as_ac_Header'}'`
5663 { echo "$as_me:$LINENO: result: $ac_res" >&5
5664echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005665else
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005667{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5668echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005670/* confdefs.h. */
5671_ACEOF
5672cat confdefs.h >>conftest.$ac_ext
5673cat >>conftest.$ac_ext <<_ACEOF
5674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005675$ac_includes_default
5676#include <$ac_header>
5677_ACEOF
5678rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005679if { (ac_try="$ac_compile"
5680case "(($ac_try" in
5681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5682 *) ac_try_echo=$ac_try;;
5683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005687 grep -v '^ *+' conftest.er1 >conftest.err
5688 rm -f conftest.er1
5689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005691 (exit $ac_status); } && {
5692 test -z "$ac_c_werror_flag" ||
5693 test ! -s conftest.err
5694 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005695 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005698sed 's/^/| /' conftest.$ac_ext >&5
5699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005700 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005702
5703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005704{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5705echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005706
5707# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005708{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5709echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005716#include <$ac_header>
5717_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005718if { (ac_try="$ac_cpp conftest.$ac_ext"
5719case "(($ac_try" in
5720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5721 *) ac_try_echo=$ac_try;;
5722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005724 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005726 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005727 rm -f conftest.er1
5728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005730 (exit $ac_status); } >/dev/null && {
5731 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5732 test ! -s conftest.err
5733 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005734 ac_header_preproc=yes
5735else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005737sed 's/^/| /' conftest.$ac_ext >&5
5738
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005741
Martin v. Löwis11437992002-04-12 09:54:03 +00005742rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005743{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5744echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005745
5746# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5748 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005749 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5750echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5751 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5752echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005753 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005754 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005755 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005756 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5757echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5758 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5759echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5760 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5761echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5762 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5763echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5764 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5765echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5766 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5767echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005768 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005769## -------------------------------------- ##
5770## Report this to http://bugs.python.org/ ##
5771## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005772_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005773 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005774 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005775esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005776{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005779 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005780else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005782fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005783ac_res=`eval echo '${'$as_ac_Header'}'`
5784 { echo "$as_me:$LINENO: result: $ac_res" >&5
5785echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005786
5787fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005788if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005790#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005791_ACEOF
5792
5793fi
5794
Guido van Rossum627b2d71993-12-24 10:39:16 +00005795done
5796
Martin v. Löwis11437992002-04-12 09:54:03 +00005797
5798
5799
5800
5801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005803for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005804 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5805{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5806echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005807if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005809else
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005811/* confdefs.h. */
5812_ACEOF
5813cat confdefs.h >>conftest.$ac_ext
5814cat >>conftest.$ac_ext <<_ACEOF
5815/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816#include <sys/types.h>
5817#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005818
Martin v. Löwis11437992002-04-12 09:54:03 +00005819int
5820main ()
5821{
5822if ((DIR *) 0)
5823return 0;
5824 ;
5825 return 0;
5826}
5827_ACEOF
5828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005829if { (ac_try="$ac_compile"
5830case "(($ac_try" in
5831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5832 *) ac_try_echo=$ac_try;;
5833esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005837 grep -v '^ *+' conftest.er1 >conftest.err
5838 rm -f conftest.er1
5839 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005841 (exit $ac_status); } && {
5842 test -z "$ac_c_werror_flag" ||
5843 test ! -s conftest.err
5844 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005845 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005846else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005847 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005848sed 's/^/| /' conftest.$ac_ext >&5
5849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005850 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005852
5853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005854fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005855ac_res=`eval echo '${'$as_ac_Header'}'`
5856 { echo "$as_me:$LINENO: result: $ac_res" >&5
5857echo "${ECHO_T}$ac_res" >&6; }
5858if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005859 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005860#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005861_ACEOF
5862
5863ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005864fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866done
5867# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5868if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005869 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5870echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005871if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873else
Martin v. Löwis11437992002-04-12 09:54:03 +00005874 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005876/* confdefs.h. */
5877_ACEOF
5878cat confdefs.h >>conftest.$ac_ext
5879cat >>conftest.$ac_ext <<_ACEOF
5880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005882/* Override any GCC internal prototype to avoid an error.
5883 Use char because int might match the return type of a GCC
5884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005885#ifdef __cplusplus
5886extern "C"
5887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005888char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005889int
5890main ()
5891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005892return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005893 ;
5894 return 0;
5895}
5896_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897for ac_lib in '' dir; do
5898 if test -z "$ac_lib"; then
5899 ac_res="none required"
5900 else
5901 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005902 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005903 fi
5904 rm -f conftest.$ac_objext conftest$ac_exeext
5905if { (ac_try="$ac_link"
5906case "(($ac_try" in
5907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5908 *) ac_try_echo=$ac_try;;
5909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005911 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005912 ac_status=$?
5913 grep -v '^ *+' conftest.er1 >conftest.err
5914 rm -f conftest.er1
5915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005917 (exit $ac_status); } && {
5918 test -z "$ac_c_werror_flag" ||
5919 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005920 } && test -s conftest$ac_exeext &&
5921 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005924 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005925sed 's/^/| /' conftest.$ac_ext >&5
5926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927
Thomas Wouters477c8d52006-05-27 19:21:47 +00005928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005929
5930rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5931 conftest$ac_exeext
5932 if test "${ac_cv_search_opendir+set}" = set; then
5933 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005935done
5936if test "${ac_cv_search_opendir+set}" = set; then
5937 :
5938else
5939 ac_cv_search_opendir=no
5940fi
5941rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005942LIBS=$ac_func_search_save_LIBS
5943fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005944{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5945echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946ac_res=$ac_cv_search_opendir
5947if test "$ac_res" != no; then
5948 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005949
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005951
Michael W. Hudson54241132001-12-07 15:38:26 +00005952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005953 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5954echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005955if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005956 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005957else
5958 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005960/* confdefs.h. */
5961_ACEOF
5962cat confdefs.h >>conftest.$ac_ext
5963cat >>conftest.$ac_ext <<_ACEOF
5964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005966/* Override any GCC internal prototype to avoid an error.
5967 Use char because int might match the return type of a GCC
5968 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005969#ifdef __cplusplus
5970extern "C"
5971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005972char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005973int
5974main ()
5975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005976return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005977 ;
5978 return 0;
5979}
5980_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005981for ac_lib in '' x; do
5982 if test -z "$ac_lib"; then
5983 ac_res="none required"
5984 else
5985 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005987 fi
5988 rm -f conftest.$ac_objext conftest$ac_exeext
5989if { (ac_try="$ac_link"
5990case "(($ac_try" in
5991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5992 *) ac_try_echo=$ac_try;;
5993esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005995 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005996 ac_status=$?
5997 grep -v '^ *+' conftest.er1 >conftest.err
5998 rm -f conftest.er1
5999 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006001 (exit $ac_status); } && {
6002 test -z "$ac_c_werror_flag" ||
6003 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006004 } && test -s conftest$ac_exeext &&
6005 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006006 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006008 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006009sed 's/^/| /' conftest.$ac_ext >&5
6010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011
Thomas Wouters477c8d52006-05-27 19:21:47 +00006012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006013
6014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6015 conftest$ac_exeext
6016 if test "${ac_cv_search_opendir+set}" = set; then
6017 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006019done
6020if test "${ac_cv_search_opendir+set}" = set; then
6021 :
6022else
6023 ac_cv_search_opendir=no
6024fi
6025rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006026LIBS=$ac_func_search_save_LIBS
6027fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006028{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6029echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006030ac_res=$ac_cv_search_opendir
6031if test "$ac_res" != no; then
6032 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034fi
6035
6036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006037
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006038{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6039echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042else
6043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006044/* confdefs.h. */
6045_ACEOF
6046cat confdefs.h >>conftest.$ac_ext
6047cat >>conftest.$ac_ext <<_ACEOF
6048/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006049#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050int
6051main ()
6052{
6053return makedev(0, 0);
6054 ;
6055 return 0;
6056}
6057_ACEOF
6058rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059if { (ac_try="$ac_link"
6060case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6063esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006067 grep -v '^ *+' conftest.er1 >conftest.err
6068 rm -f conftest.er1
6069 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006071 (exit $ac_status); } && {
6072 test -z "$ac_c_werror_flag" ||
6073 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006074 } && test -s conftest$ac_exeext &&
6075 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 ac_cv_header_sys_types_h_makedev=yes
6077else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006079sed 's/^/| /' conftest.$ac_ext >&5
6080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083
6084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086
6087fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006088{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6089echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006090
6091if test $ac_cv_header_sys_types_h_makedev = no; then
6092if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006093 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6094echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006096 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006098{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6099echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100else
6101 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006102{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6103echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006105/* confdefs.h. */
6106_ACEOF
6107cat confdefs.h >>conftest.$ac_ext
6108cat >>conftest.$ac_ext <<_ACEOF
6109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110$ac_includes_default
6111#include <sys/mkdev.h>
6112_ACEOF
6113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114if { (ac_try="$ac_compile"
6115case "(($ac_try" in
6116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6117 *) ac_try_echo=$ac_try;;
6118esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006122 grep -v '^ *+' conftest.er1 >conftest.err
6123 rm -f conftest.er1
6124 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126 (exit $ac_status); } && {
6127 test -z "$ac_c_werror_flag" ||
6128 test ! -s conftest.err
6129 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130 ac_header_compiler=yes
6131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006133sed 's/^/| /' conftest.$ac_ext >&5
6134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137
6138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006139{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6140echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141
6142# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006143{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6144echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151#include <sys/mkdev.h>
6152_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006153if { (ac_try="$ac_cpp conftest.$ac_ext"
6154case "(($ac_try" in
6155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6156 *) ac_try_echo=$ac_try;;
6157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006159 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006160 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006161 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006162 rm -f conftest.er1
6163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006165 (exit $ac_status); } >/dev/null && {
6166 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6167 test ! -s conftest.err
6168 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169 ac_header_preproc=yes
6170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006172sed 's/^/| /' conftest.$ac_ext >&5
6173
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174 ac_header_preproc=no
6175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006176
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006178{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6179echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180
6181# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006182case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6183 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006188 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006189 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6192echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6194echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6196echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6198echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6200echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6202echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006204## -------------------------------------- ##
6205## Report this to http://bugs.python.org/ ##
6206## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006207_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006209 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006211{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6212echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006214 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215else
6216 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6217fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006218{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6219echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006220
6221fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006222if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224cat >>confdefs.h <<\_ACEOF
6225#define MAJOR_IN_MKDEV 1
6226_ACEOF
6227
6228fi
6229
6230
6231
6232 if test $ac_cv_header_sys_mkdev_h = no; then
6233 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006234 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6235echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006237 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006239{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6240echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241else
6242 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006243{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6244echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006246/* confdefs.h. */
6247_ACEOF
6248cat confdefs.h >>conftest.$ac_ext
6249cat >>conftest.$ac_ext <<_ACEOF
6250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251$ac_includes_default
6252#include <sys/sysmacros.h>
6253_ACEOF
6254rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255if { (ac_try="$ac_compile"
6256case "(($ac_try" in
6257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6258 *) ac_try_echo=$ac_try;;
6259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006263 grep -v '^ *+' conftest.er1 >conftest.err
6264 rm -f conftest.er1
6265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267 (exit $ac_status); } && {
6268 test -z "$ac_c_werror_flag" ||
6269 test ! -s conftest.err
6270 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 ac_header_compiler=yes
6272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006274sed 's/^/| /' conftest.$ac_ext >&5
6275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006278
6279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006280{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6281echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282
6283# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006284{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6285echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* confdefs.h. */
6288_ACEOF
6289cat confdefs.h >>conftest.$ac_ext
6290cat >>conftest.$ac_ext <<_ACEOF
6291/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292#include <sys/sysmacros.h>
6293_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006294if { (ac_try="$ac_cpp conftest.$ac_ext"
6295case "(($ac_try" in
6296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6297 *) ac_try_echo=$ac_try;;
6298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006300 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006301 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006302 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006303 rm -f conftest.er1
6304 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006306 (exit $ac_status); } >/dev/null && {
6307 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6308 test ! -s conftest.err
6309 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310 ac_header_preproc=yes
6311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006313sed 's/^/| /' conftest.$ac_ext >&5
6314
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006315 ac_header_preproc=no
6316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006318rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006319{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6320echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321
6322# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006323case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6324 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006330 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6333echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6335echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6337echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6338 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6339echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6340 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6341echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6342 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6343echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006344 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006345## -------------------------------------- ##
6346## Report this to http://bugs.python.org/ ##
6347## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006348_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006350 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006352{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6353echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006354if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006355 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356else
6357 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006359{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6360echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006361
6362fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006363if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006364
6365cat >>confdefs.h <<\_ACEOF
6366#define MAJOR_IN_SYSMACROS 1
6367_ACEOF
6368
6369fi
6370
6371
6372 fi
6373fi
6374
Michael W. Hudson54241132001-12-07 15:38:26 +00006375
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006376# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006377
6378for ac_header in term.h
6379do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6381{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006385else
6386 cat >conftest.$ac_ext <<_ACEOF
6387/* confdefs.h. */
6388_ACEOF
6389cat confdefs.h >>conftest.$ac_ext
6390cat >>conftest.$ac_ext <<_ACEOF
6391/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006392
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006393#ifdef HAVE_CURSES_H
6394#include <curses.h>
6395#endif
6396
6397
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006398#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006399_ACEOF
6400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401if { (ac_try="$ac_compile"
6402case "(($ac_try" in
6403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6404 *) ac_try_echo=$ac_try;;
6405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006408 ac_status=$?
6409 grep -v '^ *+' conftest.er1 >conftest.err
6410 rm -f conftest.er1
6411 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006413 (exit $ac_status); } && {
6414 test -z "$ac_c_werror_flag" ||
6415 test ! -s conftest.err
6416 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006417 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006419 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420sed 's/^/| /' conftest.$ac_ext >&5
6421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424
6425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006426fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006427ac_res=`eval echo '${'$as_ac_Header'}'`
6428 { echo "$as_me:$LINENO: result: $ac_res" >&5
6429echo "${ECHO_T}$ac_res" >&6; }
6430if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006431 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006432#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006433_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006434
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006435fi
6436
6437done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438
6439
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440# On Linux, netlink.h requires asm/types.h
6441
6442for ac_header in linux/netlink.h
6443do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006444as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6445{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6446echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006447if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006448 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006449else
6450 cat >conftest.$ac_ext <<_ACEOF
6451/* confdefs.h. */
6452_ACEOF
6453cat confdefs.h >>conftest.$ac_ext
6454cat >>conftest.$ac_ext <<_ACEOF
6455/* end confdefs.h. */
6456
6457#ifdef HAVE_ASM_TYPES_H
6458#include <asm/types.h>
6459#endif
6460#ifdef HAVE_SYS_SOCKET_H
6461#include <sys/socket.h>
6462#endif
6463
6464
6465#include <$ac_header>
6466_ACEOF
6467rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006468if { (ac_try="$ac_compile"
6469case "(($ac_try" in
6470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6471 *) ac_try_echo=$ac_try;;
6472esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006474 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006475 ac_status=$?
6476 grep -v '^ *+' conftest.er1 >conftest.err
6477 rm -f conftest.er1
6478 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006480 (exit $ac_status); } && {
6481 test -z "$ac_c_werror_flag" ||
6482 test ! -s conftest.err
6483 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006484 eval "$as_ac_Header=yes"
6485else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006486 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487sed 's/^/| /' conftest.$ac_ext >&5
6488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006491
6492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006493fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006494ac_res=`eval echo '${'$as_ac_Header'}'`
6495 { echo "$as_me:$LINENO: result: $ac_res" >&5
6496echo "${ECHO_T}$ac_res" >&6; }
6497if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006498 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006500_ACEOF
6501
6502fi
6503
6504done
6505
6506
Guido van Rossum627b2d71993-12-24 10:39:16 +00006507# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006508was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006509{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6510echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006517#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006518
6519_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006521 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006522 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523else
Martin v. Löwis11437992002-04-12 09:54:03 +00006524
6525
6526cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006528_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006530
Guido van Rossum627b2d71993-12-24 10:39:16 +00006531fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00006532rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006533
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006534{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6535echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006536
Neal Norwitz11690112002-07-30 01:08:28 +00006537# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006538{ echo "$as_me:$LINENO: checking for makedev" >&5
6539echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006541/* confdefs.h. */
6542_ACEOF
6543cat confdefs.h >>conftest.$ac_ext
6544cat >>conftest.$ac_ext <<_ACEOF
6545/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006546#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006547int
6548main ()
6549{
6550 makedev(0, 0)
6551 ;
6552 return 0;
6553}
6554_ACEOF
6555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556if { (ac_try="$ac_link"
6557case "(($ac_try" in
6558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6559 *) ac_try_echo=$ac_try;;
6560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006564 grep -v '^ *+' conftest.er1 >conftest.err
6565 rm -f conftest.er1
6566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568 (exit $ac_status); } && {
6569 test -z "$ac_c_werror_flag" ||
6570 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006571 } && test -s conftest$ac_exeext &&
6572 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006573 ac_cv_has_makedev=yes
6574else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006576sed 's/^/| /' conftest.$ac_ext >&5
6577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006580
6581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006582 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006583if test "$ac_cv_has_makedev" = "no"; then
6584 # we didn't link, try if _OSF_SOURCE will allow us to link
6585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006586/* confdefs.h. */
6587_ACEOF
6588cat confdefs.h >>conftest.$ac_ext
6589cat >>conftest.$ac_ext <<_ACEOF
6590/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006591
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006592#define _OSF_SOURCE 1
6593#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006594
Neal Norwitz11690112002-07-30 01:08:28 +00006595int
6596main ()
6597{
6598 makedev(0, 0)
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604if { (ac_try="$ac_link"
6605case "(($ac_try" in
6606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607 *) ac_try_echo=$ac_try;;
6608esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006612 grep -v '^ *+' conftest.er1 >conftest.err
6613 rm -f conftest.er1
6614 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 (exit $ac_status); } && {
6617 test -z "$ac_c_werror_flag" ||
6618 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006619 } && test -s conftest$ac_exeext &&
6620 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006621 ac_cv_has_makedev=yes
6622else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006624sed 's/^/| /' conftest.$ac_ext >&5
6625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628
6629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006631 if test "$ac_cv_has_makedev" = "yes"; then
6632
6633cat >>confdefs.h <<\_ACEOF
6634#define _OSF_SOURCE 1
6635_ACEOF
6636
6637 fi
6638fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006639{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6640echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006641if test "$ac_cv_has_makedev" = "yes"; then
6642
6643cat >>confdefs.h <<\_ACEOF
6644#define HAVE_MAKEDEV 1
6645_ACEOF
6646
6647fi
6648
Martin v. Löwis399a6892002-10-04 10:22:02 +00006649# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6650# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6651# defined, but the compiler does not support pragma redefine_extname,
6652# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6653# structures (such as rlimit64) without declaring them. As a
6654# work-around, disable LFS on such configurations
6655
6656use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006657{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6658echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006660/* confdefs.h. */
6661_ACEOF
6662cat confdefs.h >>conftest.$ac_ext
6663cat >>conftest.$ac_ext <<_ACEOF
6664/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006665
6666#define _LARGEFILE_SOURCE 1
6667#define _FILE_OFFSET_BITS 64
6668#include <sys/resource.h>
6669
Martin v. Löwis399a6892002-10-04 10:22:02 +00006670int
6671main ()
6672{
6673struct rlimit foo;
6674 ;
6675 return 0;
6676}
6677_ACEOF
6678rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006679if { (ac_try="$ac_compile"
6680case "(($ac_try" in
6681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6682 *) ac_try_echo=$ac_try;;
6683esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006685 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006686 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006687 grep -v '^ *+' conftest.er1 >conftest.err
6688 rm -f conftest.er1
6689 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006691 (exit $ac_status); } && {
6692 test -z "$ac_c_werror_flag" ||
6693 test ! -s conftest.err
6694 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006695 sol_lfs_bug=no
6696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006698sed 's/^/| /' conftest.$ac_ext >&5
6699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702
6703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006704{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6705echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006706if test "$sol_lfs_bug" = "yes"; then
6707 use_lfs=no
6708fi
6709
6710if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006711# Two defines needed to enable largefile support on various platforms
6712# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006713
Martin v. Löwis11437992002-04-12 09:54:03 +00006714cat >>confdefs.h <<\_ACEOF
6715#define _LARGEFILE_SOURCE 1
6716_ACEOF
6717
6718
6719cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006720#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006721_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006722
Martin v. Löwis399a6892002-10-04 10:22:02 +00006723fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006724
Guido van Rossum84e7b241996-08-19 21:59:00 +00006725# Add some code to confdefs.h so that the test for off_t works on SCO
6726cat >> confdefs.h <<\EOF
6727#if defined(SCO_DS)
6728#undef _OFF_T
6729#endif
6730EOF
6731
Guido van Rossumef2255b2000-03-10 22:30:29 +00006732# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006733{ echo "$as_me:$LINENO: checking for mode_t" >&5
6734echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006735if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006736 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006737else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006738 cat >conftest.$ac_ext <<_ACEOF
6739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
6744$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006745typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006746int
6747main ()
6748{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006749if ((ac__type_new_ *) 0)
6750 return 0;
6751if (sizeof (ac__type_new_))
6752 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006753 ;
6754 return 0;
6755}
6756_ACEOF
6757rm -f conftest.$ac_objext
6758if { (ac_try="$ac_compile"
6759case "(($ac_try" in
6760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6761 *) ac_try_echo=$ac_try;;
6762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006764 (eval "$ac_compile") 2>conftest.er1
6765 ac_status=$?
6766 grep -v '^ *+' conftest.er1 >conftest.err
6767 rm -f conftest.er1
6768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006770 (exit $ac_status); } && {
6771 test -z "$ac_c_werror_flag" ||
6772 test ! -s conftest.err
6773 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006777sed 's/^/| /' conftest.$ac_ext >&5
6778
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006779 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781
6782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006783fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006784{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6785echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6786if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006787 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789
6790cat >>confdefs.h <<_ACEOF
6791#define mode_t int
6792_ACEOF
6793
6794fi
6795
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006796{ echo "$as_me:$LINENO: checking for off_t" >&5
6797echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006798if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006799 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006800else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006801 cat >conftest.$ac_ext <<_ACEOF
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
6807$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006808typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006809int
6810main ()
6811{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006812if ((ac__type_new_ *) 0)
6813 return 0;
6814if (sizeof (ac__type_new_))
6815 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006816 ;
6817 return 0;
6818}
6819_ACEOF
6820rm -f conftest.$ac_objext
6821if { (ac_try="$ac_compile"
6822case "(($ac_try" in
6823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6824 *) ac_try_echo=$ac_try;;
6825esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006827 (eval "$ac_compile") 2>conftest.er1
6828 ac_status=$?
6829 grep -v '^ *+' conftest.er1 >conftest.err
6830 rm -f conftest.er1
6831 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006833 (exit $ac_status); } && {
6834 test -z "$ac_c_werror_flag" ||
6835 test ! -s conftest.err
6836 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006838else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006840sed 's/^/| /' conftest.$ac_ext >&5
6841
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006842 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006844
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006846fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6848echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6849if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Martin v. Löwis11437992002-04-12 09:54:03 +00006852
6853cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006855_ACEOF
6856
6857fi
6858
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006859{ echo "$as_me:$LINENO: checking for pid_t" >&5
6860echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006861if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006864 cat >conftest.$ac_ext <<_ACEOF
6865/* confdefs.h. */
6866_ACEOF
6867cat confdefs.h >>conftest.$ac_ext
6868cat >>conftest.$ac_ext <<_ACEOF
6869/* end confdefs.h. */
6870$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006871typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006872int
6873main ()
6874{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006875if ((ac__type_new_ *) 0)
6876 return 0;
6877if (sizeof (ac__type_new_))
6878 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
6884if { (ac_try="$ac_compile"
6885case "(($ac_try" in
6886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6887 *) ac_try_echo=$ac_try;;
6888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006890 (eval "$ac_compile") 2>conftest.er1
6891 ac_status=$?
6892 grep -v '^ *+' conftest.er1 >conftest.err
6893 rm -f conftest.er1
6894 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006896 (exit $ac_status); } && {
6897 test -z "$ac_c_werror_flag" ||
6898 test ! -s conftest.err
6899 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006900 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006901else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006903sed 's/^/| /' conftest.$ac_ext >&5
6904
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006905 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907
6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006909fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006910{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6911echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6912if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006914else
Martin v. Löwis11437992002-04-12 09:54:03 +00006915
6916cat >>confdefs.h <<_ACEOF
6917#define pid_t int
6918_ACEOF
6919
6920fi
6921
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006922{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6923echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006924if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006925 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
6927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933#include <sys/types.h>
6934#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006935
Martin v. Löwis11437992002-04-12 09:54:03 +00006936int
6937main ()
6938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006939return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006940 ;
6941 return 0;
6942}
6943_ACEOF
6944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945if { (ac_try="$ac_compile"
6946case "(($ac_try" in
6947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6948 *) ac_try_echo=$ac_try;;
6949esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006953 grep -v '^ *+' conftest.er1 >conftest.err
6954 rm -f conftest.er1
6955 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957 (exit $ac_status); } && {
6958 test -z "$ac_c_werror_flag" ||
6959 test ! -s conftest.err
6960 } && test -s conftest.$ac_objext; then
6961 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006962else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006964sed 's/^/| /' conftest.$ac_ext >&5
6965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006966 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006971{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6972echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006973
Martin v. Löwis11437992002-04-12 09:54:03 +00006974cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006975#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006976_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006977
Michael W. Hudson54241132001-12-07 15:38:26 +00006978
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006979{ echo "$as_me:$LINENO: checking for size_t" >&5
6980echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006981if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006982 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006984 cat >conftest.$ac_ext <<_ACEOF
6985/* confdefs.h. */
6986_ACEOF
6987cat confdefs.h >>conftest.$ac_ext
6988cat >>conftest.$ac_ext <<_ACEOF
6989/* end confdefs.h. */
6990$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006991typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006992int
6993main ()
6994{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006995if ((ac__type_new_ *) 0)
6996 return 0;
6997if (sizeof (ac__type_new_))
6998 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006999 ;
7000 return 0;
7001}
7002_ACEOF
7003rm -f conftest.$ac_objext
7004if { (ac_try="$ac_compile"
7005case "(($ac_try" in
7006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7007 *) ac_try_echo=$ac_try;;
7008esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007010 (eval "$ac_compile") 2>conftest.er1
7011 ac_status=$?
7012 grep -v '^ *+' conftest.er1 >conftest.err
7013 rm -f conftest.er1
7014 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007016 (exit $ac_status); } && {
7017 test -z "$ac_c_werror_flag" ||
7018 test ! -s conftest.err
7019 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007020 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007021else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007023sed 's/^/| /' conftest.$ac_ext >&5
7024
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007025 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027
7028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007029fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007030{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7031echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7032if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007033 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034else
Martin v. Löwis11437992002-04-12 09:54:03 +00007035
7036cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007038_ACEOF
7039
7040fi
7041
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007042{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7043echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007044if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007045 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007046else
7047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007048/* confdefs.h. */
7049_ACEOF
7050cat confdefs.h >>conftest.$ac_ext
7051cat >>conftest.$ac_ext <<_ACEOF
7052/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007054
7055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007057 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058 ac_cv_type_uid_t=yes
7059else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007060 ac_cv_type_uid_t=no
7061fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00007062rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007065{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7066echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007067if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >>confdefs.h <<\_ACEOF
7070#define uid_t int
7071_ACEOF
7072
7073
7074cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007076_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077
7078fi
7079
Mark Dickinsonbd792642009-03-18 20:06:12 +00007080
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007081 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7082echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007083if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007084 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007085else
7086 ac_cv_c_uint32_t=no
7087 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7088 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7089 cat >conftest.$ac_ext <<_ACEOF
7090/* confdefs.h. */
7091_ACEOF
7092cat confdefs.h >>conftest.$ac_ext
7093cat >>conftest.$ac_ext <<_ACEOF
7094/* end confdefs.h. */
7095$ac_includes_default
7096int
7097main ()
7098{
7099static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7100test_array [0] = 0
7101
7102 ;
7103 return 0;
7104}
7105_ACEOF
7106rm -f conftest.$ac_objext
7107if { (ac_try="$ac_compile"
7108case "(($ac_try" in
7109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7110 *) ac_try_echo=$ac_try;;
7111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007113 (eval "$ac_compile") 2>conftest.er1
7114 ac_status=$?
7115 grep -v '^ *+' conftest.er1 >conftest.err
7116 rm -f conftest.er1
7117 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007119 (exit $ac_status); } && {
7120 test -z "$ac_c_werror_flag" ||
7121 test ! -s conftest.err
7122 } && test -s conftest.$ac_objext; then
7123 case $ac_type in
7124 uint32_t) ac_cv_c_uint32_t=yes ;;
7125 *) ac_cv_c_uint32_t=$ac_type ;;
7126esac
7127
7128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007129 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007130sed 's/^/| /' conftest.$ac_ext >&5
7131
7132
7133fi
7134
7135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7136 test "$ac_cv_c_uint32_t" != no && break
7137 done
7138fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007139{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7140echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007141 case $ac_cv_c_uint32_t in #(
7142 no|yes) ;; #(
7143 *)
7144
7145cat >>confdefs.h <<\_ACEOF
7146#define _UINT32_T 1
7147_ACEOF
7148
7149
7150cat >>confdefs.h <<_ACEOF
7151#define uint32_t $ac_cv_c_uint32_t
7152_ACEOF
7153;;
7154 esac
7155
7156
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007157 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7158echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007159if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007160 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007161else
7162 ac_cv_c_uint64_t=no
7163 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7164 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7165 cat >conftest.$ac_ext <<_ACEOF
7166/* confdefs.h. */
7167_ACEOF
7168cat confdefs.h >>conftest.$ac_ext
7169cat >>conftest.$ac_ext <<_ACEOF
7170/* end confdefs.h. */
7171$ac_includes_default
7172int
7173main ()
7174{
7175static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7176test_array [0] = 0
7177
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext
7183if { (ac_try="$ac_compile"
7184case "(($ac_try" in
7185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7186 *) ac_try_echo=$ac_try;;
7187esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007189 (eval "$ac_compile") 2>conftest.er1
7190 ac_status=$?
7191 grep -v '^ *+' conftest.er1 >conftest.err
7192 rm -f conftest.er1
7193 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007195 (exit $ac_status); } && {
7196 test -z "$ac_c_werror_flag" ||
7197 test ! -s conftest.err
7198 } && test -s conftest.$ac_objext; then
7199 case $ac_type in
7200 uint64_t) ac_cv_c_uint64_t=yes ;;
7201 *) ac_cv_c_uint64_t=$ac_type ;;
7202esac
7203
7204else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007205 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007206sed 's/^/| /' conftest.$ac_ext >&5
7207
7208
7209fi
7210
7211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7212 test "$ac_cv_c_uint64_t" != no && break
7213 done
7214fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007215{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7216echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007217 case $ac_cv_c_uint64_t in #(
7218 no|yes) ;; #(
7219 *)
7220
7221cat >>confdefs.h <<\_ACEOF
7222#define _UINT64_T 1
7223_ACEOF
7224
7225
7226cat >>confdefs.h <<_ACEOF
7227#define uint64_t $ac_cv_c_uint64_t
7228_ACEOF
7229;;
7230 esac
7231
7232
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007233 { echo "$as_me:$LINENO: checking for int32_t" >&5
7234echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007235if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007236 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237else
7238 ac_cv_c_int32_t=no
7239 for ac_type in 'int32_t' 'int' 'long int' \
7240 'long long int' 'short int' 'signed char'; do
7241 cat >conftest.$ac_ext <<_ACEOF
7242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
7247$ac_includes_default
7248int
7249main ()
7250{
7251static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7252test_array [0] = 0
7253
7254 ;
7255 return 0;
7256}
7257_ACEOF
7258rm -f conftest.$ac_objext
7259if { (ac_try="$ac_compile"
7260case "(($ac_try" in
7261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7262 *) ac_try_echo=$ac_try;;
7263esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007265 (eval "$ac_compile") 2>conftest.er1
7266 ac_status=$?
7267 grep -v '^ *+' conftest.er1 >conftest.err
7268 rm -f conftest.er1
7269 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007271 (exit $ac_status); } && {
7272 test -z "$ac_c_werror_flag" ||
7273 test ! -s conftest.err
7274 } && test -s conftest.$ac_objext; then
7275 cat >conftest.$ac_ext <<_ACEOF
7276/* confdefs.h. */
7277_ACEOF
7278cat confdefs.h >>conftest.$ac_ext
7279cat >>conftest.$ac_ext <<_ACEOF
7280/* end confdefs.h. */
7281$ac_includes_default
7282int
7283main ()
7284{
7285static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007286 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007287test_array [0] = 0
7288
7289 ;
7290 return 0;
7291}
7292_ACEOF
7293rm -f conftest.$ac_objext
7294if { (ac_try="$ac_compile"
7295case "(($ac_try" in
7296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7297 *) ac_try_echo=$ac_try;;
7298esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007300 (eval "$ac_compile") 2>conftest.er1
7301 ac_status=$?
7302 grep -v '^ *+' conftest.er1 >conftest.err
7303 rm -f conftest.er1
7304 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007306 (exit $ac_status); } && {
7307 test -z "$ac_c_werror_flag" ||
7308 test ! -s conftest.err
7309 } && test -s conftest.$ac_objext; then
7310 :
7311else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007312 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007313sed 's/^/| /' conftest.$ac_ext >&5
7314
7315 case $ac_type in
7316 int32_t) ac_cv_c_int32_t=yes ;;
7317 *) ac_cv_c_int32_t=$ac_type ;;
7318esac
7319
7320fi
7321
7322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007324 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325sed 's/^/| /' conftest.$ac_ext >&5
7326
7327
7328fi
7329
7330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7331 test "$ac_cv_c_int32_t" != no && break
7332 done
7333fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007334{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7335echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007336 case $ac_cv_c_int32_t in #(
7337 no|yes) ;; #(
7338 *)
7339
7340cat >>confdefs.h <<_ACEOF
7341#define int32_t $ac_cv_c_int32_t
7342_ACEOF
7343;;
7344 esac
7345
7346
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007347 { echo "$as_me:$LINENO: checking for int64_t" >&5
7348echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007349if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007350 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007351else
7352 ac_cv_c_int64_t=no
7353 for ac_type in 'int64_t' 'int' 'long int' \
7354 'long long int' 'short int' 'signed char'; do
7355 cat >conftest.$ac_ext <<_ACEOF
7356/* confdefs.h. */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h. */
7361$ac_includes_default
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7366test_array [0] = 0
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
7373if { (ac_try="$ac_compile"
7374case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007379 (eval "$ac_compile") 2>conftest.er1
7380 ac_status=$?
7381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007385 (exit $ac_status); } && {
7386 test -z "$ac_c_werror_flag" ||
7387 test ! -s conftest.err
7388 } && test -s conftest.$ac_objext; then
7389 cat >conftest.$ac_ext <<_ACEOF
7390/* confdefs.h. */
7391_ACEOF
7392cat confdefs.h >>conftest.$ac_ext
7393cat >>conftest.$ac_ext <<_ACEOF
7394/* end confdefs.h. */
7395$ac_includes_default
7396int
7397main ()
7398{
7399static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007400 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007401test_array [0] = 0
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407rm -f conftest.$ac_objext
7408if { (ac_try="$ac_compile"
7409case "(($ac_try" in
7410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7411 *) ac_try_echo=$ac_try;;
7412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007414 (eval "$ac_compile") 2>conftest.er1
7415 ac_status=$?
7416 grep -v '^ *+' conftest.er1 >conftest.err
7417 rm -f conftest.er1
7418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7424 :
7425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007426 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007427sed 's/^/| /' conftest.$ac_ext >&5
7428
7429 case $ac_type in
7430 int64_t) ac_cv_c_int64_t=yes ;;
7431 *) ac_cv_c_int64_t=$ac_type ;;
7432esac
7433
7434fi
7435
7436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007438 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007439sed 's/^/| /' conftest.$ac_ext >&5
7440
7441
7442fi
7443
7444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7445 test "$ac_cv_c_int64_t" != no && break
7446 done
7447fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007448{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7449echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007450 case $ac_cv_c_int64_t in #(
7451 no|yes) ;; #(
7452 *)
7453
7454cat >>confdefs.h <<_ACEOF
7455#define int64_t $ac_cv_c_int64_t
7456_ACEOF
7457;;
7458 esac
7459
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007460{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7461echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007462if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007463 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007464else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007465 cat >conftest.$ac_ext <<_ACEOF
7466/* confdefs.h. */
7467_ACEOF
7468cat confdefs.h >>conftest.$ac_ext
7469cat >>conftest.$ac_ext <<_ACEOF
7470/* end confdefs.h. */
7471$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007472typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007473int
7474main ()
7475{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007476if ((ac__type_new_ *) 0)
7477 return 0;
7478if (sizeof (ac__type_new_))
7479 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007480 ;
7481 return 0;
7482}
7483_ACEOF
7484rm -f conftest.$ac_objext
7485if { (ac_try="$ac_compile"
7486case "(($ac_try" in
7487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7488 *) ac_try_echo=$ac_try;;
7489esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007491 (eval "$ac_compile") 2>conftest.er1
7492 ac_status=$?
7493 grep -v '^ *+' conftest.er1 >conftest.err
7494 rm -f conftest.er1
7495 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007497 (exit $ac_status); } && {
7498 test -z "$ac_c_werror_flag" ||
7499 test ! -s conftest.err
7500 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007501 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007503 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007504sed 's/^/| /' conftest.$ac_ext >&5
7505
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007506 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007508
7509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007510fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007511{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7512echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7513if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007514
7515cat >>confdefs.h <<\_ACEOF
7516#define HAVE_SSIZE_T 1
7517_ACEOF
7518
7519fi
7520
Jack Jansendd19cf82001-12-06 22:36:17 +00007521
Michael W. Hudson54241132001-12-07 15:38:26 +00007522# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007523# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007524{ echo "$as_me:$LINENO: checking for int" >&5
7525echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7526if test "${ac_cv_type_int+set}" = set; then
7527 echo $ECHO_N "(cached) $ECHO_C" >&6
7528else
7529 cat >conftest.$ac_ext <<_ACEOF
7530/* confdefs.h. */
7531_ACEOF
7532cat confdefs.h >>conftest.$ac_ext
7533cat >>conftest.$ac_ext <<_ACEOF
7534/* end confdefs.h. */
7535$ac_includes_default
7536typedef int ac__type_new_;
7537int
7538main ()
7539{
7540if ((ac__type_new_ *) 0)
7541 return 0;
7542if (sizeof (ac__type_new_))
7543 return 0;
7544 ;
7545 return 0;
7546}
7547_ACEOF
7548rm -f conftest.$ac_objext
7549if { (ac_try="$ac_compile"
7550case "(($ac_try" in
7551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7552 *) ac_try_echo=$ac_try;;
7553esac
7554eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7555 (eval "$ac_compile") 2>conftest.er1
7556 ac_status=$?
7557 grep -v '^ *+' conftest.er1 >conftest.err
7558 rm -f conftest.er1
7559 cat conftest.err >&5
7560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7561 (exit $ac_status); } && {
7562 test -z "$ac_c_werror_flag" ||
7563 test ! -s conftest.err
7564 } && test -s conftest.$ac_objext; then
7565 ac_cv_type_int=yes
7566else
7567 echo "$as_me: failed program was:" >&5
7568sed 's/^/| /' conftest.$ac_ext >&5
7569
7570 ac_cv_type_int=no
7571fi
7572
7573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7574fi
7575{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7576echo "${ECHO_T}$ac_cv_type_int" >&6; }
7577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007582{ echo "$as_me:$LINENO: checking size of int" >&5
7583echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007584if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007585 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 if test "$cross_compiling" = yes; then
7588 # Depending upon the size, compute the lo and hi bounds.
7589cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007596 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007601test_array [0] = 0
7602
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608if { (ac_try="$ac_compile"
7609case "(($ac_try" in
7610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7611 *) ac_try_echo=$ac_try;;
7612esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007616 grep -v '^ *+' conftest.er1 >conftest.err
7617 rm -f conftest.er1
7618 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620 (exit $ac_status); } && {
7621 test -z "$ac_c_werror_flag" ||
7622 test ! -s conftest.err
7623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007624 ac_lo=0 ac_mid=0
7625 while :; do
7626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007627/* confdefs.h. */
7628_ACEOF
7629cat confdefs.h >>conftest.$ac_ext
7630cat >>conftest.$ac_ext <<_ACEOF
7631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007633 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007638test_array [0] = 0
7639
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645if { (ac_try="$ac_compile"
7646case "(($ac_try" in
7647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7648 *) ac_try_echo=$ac_try;;
7649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ac_hi=$ac_mid; break
7662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007664sed 's/^/| /' conftest.$ac_ext >&5
7665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 ac_lo=`expr $ac_mid + 1`
7667 if test $ac_lo -le $ac_mid; then
7668 ac_lo= ac_hi=
7669 break
7670 fi
7671 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673
7674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007675 done
7676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007678sed 's/^/| /' conftest.$ac_ext >&5
7679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007686$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007687 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007688int
7689main ()
7690{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007691static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007692test_array [0] = 0
7693
7694 ;
7695 return 0;
7696}
7697_ACEOF
7698rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007699if { (ac_try="$ac_compile"
7700case "(($ac_try" in
7701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7702 *) ac_try_echo=$ac_try;;
7703esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 (exit $ac_status); } && {
7712 test -z "$ac_c_werror_flag" ||
7713 test ! -s conftest.err
7714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007715 ac_hi=-1 ac_mid=-1
7716 while :; do
7717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007718/* confdefs.h. */
7719_ACEOF
7720cat confdefs.h >>conftest.$ac_ext
7721cat >>conftest.$ac_ext <<_ACEOF
7722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007723$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007724 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007725int
7726main ()
7727{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007729test_array [0] = 0
7730
7731 ;
7732 return 0;
7733}
7734_ACEOF
7735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736if { (ac_try="$ac_compile"
7737case "(($ac_try" in
7738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739 *) ac_try_echo=$ac_try;;
7740esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007744 grep -v '^ *+' conftest.er1 >conftest.err
7745 rm -f conftest.er1
7746 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 (exit $ac_status); } && {
7749 test -z "$ac_c_werror_flag" ||
7750 test ! -s conftest.err
7751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_lo=$ac_mid; break
7753else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007755sed 's/^/| /' conftest.$ac_ext >&5
7756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757 ac_hi=`expr '(' $ac_mid ')' - 1`
7758 if test $ac_mid -le $ac_hi; then
7759 ac_lo= ac_hi=
7760 break
7761 fi
7762 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764
7765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 done
7767else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007769sed 's/^/| /' conftest.$ac_ext >&5
7770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773
7774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
7777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007778# Binary search between lo and hi bounds.
7779while test "x$ac_lo" != "x$ac_hi"; do
7780 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007782/* confdefs.h. */
7783_ACEOF
7784cat confdefs.h >>conftest.$ac_ext
7785cat >>conftest.$ac_ext <<_ACEOF
7786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007787$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007788 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007789int
7790main ()
7791{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007792static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007793test_array [0] = 0
7794
7795 ;
7796 return 0;
7797}
7798_ACEOF
7799rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800if { (ac_try="$ac_compile"
7801case "(($ac_try" in
7802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7803 *) ac_try_echo=$ac_try;;
7804esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007808 grep -v '^ *+' conftest.er1 >conftest.err
7809 rm -f conftest.er1
7810 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 (exit $ac_status); } && {
7813 test -z "$ac_c_werror_flag" ||
7814 test ! -s conftest.err
7815 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ac_hi=$ac_mid
7817else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007819sed 's/^/| /' conftest.$ac_ext >&5
7820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823
7824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007825done
7826case $ac_lo in
7827?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007829 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007830See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007831echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007832See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007833 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834 else
7835 ac_cv_sizeof_int=0
7836 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007837esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007838else
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007840/* confdefs.h. */
7841_ACEOF
7842cat confdefs.h >>conftest.$ac_ext
7843cat >>conftest.$ac_ext <<_ACEOF
7844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007845$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846 typedef int ac__type_sizeof_;
7847static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7848static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007849#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007850#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007851int
7852main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853{
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
7855 FILE *f = fopen ("conftest.val", "w");
7856 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007858 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007861 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007862 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007863 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 }
7865 else
7866 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007868 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007870 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007872 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
7874 ;
7875 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007876}
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
7878rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879if { (ac_try="$ac_link"
7880case "(($ac_try" in
7881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7882 *) ac_try_echo=$ac_try;;
7883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007888 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889 { (case "(($ac_try" in
7890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7891 *) ac_try_echo=$ac_try;;
7892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 (exit $ac_status); }; }; then
7898 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007899else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007900 echo "$as_me: program exited with status $ac_status" >&5
7901echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007902sed 's/^/| /' conftest.$ac_ext >&5
7903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007906 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007907See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007908echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007909See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007910 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911 else
7912 ac_cv_sizeof_int=0
7913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915rm -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 +00007916fi
7917rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007918fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007919{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7920echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921
7922
7923
Martin v. Löwis11437992002-04-12 09:54:03 +00007924cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007925#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007926_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007927
7928
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007929{ echo "$as_me:$LINENO: checking for long" >&5
7930echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7931if test "${ac_cv_type_long+set}" = set; then
7932 echo $ECHO_N "(cached) $ECHO_C" >&6
7933else
7934 cat >conftest.$ac_ext <<_ACEOF
7935/* confdefs.h. */
7936_ACEOF
7937cat confdefs.h >>conftest.$ac_ext
7938cat >>conftest.$ac_ext <<_ACEOF
7939/* end confdefs.h. */
7940$ac_includes_default
7941typedef long ac__type_new_;
7942int
7943main ()
7944{
7945if ((ac__type_new_ *) 0)
7946 return 0;
7947if (sizeof (ac__type_new_))
7948 return 0;
7949 ;
7950 return 0;
7951}
7952_ACEOF
7953rm -f conftest.$ac_objext
7954if { (ac_try="$ac_compile"
7955case "(($ac_try" in
7956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7957 *) ac_try_echo=$ac_try;;
7958esac
7959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7960 (eval "$ac_compile") 2>conftest.er1
7961 ac_status=$?
7962 grep -v '^ *+' conftest.er1 >conftest.err
7963 rm -f conftest.er1
7964 cat conftest.err >&5
7965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7966 (exit $ac_status); } && {
7967 test -z "$ac_c_werror_flag" ||
7968 test ! -s conftest.err
7969 } && test -s conftest.$ac_objext; then
7970 ac_cv_type_long=yes
7971else
7972 echo "$as_me: failed program was:" >&5
7973sed 's/^/| /' conftest.$ac_ext >&5
7974
7975 ac_cv_type_long=no
7976fi
7977
7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7979fi
7980{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7981echo "${ECHO_T}$ac_cv_type_long" >&6; }
7982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983# The cast to long int works around a bug in the HP C Compiler
7984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7986# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007987{ echo "$as_me:$LINENO: checking size of long" >&5
7988echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007989if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007990 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007991else
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 if test "$cross_compiling" = yes; then
7993 # Depending upon the size, compute the lo and hi bounds.
7994cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007995/* confdefs.h. */
7996_ACEOF
7997cat confdefs.h >>conftest.$ac_ext
7998cat >>conftest.$ac_ext <<_ACEOF
7999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008000$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008001 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008002int
8003main ()
8004{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008006test_array [0] = 0
8007
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 ac_lo=0 ac_mid=0
8030 while :; do
8031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* confdefs.h. */
8033_ACEOF
8034cat confdefs.h >>conftest.$ac_ext
8035cat >>conftest.$ac_ext <<_ACEOF
8036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008038 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008039int
8040main ()
8041{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008043test_array [0] = 0
8044
8045 ;
8046 return 0;
8047}
8048_ACEOF
8049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050if { (ac_try="$ac_compile"
8051case "(($ac_try" in
8052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8053 *) ac_try_echo=$ac_try;;
8054esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008058 grep -v '^ *+' conftest.er1 >conftest.err
8059 rm -f conftest.er1
8060 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 (exit $ac_status); } && {
8063 test -z "$ac_c_werror_flag" ||
8064 test ! -s conftest.err
8065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ac_hi=$ac_mid; break
8067else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008069sed 's/^/| /' conftest.$ac_ext >&5
8070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071 ac_lo=`expr $ac_mid + 1`
8072 if test $ac_lo -le $ac_mid; then
8073 ac_lo= ac_hi=
8074 break
8075 fi
8076 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078
8079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008080 done
8081else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008083sed 's/^/| /' conftest.$ac_ext >&5
8084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008086/* confdefs.h. */
8087_ACEOF
8088cat confdefs.h >>conftest.$ac_ext
8089cat >>conftest.$ac_ext <<_ACEOF
8090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008091$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008092 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008093int
8094main ()
8095{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008096static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008097test_array [0] = 0
8098
8099 ;
8100 return 0;
8101}
8102_ACEOF
8103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104if { (ac_try="$ac_compile"
8105case "(($ac_try" in
8106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8107 *) ac_try_echo=$ac_try;;
8108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008112 grep -v '^ *+' conftest.er1 >conftest.err
8113 rm -f conftest.er1
8114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008116 (exit $ac_status); } && {
8117 test -z "$ac_c_werror_flag" ||
8118 test ! -s conftest.err
8119 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008120 ac_hi=-1 ac_mid=-1
8121 while :; do
8122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008128$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008129 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008134test_array [0] = 0
8135
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141if { (ac_try="$ac_compile"
8142case "(($ac_try" in
8143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8144 *) ac_try_echo=$ac_try;;
8145esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008149 grep -v '^ *+' conftest.er1 >conftest.err
8150 rm -f conftest.er1
8151 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 (exit $ac_status); } && {
8154 test -z "$ac_c_werror_flag" ||
8155 test ! -s conftest.err
8156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_lo=$ac_mid; break
8158else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008160sed 's/^/| /' conftest.$ac_ext >&5
8161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 ac_hi=`expr '(' $ac_mid ')' - 1`
8163 if test $ac_mid -le $ac_hi; then
8164 ac_lo= ac_hi=
8165 break
8166 fi
8167 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169
8170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 done
8172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008174sed 's/^/| /' conftest.$ac_ext >&5
8175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183# Binary search between lo and hi bounds.
8184while test "x$ac_lo" != "x$ac_hi"; do
8185 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008187/* confdefs.h. */
8188_ACEOF
8189cat confdefs.h >>conftest.$ac_ext
8190cat >>conftest.$ac_ext <<_ACEOF
8191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008192$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008193 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008198test_array [0] = 0
8199
8200 ;
8201 return 0;
8202}
8203_ACEOF
8204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205if { (ac_try="$ac_compile"
8206case "(($ac_try" in
8207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8208 *) ac_try_echo=$ac_try;;
8209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008213 grep -v '^ *+' conftest.er1 >conftest.err
8214 rm -f conftest.er1
8215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 (exit $ac_status); } && {
8218 test -z "$ac_c_werror_flag" ||
8219 test ! -s conftest.err
8220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_hi=$ac_mid
8222else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008224sed 's/^/| /' conftest.$ac_ext >&5
8225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228
8229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008230done
8231case $ac_lo in
8232?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008234 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008235See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008236echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008237See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008238 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239 else
8240 ac_cv_sizeof_long=0
8241 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008242esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008243else
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008250$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251 typedef long ac__type_sizeof_;
8252static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8253static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008254#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008255#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008256int
8257main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008258{
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260 FILE *f = fopen ("conftest.val", "w");
8261 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008263 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008264 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008266 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008267 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008268 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 }
8270 else
8271 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008273 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008274 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008275 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008277 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
8279 ;
8280 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008281}
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
8283rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284if { (ac_try="$ac_link"
8285case "(($ac_try" in
8286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8287 *) ac_try_echo=$ac_try;;
8288esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294 { (case "(($ac_try" in
8295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8296 *) ac_try_echo=$ac_try;;
8297esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008302 (exit $ac_status); }; }; then
8303 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008305 echo "$as_me: program exited with status $ac_status" >&5
8306echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008307sed 's/^/| /' conftest.$ac_ext >&5
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008311 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008312See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008313echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008314See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008315 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316 else
8317 ac_cv_sizeof_long=0
8318 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320rm -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 +00008321fi
8322rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008323fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008324{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8325echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326
8327
8328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008330#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008332
8333
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008334{ echo "$as_me:$LINENO: checking for void *" >&5
8335echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8336if test "${ac_cv_type_void_p+set}" = set; then
8337 echo $ECHO_N "(cached) $ECHO_C" >&6
8338else
8339 cat >conftest.$ac_ext <<_ACEOF
8340/* confdefs.h. */
8341_ACEOF
8342cat confdefs.h >>conftest.$ac_ext
8343cat >>conftest.$ac_ext <<_ACEOF
8344/* end confdefs.h. */
8345$ac_includes_default
8346typedef void * ac__type_new_;
8347int
8348main ()
8349{
8350if ((ac__type_new_ *) 0)
8351 return 0;
8352if (sizeof (ac__type_new_))
8353 return 0;
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
8359if { (ac_try="$ac_compile"
8360case "(($ac_try" in
8361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8362 *) ac_try_echo=$ac_try;;
8363esac
8364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8365 (eval "$ac_compile") 2>conftest.er1
8366 ac_status=$?
8367 grep -v '^ *+' conftest.er1 >conftest.err
8368 rm -f conftest.er1
8369 cat conftest.err >&5
8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); } && {
8372 test -z "$ac_c_werror_flag" ||
8373 test ! -s conftest.err
8374 } && test -s conftest.$ac_objext; then
8375 ac_cv_type_void_p=yes
8376else
8377 echo "$as_me: failed program was:" >&5
8378sed 's/^/| /' conftest.$ac_ext >&5
8379
8380 ac_cv_type_void_p=no
8381fi
8382
8383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8384fi
8385{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8386echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388# The cast to long int works around a bug in the HP C Compiler
8389# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8390# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8391# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008392{ echo "$as_me:$LINENO: checking size of void *" >&5
8393echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008394if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008395 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008396else
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 if test "$cross_compiling" = yes; then
8398 # Depending upon the size, compute the lo and hi bounds.
8399cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* confdefs.h. */
8401_ACEOF
8402cat confdefs.h >>conftest.$ac_ext
8403cat >>conftest.$ac_ext <<_ACEOF
8404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008405$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008406 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008407int
8408main ()
8409{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008411test_array [0] = 0
8412
8413 ;
8414 return 0;
8415}
8416_ACEOF
8417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418if { (ac_try="$ac_compile"
8419case "(($ac_try" in
8420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8421 *) ac_try_echo=$ac_try;;
8422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 (exit $ac_status); } && {
8431 test -z "$ac_c_werror_flag" ||
8432 test ! -s conftest.err
8433 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 ac_lo=0 ac_mid=0
8435 while :; do
8436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008437/* confdefs.h. */
8438_ACEOF
8439cat confdefs.h >>conftest.$ac_ext
8440cat >>conftest.$ac_ext <<_ACEOF
8441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008442$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008443 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008444int
8445main ()
8446{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008448test_array [0] = 0
8449
8450 ;
8451 return 0;
8452}
8453_ACEOF
8454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455if { (ac_try="$ac_compile"
8456case "(($ac_try" in
8457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8458 *) ac_try_echo=$ac_try;;
8459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008463 grep -v '^ *+' conftest.er1 >conftest.err
8464 rm -f conftest.er1
8465 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 (exit $ac_status); } && {
8468 test -z "$ac_c_werror_flag" ||
8469 test ! -s conftest.err
8470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_hi=$ac_mid; break
8472else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008474sed 's/^/| /' conftest.$ac_ext >&5
8475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476 ac_lo=`expr $ac_mid + 1`
8477 if test $ac_lo -le $ac_mid; then
8478 ac_lo= ac_hi=
8479 break
8480 fi
8481 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483
8484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 done
8486else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008488sed 's/^/| /' conftest.$ac_ext >&5
8489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008491/* confdefs.h. */
8492_ACEOF
8493cat confdefs.h >>conftest.$ac_ext
8494cat >>conftest.$ac_ext <<_ACEOF
8495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008496$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008497 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008498int
8499main ()
8500{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008501static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008502test_array [0] = 0
8503
8504 ;
8505 return 0;
8506}
8507_ACEOF
8508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509if { (ac_try="$ac_compile"
8510case "(($ac_try" in
8511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8512 *) ac_try_echo=$ac_try;;
8513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008517 grep -v '^ *+' conftest.er1 >conftest.err
8518 rm -f conftest.er1
8519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 (exit $ac_status); } && {
8522 test -z "$ac_c_werror_flag" ||
8523 test ! -s conftest.err
8524 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008525 ac_hi=-1 ac_mid=-1
8526 while :; do
8527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008528/* confdefs.h. */
8529_ACEOF
8530cat confdefs.h >>conftest.$ac_ext
8531cat >>conftest.$ac_ext <<_ACEOF
8532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008533$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008534 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008535int
8536main ()
8537{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008539test_array [0] = 0
8540
8541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546if { (ac_try="$ac_compile"
8547case "(($ac_try" in
8548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8549 *) ac_try_echo=$ac_try;;
8550esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008554 grep -v '^ *+' conftest.er1 >conftest.err
8555 rm -f conftest.er1
8556 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 (exit $ac_status); } && {
8559 test -z "$ac_c_werror_flag" ||
8560 test ! -s conftest.err
8561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_lo=$ac_mid; break
8563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008565sed 's/^/| /' conftest.$ac_ext >&5
8566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567 ac_hi=`expr '(' $ac_mid ')' - 1`
8568 if test $ac_mid -le $ac_hi; then
8569 ac_lo= ac_hi=
8570 break
8571 fi
8572 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574
8575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 done
8577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008579sed 's/^/| /' conftest.$ac_ext >&5
8580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583
8584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586
8587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008588# Binary search between lo and hi bounds.
8589while test "x$ac_lo" != "x$ac_hi"; do
8590 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008598 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008602static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008603test_array [0] = 0
8604
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610if { (ac_try="$ac_compile"
8611case "(($ac_try" in
8612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613 *) ac_try_echo=$ac_try;;
8614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 (exit $ac_status); } && {
8623 test -z "$ac_c_werror_flag" ||
8624 test ! -s conftest.err
8625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ac_hi=$ac_mid
8627else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008629sed 's/^/| /' conftest.$ac_ext >&5
8630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635done
8636case $ac_lo in
8637?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008639 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008640See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008641echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008642See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008643 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 else
8645 ac_cv_sizeof_void_p=0
8646 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008647esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008648else
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008650/* confdefs.h. */
8651_ACEOF
8652cat confdefs.h >>conftest.$ac_ext
8653cat >>conftest.$ac_ext <<_ACEOF
8654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008655$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656 typedef void * ac__type_sizeof_;
8657static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8658static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008659#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008660#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008661int
8662main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008663{
Martin v. Löwis11437992002-04-12 09:54:03 +00008664
8665 FILE *f = fopen ("conftest.val", "w");
8666 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008668 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008671 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008672 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008673 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 }
8675 else
8676 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008678 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008680 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008683
8684 ;
8685 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008686}
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
8688rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689if { (ac_try="$ac_link"
8690case "(($ac_try" in
8691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8692 *) ac_try_echo=$ac_try;;
8693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699 { (case "(($ac_try" in
8700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8701 *) ac_try_echo=$ac_try;;
8702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008707 (exit $ac_status); }; }; then
8708 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008709else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008710 echo "$as_me: program exited with status $ac_status" >&5
8711echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008712sed 's/^/| /' conftest.$ac_ext >&5
8713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008716 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008717See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008718echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008719See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008720 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721 else
8722 ac_cv_sizeof_void_p=0
8723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725rm -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 +00008726fi
8727rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008728fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008729{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8730echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis11437992002-04-12 09:54:03 +00008734cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008735#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008736_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008737
8738
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008739{ echo "$as_me:$LINENO: checking for short" >&5
8740echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8741if test "${ac_cv_type_short+set}" = set; then
8742 echo $ECHO_N "(cached) $ECHO_C" >&6
8743else
8744 cat >conftest.$ac_ext <<_ACEOF
8745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
8750$ac_includes_default
8751typedef short ac__type_new_;
8752int
8753main ()
8754{
8755if ((ac__type_new_ *) 0)
8756 return 0;
8757if (sizeof (ac__type_new_))
8758 return 0;
8759 ;
8760 return 0;
8761}
8762_ACEOF
8763rm -f conftest.$ac_objext
8764if { (ac_try="$ac_compile"
8765case "(($ac_try" in
8766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8767 *) ac_try_echo=$ac_try;;
8768esac
8769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8770 (eval "$ac_compile") 2>conftest.er1
8771 ac_status=$?
8772 grep -v '^ *+' conftest.er1 >conftest.err
8773 rm -f conftest.er1
8774 cat conftest.err >&5
8775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8776 (exit $ac_status); } && {
8777 test -z "$ac_c_werror_flag" ||
8778 test ! -s conftest.err
8779 } && test -s conftest.$ac_objext; then
8780 ac_cv_type_short=yes
8781else
8782 echo "$as_me: failed program was:" >&5
8783sed 's/^/| /' conftest.$ac_ext >&5
8784
8785 ac_cv_type_short=no
8786fi
8787
8788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8789fi
8790{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8791echo "${ECHO_T}$ac_cv_type_short" >&6; }
8792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793# The cast to long int works around a bug in the HP C Compiler
8794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8796# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008797{ echo "$as_me:$LINENO: checking size of short" >&5
8798echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008799if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008800 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008801else
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 if test "$cross_compiling" = yes; then
8803 # Depending upon the size, compute the lo and hi bounds.
8804cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* confdefs.h. */
8806_ACEOF
8807cat confdefs.h >>conftest.$ac_ext
8808cat >>conftest.$ac_ext <<_ACEOF
8809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008811 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008816test_array [0] = 0
8817
8818 ;
8819 return 0;
8820}
8821_ACEOF
8822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823if { (ac_try="$ac_compile"
8824case "(($ac_try" in
8825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8826 *) ac_try_echo=$ac_try;;
8827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008831 grep -v '^ *+' conftest.er1 >conftest.err
8832 rm -f conftest.er1
8833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 (exit $ac_status); } && {
8836 test -z "$ac_c_werror_flag" ||
8837 test ! -s conftest.err
8838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_lo=0 ac_mid=0
8840 while :; do
8841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* confdefs.h. */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008847$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008848 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008853test_array [0] = 0
8854
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860if { (ac_try="$ac_compile"
8861case "(($ac_try" in
8862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8863 *) ac_try_echo=$ac_try;;
8864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008868 grep -v '^ *+' conftest.er1 >conftest.err
8869 rm -f conftest.er1
8870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872 (exit $ac_status); } && {
8873 test -z "$ac_c_werror_flag" ||
8874 test ! -s conftest.err
8875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_hi=$ac_mid; break
8877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008879sed 's/^/| /' conftest.$ac_ext >&5
8880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 ac_lo=`expr $ac_mid + 1`
8882 if test $ac_lo -le $ac_mid; then
8883 ac_lo= ac_hi=
8884 break
8885 fi
8886 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888
8889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 done
8891else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008893sed 's/^/| /' conftest.$ac_ext >&5
8894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* confdefs.h. */
8897_ACEOF
8898cat confdefs.h >>conftest.$ac_ext
8899cat >>conftest.$ac_ext <<_ACEOF
8900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008901$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008902 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008903int
8904main ()
8905{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008907test_array [0] = 0
8908
8909 ;
8910 return 0;
8911}
8912_ACEOF
8913rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914if { (ac_try="$ac_compile"
8915case "(($ac_try" in
8916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8917 *) ac_try_echo=$ac_try;;
8918esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008922 grep -v '^ *+' conftest.er1 >conftest.err
8923 rm -f conftest.er1
8924 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926 (exit $ac_status); } && {
8927 test -z "$ac_c_werror_flag" ||
8928 test ! -s conftest.err
8929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_hi=-1 ac_mid=-1
8931 while :; do
8932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* confdefs.h. */
8934_ACEOF
8935cat confdefs.h >>conftest.$ac_ext
8936cat >>conftest.$ac_ext <<_ACEOF
8937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008939 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008944test_array [0] = 0
8945
8946 ;
8947 return 0;
8948}
8949_ACEOF
8950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951if { (ac_try="$ac_compile"
8952case "(($ac_try" in
8953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8954 *) ac_try_echo=$ac_try;;
8955esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008959 grep -v '^ *+' conftest.er1 >conftest.err
8960 rm -f conftest.er1
8961 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963 (exit $ac_status); } && {
8964 test -z "$ac_c_werror_flag" ||
8965 test ! -s conftest.err
8966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_lo=$ac_mid; break
8968else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008970sed 's/^/| /' conftest.$ac_ext >&5
8971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972 ac_hi=`expr '(' $ac_mid ')' - 1`
8973 if test $ac_mid -le $ac_hi; then
8974 ac_lo= ac_hi=
8975 break
8976 fi
8977 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979
8980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 done
8982else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008983 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008984sed 's/^/| /' conftest.$ac_ext >&5
8985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988
8989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008993# Binary search between lo and hi bounds.
8994while test "x$ac_lo" != "x$ac_hi"; do
8995 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* confdefs.h. */
8998_ACEOF
8999cat confdefs.h >>conftest.$ac_ext
9000cat >>conftest.$ac_ext <<_ACEOF
9001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009002$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009003 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009007static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009008test_array [0] = 0
9009
9010 ;
9011 return 0;
9012}
9013_ACEOF
9014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015if { (ac_try="$ac_compile"
9016case "(($ac_try" in
9017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9018 *) ac_try_echo=$ac_try;;
9019esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009023 grep -v '^ *+' conftest.er1 >conftest.err
9024 rm -f conftest.er1
9025 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 (exit $ac_status); } && {
9028 test -z "$ac_c_werror_flag" ||
9029 test ! -s conftest.err
9030 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 ac_hi=$ac_mid
9032else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009033 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009034sed 's/^/| /' conftest.$ac_ext >&5
9035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038
9039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009040done
9041case $ac_lo in
9042?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009043'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009044 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009045See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009046echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009047See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009048 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 else
9050 ac_cv_sizeof_short=0
9051 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009052esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009053else
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009055/* confdefs.h. */
9056_ACEOF
9057cat confdefs.h >>conftest.$ac_ext
9058cat >>conftest.$ac_ext <<_ACEOF
9059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009060$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061 typedef short ac__type_sizeof_;
9062static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9063static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009065#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009068{
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
9070 FILE *f = fopen ("conftest.val", "w");
9071 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009073 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009074 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009076 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009078 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 }
9080 else
9081 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009085 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009088
9089 ;
9090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009091}
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
9093rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094if { (ac_try="$ac_link"
9095case "(($ac_try" in
9096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9097 *) ac_try_echo=$ac_try;;
9098esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009104 { (case "(($ac_try" in
9105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9106 *) ac_try_echo=$ac_try;;
9107esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009109 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009112 (exit $ac_status); }; }; then
9113 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009114else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009115 echo "$as_me: program exited with status $ac_status" >&5
9116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009117sed 's/^/| /' conftest.$ac_ext >&5
9118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009121 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009122See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009123echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009124See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009125 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126 else
9127 ac_cv_sizeof_short=0
9128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130rm -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 +00009131fi
9132rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009133fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009134{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9135echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136
9137
9138
Martin v. Löwis11437992002-04-12 09:54:03 +00009139cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009140#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009141_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009142
9143
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009144{ echo "$as_me:$LINENO: checking for float" >&5
9145echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9146if test "${ac_cv_type_float+set}" = set; then
9147 echo $ECHO_N "(cached) $ECHO_C" >&6
9148else
9149 cat >conftest.$ac_ext <<_ACEOF
9150/* confdefs.h. */
9151_ACEOF
9152cat confdefs.h >>conftest.$ac_ext
9153cat >>conftest.$ac_ext <<_ACEOF
9154/* end confdefs.h. */
9155$ac_includes_default
9156typedef float ac__type_new_;
9157int
9158main ()
9159{
9160if ((ac__type_new_ *) 0)
9161 return 0;
9162if (sizeof (ac__type_new_))
9163 return 0;
9164 ;
9165 return 0;
9166}
9167_ACEOF
9168rm -f conftest.$ac_objext
9169if { (ac_try="$ac_compile"
9170case "(($ac_try" in
9171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9172 *) ac_try_echo=$ac_try;;
9173esac
9174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9175 (eval "$ac_compile") 2>conftest.er1
9176 ac_status=$?
9177 grep -v '^ *+' conftest.er1 >conftest.err
9178 rm -f conftest.er1
9179 cat conftest.err >&5
9180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9181 (exit $ac_status); } && {
9182 test -z "$ac_c_werror_flag" ||
9183 test ! -s conftest.err
9184 } && test -s conftest.$ac_objext; then
9185 ac_cv_type_float=yes
9186else
9187 echo "$as_me: failed program was:" >&5
9188sed 's/^/| /' conftest.$ac_ext >&5
9189
9190 ac_cv_type_float=no
9191fi
9192
9193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9194fi
9195{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9196echo "${ECHO_T}$ac_cv_type_float" >&6; }
9197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198# The cast to long int works around a bug in the HP C Compiler
9199# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9200# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9201# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009202{ echo "$as_me:$LINENO: checking size of float" >&5
9203echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009205 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009206else
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 if test "$cross_compiling" = yes; then
9208 # Depending upon the size, compute the lo and hi bounds.
9209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009210/* confdefs.h. */
9211_ACEOF
9212cat confdefs.h >>conftest.$ac_ext
9213cat >>conftest.$ac_ext <<_ACEOF
9214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009215$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009216 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009217int
9218main ()
9219{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009221test_array [0] = 0
9222
9223 ;
9224 return 0;
9225}
9226_ACEOF
9227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228if { (ac_try="$ac_compile"
9229case "(($ac_try" in
9230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9231 *) ac_try_echo=$ac_try;;
9232esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009236 grep -v '^ *+' conftest.er1 >conftest.err
9237 rm -f conftest.er1
9238 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240 (exit $ac_status); } && {
9241 test -z "$ac_c_werror_flag" ||
9242 test ! -s conftest.err
9243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_lo=0 ac_mid=0
9245 while :; do
9246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* confdefs.h. */
9248_ACEOF
9249cat confdefs.h >>conftest.$ac_ext
9250cat >>conftest.$ac_ext <<_ACEOF
9251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009252$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009253 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009254int
9255main ()
9256{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009258test_array [0] = 0
9259
9260 ;
9261 return 0;
9262}
9263_ACEOF
9264rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265if { (ac_try="$ac_compile"
9266case "(($ac_try" in
9267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9268 *) ac_try_echo=$ac_try;;
9269esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009273 grep -v '^ *+' conftest.er1 >conftest.err
9274 rm -f conftest.er1
9275 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277 (exit $ac_status); } && {
9278 test -z "$ac_c_werror_flag" ||
9279 test ! -s conftest.err
9280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_hi=$ac_mid; break
9282else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009284sed 's/^/| /' conftest.$ac_ext >&5
9285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009286 ac_lo=`expr $ac_mid + 1`
9287 if test $ac_lo -le $ac_mid; then
9288 ac_lo= ac_hi=
9289 break
9290 fi
9291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293
9294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 done
9296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009298sed 's/^/| /' conftest.$ac_ext >&5
9299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009301/* confdefs.h. */
9302_ACEOF
9303cat confdefs.h >>conftest.$ac_ext
9304cat >>conftest.$ac_ext <<_ACEOF
9305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009306$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009307 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009308int
9309main ()
9310{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009312test_array [0] = 0
9313
9314 ;
9315 return 0;
9316}
9317_ACEOF
9318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319if { (ac_try="$ac_compile"
9320case "(($ac_try" in
9321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9322 *) ac_try_echo=$ac_try;;
9323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009327 grep -v '^ *+' conftest.er1 >conftest.err
9328 rm -f conftest.er1
9329 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 (exit $ac_status); } && {
9332 test -z "$ac_c_werror_flag" ||
9333 test ! -s conftest.err
9334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_hi=-1 ac_mid=-1
9336 while :; do
9337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* confdefs.h. */
9339_ACEOF
9340cat confdefs.h >>conftest.$ac_ext
9341cat >>conftest.$ac_ext <<_ACEOF
9342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009344 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009345int
9346main ()
9347{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009349test_array [0] = 0
9350
9351 ;
9352 return 0;
9353}
9354_ACEOF
9355rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356if { (ac_try="$ac_compile"
9357case "(($ac_try" in
9358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359 *) ac_try_echo=$ac_try;;
9360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009364 grep -v '^ *+' conftest.er1 >conftest.err
9365 rm -f conftest.er1
9366 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368 (exit $ac_status); } && {
9369 test -z "$ac_c_werror_flag" ||
9370 test ! -s conftest.err
9371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_lo=$ac_mid; break
9373else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009375sed 's/^/| /' conftest.$ac_ext >&5
9376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377 ac_hi=`expr '(' $ac_mid ')' - 1`
9378 if test $ac_mid -le $ac_hi; then
9379 ac_lo= ac_hi=
9380 break
9381 fi
9382 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384
9385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 done
9387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009389sed 's/^/| /' conftest.$ac_ext >&5
9390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009391 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393
9394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396
9397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009398# Binary search between lo and hi bounds.
9399while test "x$ac_lo" != "x$ac_hi"; do
9400 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* confdefs.h. */
9403_ACEOF
9404cat confdefs.h >>conftest.$ac_ext
9405cat >>conftest.$ac_ext <<_ACEOF
9406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009408 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009409int
9410main ()
9411{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009412static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009413test_array [0] = 0
9414
9415 ;
9416 return 0;
9417}
9418_ACEOF
9419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420if { (ac_try="$ac_compile"
9421case "(($ac_try" in
9422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9423 *) ac_try_echo=$ac_try;;
9424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009428 grep -v '^ *+' conftest.er1 >conftest.err
9429 rm -f conftest.er1
9430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 (exit $ac_status); } && {
9433 test -z "$ac_c_werror_flag" ||
9434 test ! -s conftest.err
9435 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_hi=$ac_mid
9437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009438 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009439sed 's/^/| /' conftest.$ac_ext >&5
9440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443
9444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009445done
9446case $ac_lo in
9447?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009449 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009450See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009451echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009452See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009453 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 else
9455 ac_cv_sizeof_float=0
9456 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009457esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* confdefs.h. */
9461_ACEOF
9462cat confdefs.h >>conftest.$ac_ext
9463cat >>conftest.$ac_ext <<_ACEOF
9464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466 typedef float ac__type_sizeof_;
9467static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9468static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009469#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009470#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009471int
9472main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009473{
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
9475 FILE *f = fopen ("conftest.val", "w");
9476 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009478 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009481 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009483 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 }
9485 else
9486 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009490 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
9494 ;
9495 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009496}
Martin v. Löwis11437992002-04-12 09:54:03 +00009497_ACEOF
9498rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499if { (ac_try="$ac_link"
9500case "(($ac_try" in
9501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9502 *) ac_try_echo=$ac_try;;
9503esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509 { (case "(($ac_try" in
9510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9511 *) ac_try_echo=$ac_try;;
9512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 (exit $ac_status); }; }; then
9518 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009520 echo "$as_me: program exited with status $ac_status" >&5
9521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009522sed 's/^/| /' conftest.$ac_ext >&5
9523
Martin v. Löwis11437992002-04-12 09:54:03 +00009524( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009525if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009526 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009527See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009528echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009529See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009530 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009531 else
9532 ac_cv_sizeof_float=0
9533 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535rm -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 +00009536fi
9537rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009538fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009539{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9540echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541
9542
9543
Martin v. Löwis11437992002-04-12 09:54:03 +00009544cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009545#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009546_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009547
9548
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009549{ echo "$as_me:$LINENO: checking for double" >&5
9550echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9551if test "${ac_cv_type_double+set}" = set; then
9552 echo $ECHO_N "(cached) $ECHO_C" >&6
9553else
9554 cat >conftest.$ac_ext <<_ACEOF
9555/* confdefs.h. */
9556_ACEOF
9557cat confdefs.h >>conftest.$ac_ext
9558cat >>conftest.$ac_ext <<_ACEOF
9559/* end confdefs.h. */
9560$ac_includes_default
9561typedef double ac__type_new_;
9562int
9563main ()
9564{
9565if ((ac__type_new_ *) 0)
9566 return 0;
9567if (sizeof (ac__type_new_))
9568 return 0;
9569 ;
9570 return 0;
9571}
9572_ACEOF
9573rm -f conftest.$ac_objext
9574if { (ac_try="$ac_compile"
9575case "(($ac_try" in
9576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9577 *) ac_try_echo=$ac_try;;
9578esac
9579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9580 (eval "$ac_compile") 2>conftest.er1
9581 ac_status=$?
9582 grep -v '^ *+' conftest.er1 >conftest.err
9583 rm -f conftest.er1
9584 cat conftest.err >&5
9585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9586 (exit $ac_status); } && {
9587 test -z "$ac_c_werror_flag" ||
9588 test ! -s conftest.err
9589 } && test -s conftest.$ac_objext; then
9590 ac_cv_type_double=yes
9591else
9592 echo "$as_me: failed program was:" >&5
9593sed 's/^/| /' conftest.$ac_ext >&5
9594
9595 ac_cv_type_double=no
9596fi
9597
9598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9599fi
9600{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9601echo "${ECHO_T}$ac_cv_type_double" >&6; }
9602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603# The cast to long int works around a bug in the HP C Compiler
9604# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9605# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9606# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009607{ echo "$as_me:$LINENO: checking size of double" >&5
9608echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009609if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009610 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009611else
Martin v. Löwis11437992002-04-12 09:54:03 +00009612 if test "$cross_compiling" = yes; then
9613 # Depending upon the size, compute the lo and hi bounds.
9614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009615/* confdefs.h. */
9616_ACEOF
9617cat confdefs.h >>conftest.$ac_ext
9618cat >>conftest.$ac_ext <<_ACEOF
9619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009621 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009622int
9623main ()
9624{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009625static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009626test_array [0] = 0
9627
9628 ;
9629 return 0;
9630}
9631_ACEOF
9632rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633if { (ac_try="$ac_compile"
9634case "(($ac_try" in
9635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9636 *) ac_try_echo=$ac_try;;
9637esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009641 grep -v '^ *+' conftest.er1 >conftest.err
9642 rm -f conftest.er1
9643 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009645 (exit $ac_status); } && {
9646 test -z "$ac_c_werror_flag" ||
9647 test ! -s conftest.err
9648 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_lo=0 ac_mid=0
9650 while :; do
9651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* confdefs.h. */
9653_ACEOF
9654cat confdefs.h >>conftest.$ac_ext
9655cat >>conftest.$ac_ext <<_ACEOF
9656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009657$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009658 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009663test_array [0] = 0
9664
9665 ;
9666 return 0;
9667}
9668_ACEOF
9669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670if { (ac_try="$ac_compile"
9671case "(($ac_try" in
9672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9673 *) ac_try_echo=$ac_try;;
9674esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678 grep -v '^ *+' conftest.er1 >conftest.err
9679 rm -f conftest.er1
9680 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682 (exit $ac_status); } && {
9683 test -z "$ac_c_werror_flag" ||
9684 test ! -s conftest.err
9685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ac_hi=$ac_mid; break
9687else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009689sed 's/^/| /' conftest.$ac_ext >&5
9690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691 ac_lo=`expr $ac_mid + 1`
9692 if test $ac_lo -le $ac_mid; then
9693 ac_lo= ac_hi=
9694 break
9695 fi
9696 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698
9699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700 done
9701else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009703sed 's/^/| /' conftest.$ac_ext >&5
9704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* confdefs.h. */
9707_ACEOF
9708cat confdefs.h >>conftest.$ac_ext
9709cat >>conftest.$ac_ext <<_ACEOF
9710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009711$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009712 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009717test_array [0] = 0
9718
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724if { (ac_try="$ac_compile"
9725case "(($ac_try" in
9726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9727 *) ac_try_echo=$ac_try;;
9728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009732 grep -v '^ *+' conftest.er1 >conftest.err
9733 rm -f conftest.er1
9734 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 (exit $ac_status); } && {
9737 test -z "$ac_c_werror_flag" ||
9738 test ! -s conftest.err
9739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_hi=-1 ac_mid=-1
9741 while :; do
9742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009749 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009750int
9751main ()
9752{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009754test_array [0] = 0
9755
9756 ;
9757 return 0;
9758}
9759_ACEOF
9760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761if { (ac_try="$ac_compile"
9762case "(($ac_try" in
9763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9764 *) ac_try_echo=$ac_try;;
9765esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009769 grep -v '^ *+' conftest.er1 >conftest.err
9770 rm -f conftest.er1
9771 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 (exit $ac_status); } && {
9774 test -z "$ac_c_werror_flag" ||
9775 test ! -s conftest.err
9776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_lo=$ac_mid; break
9778else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009780sed 's/^/| /' conftest.$ac_ext >&5
9781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782 ac_hi=`expr '(' $ac_mid ')' - 1`
9783 if test $ac_mid -le $ac_hi; then
9784 ac_lo= ac_hi=
9785 break
9786 fi
9787 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789
9790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 done
9792else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009794sed 's/^/| /' conftest.$ac_ext >&5
9795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009796 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009798
9799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801
9802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803# Binary search between lo and hi bounds.
9804while test "x$ac_lo" != "x$ac_hi"; do
9805 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* confdefs.h. */
9808_ACEOF
9809cat confdefs.h >>conftest.$ac_ext
9810cat >>conftest.$ac_ext <<_ACEOF
9811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009813 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009814int
9815main ()
9816{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009817static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009818test_array [0] = 0
9819
9820 ;
9821 return 0;
9822}
9823_ACEOF
9824rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825if { (ac_try="$ac_compile"
9826case "(($ac_try" in
9827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9828 *) ac_try_echo=$ac_try;;
9829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009833 grep -v '^ *+' conftest.er1 >conftest.err
9834 rm -f conftest.er1
9835 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 (exit $ac_status); } && {
9838 test -z "$ac_c_werror_flag" ||
9839 test ! -s conftest.err
9840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_hi=$ac_mid
9842else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009844sed 's/^/| /' conftest.$ac_ext >&5
9845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848
9849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850done
9851case $ac_lo in
9852?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009854 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009855See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009856echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009857See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009858 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 else
9860 ac_cv_sizeof_double=0
9861 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009862esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009863else
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* confdefs.h. */
9866_ACEOF
9867cat confdefs.h >>conftest.$ac_ext
9868cat >>conftest.$ac_ext <<_ACEOF
9869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871 typedef double ac__type_sizeof_;
9872static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9873static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009874#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009875#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009876int
9877main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009878{
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
9880 FILE *f = fopen ("conftest.val", "w");
9881 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009883 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009884 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009886 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009888 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009889 }
9890 else
9891 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009895 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009898
9899 ;
9900 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009901}
Martin v. Löwis11437992002-04-12 09:54:03 +00009902_ACEOF
9903rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904if { (ac_try="$ac_link"
9905case "(($ac_try" in
9906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9907 *) ac_try_echo=$ac_try;;
9908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914 { (case "(($ac_try" in
9915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9916 *) ac_try_echo=$ac_try;;
9917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 (exit $ac_status); }; }; then
9923 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009924else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009925 echo "$as_me: program exited with status $ac_status" >&5
9926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009927sed 's/^/| /' conftest.$ac_ext >&5
9928
Martin v. Löwis11437992002-04-12 09:54:03 +00009929( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009931 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009932See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009933echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009934See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009935 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936 else
9937 ac_cv_sizeof_double=0
9938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940rm -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 +00009941fi
9942rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009943fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009944{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9945echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009946
9947
9948
Martin v. Löwis11437992002-04-12 09:54:03 +00009949cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009950#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009951_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009952
9953
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009954{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9955echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9956if test "${ac_cv_type_fpos_t+set}" = set; then
9957 echo $ECHO_N "(cached) $ECHO_C" >&6
9958else
9959 cat >conftest.$ac_ext <<_ACEOF
9960/* confdefs.h. */
9961_ACEOF
9962cat confdefs.h >>conftest.$ac_ext
9963cat >>conftest.$ac_ext <<_ACEOF
9964/* end confdefs.h. */
9965$ac_includes_default
9966typedef fpos_t ac__type_new_;
9967int
9968main ()
9969{
9970if ((ac__type_new_ *) 0)
9971 return 0;
9972if (sizeof (ac__type_new_))
9973 return 0;
9974 ;
9975 return 0;
9976}
9977_ACEOF
9978rm -f conftest.$ac_objext
9979if { (ac_try="$ac_compile"
9980case "(($ac_try" in
9981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9982 *) ac_try_echo=$ac_try;;
9983esac
9984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9985 (eval "$ac_compile") 2>conftest.er1
9986 ac_status=$?
9987 grep -v '^ *+' conftest.er1 >conftest.err
9988 rm -f conftest.er1
9989 cat conftest.err >&5
9990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9991 (exit $ac_status); } && {
9992 test -z "$ac_c_werror_flag" ||
9993 test ! -s conftest.err
9994 } && test -s conftest.$ac_objext; then
9995 ac_cv_type_fpos_t=yes
9996else
9997 echo "$as_me: failed program was:" >&5
9998sed 's/^/| /' conftest.$ac_ext >&5
9999
10000 ac_cv_type_fpos_t=no
10001fi
10002
10003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10004fi
10005{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10006echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008# The cast to long int works around a bug in the HP C Compiler
10009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10011# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010012{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10013echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010014if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010015 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010016else
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 if test "$cross_compiling" = yes; then
10018 # Depending upon the size, compute the lo and hi bounds.
10019cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010020/* confdefs.h. */
10021_ACEOF
10022cat confdefs.h >>conftest.$ac_ext
10023cat >>conftest.$ac_ext <<_ACEOF
10024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010025$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010026 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010030static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010031test_array [0] = 0
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_lo=0 ac_mid=0
10055 while :; do
10056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* confdefs.h. */
10058_ACEOF
10059cat confdefs.h >>conftest.$ac_ext
10060cat >>conftest.$ac_ext <<_ACEOF
10061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010062$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010063 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064int
10065main ()
10066{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010068test_array [0] = 0
10069
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075if { (ac_try="$ac_compile"
10076case "(($ac_try" in
10077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10078 *) ac_try_echo=$ac_try;;
10079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087 (exit $ac_status); } && {
10088 test -z "$ac_c_werror_flag" ||
10089 test ! -s conftest.err
10090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 ac_hi=$ac_mid; break
10092else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010093 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010094sed 's/^/| /' conftest.$ac_ext >&5
10095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096 ac_lo=`expr $ac_mid + 1`
10097 if test $ac_lo -le $ac_mid; then
10098 ac_lo= ac_hi=
10099 break
10100 fi
10101 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103
10104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 done
10106else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010108sed 's/^/| /' conftest.$ac_ext >&5
10109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* confdefs.h. */
10112_ACEOF
10113cat confdefs.h >>conftest.$ac_ext
10114cat >>conftest.$ac_ext <<_ACEOF
10115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010116$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010117 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010118int
10119main ()
10120{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010122test_array [0] = 0
10123
10124 ;
10125 return 0;
10126}
10127_ACEOF
10128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129if { (ac_try="$ac_compile"
10130case "(($ac_try" in
10131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10132 *) ac_try_echo=$ac_try;;
10133esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010137 grep -v '^ *+' conftest.er1 >conftest.err
10138 rm -f conftest.er1
10139 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141 (exit $ac_status); } && {
10142 test -z "$ac_c_werror_flag" ||
10143 test ! -s conftest.err
10144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010145 ac_hi=-1 ac_mid=-1
10146 while :; do
10147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* confdefs.h. */
10149_ACEOF
10150cat confdefs.h >>conftest.$ac_ext
10151cat >>conftest.$ac_ext <<_ACEOF
10152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010154 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010155int
10156main ()
10157{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010159test_array [0] = 0
10160
10161 ;
10162 return 0;
10163}
10164_ACEOF
10165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166if { (ac_try="$ac_compile"
10167case "(($ac_try" in
10168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10169 *) ac_try_echo=$ac_try;;
10170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010174 grep -v '^ *+' conftest.er1 >conftest.err
10175 rm -f conftest.er1
10176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 (exit $ac_status); } && {
10179 test -z "$ac_c_werror_flag" ||
10180 test ! -s conftest.err
10181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_lo=$ac_mid; break
10183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010185sed 's/^/| /' conftest.$ac_ext >&5
10186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 ac_hi=`expr '(' $ac_mid ')' - 1`
10188 if test $ac_mid -le $ac_hi; then
10189 ac_lo= ac_hi=
10190 break
10191 fi
10192 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194
10195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 done
10197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010199sed 's/^/| /' conftest.$ac_ext >&5
10200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203
10204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206
10207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010208# Binary search between lo and hi bounds.
10209while test "x$ac_lo" != "x$ac_hi"; do
10210 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* confdefs.h. */
10213_ACEOF
10214cat confdefs.h >>conftest.$ac_ext
10215cat >>conftest.$ac_ext <<_ACEOF
10216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010217$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010218 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010219int
10220main ()
10221{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010222static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010223test_array [0] = 0
10224
10225 ;
10226 return 0;
10227}
10228_ACEOF
10229rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230if { (ac_try="$ac_compile"
10231case "(($ac_try" in
10232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10233 *) ac_try_echo=$ac_try;;
10234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010238 grep -v '^ *+' conftest.er1 >conftest.err
10239 rm -f conftest.er1
10240 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 (exit $ac_status); } && {
10243 test -z "$ac_c_werror_flag" ||
10244 test ! -s conftest.err
10245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 ac_hi=$ac_mid
10247else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010249sed 's/^/| /' conftest.$ac_ext >&5
10250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253
10254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010255done
10256case $ac_lo in
10257?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010259 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010260See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010261echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010262See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010263 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 else
10265 ac_cv_sizeof_fpos_t=0
10266 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010267esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010268else
Martin v. Löwis11437992002-04-12 09:54:03 +000010269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010270/* confdefs.h. */
10271_ACEOF
10272cat confdefs.h >>conftest.$ac_ext
10273cat >>conftest.$ac_ext <<_ACEOF
10274/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010275$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276 typedef fpos_t ac__type_sizeof_;
10277static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10278static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010279#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010280#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010281int
10282main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010283{
Martin v. Löwis11437992002-04-12 09:54:03 +000010284
10285 FILE *f = fopen ("conftest.val", "w");
10286 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010288 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010291 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010293 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 }
10295 else
10296 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010298 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010300 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010303
10304 ;
10305 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010306}
Martin v. Löwis11437992002-04-12 09:54:03 +000010307_ACEOF
10308rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309if { (ac_try="$ac_link"
10310case "(($ac_try" in
10311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10312 *) ac_try_echo=$ac_try;;
10313esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010319 { (case "(($ac_try" in
10320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10321 *) ac_try_echo=$ac_try;;
10322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010325 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 (exit $ac_status); }; }; then
10328 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010329else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010330 echo "$as_me: program exited with status $ac_status" >&5
10331echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010332sed 's/^/| /' conftest.$ac_ext >&5
10333
Martin v. Löwis11437992002-04-12 09:54:03 +000010334( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010335if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010336 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010337See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010338echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010339See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010340 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341 else
10342 ac_cv_sizeof_fpos_t=0
10343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010345rm -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 +000010346fi
10347rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010348fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010349{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10350echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351
10352
10353
Martin v. Löwis11437992002-04-12 09:54:03 +000010354cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010355#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010356_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010357
Michael W. Hudson54241132001-12-07 15:38:26 +000010358
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010359{ echo "$as_me:$LINENO: checking for size_t" >&5
10360echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10361if test "${ac_cv_type_size_t+set}" = set; then
10362 echo $ECHO_N "(cached) $ECHO_C" >&6
10363else
10364 cat >conftest.$ac_ext <<_ACEOF
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
10370$ac_includes_default
10371typedef size_t ac__type_new_;
10372int
10373main ()
10374{
10375if ((ac__type_new_ *) 0)
10376 return 0;
10377if (sizeof (ac__type_new_))
10378 return 0;
10379 ;
10380 return 0;
10381}
10382_ACEOF
10383rm -f conftest.$ac_objext
10384if { (ac_try="$ac_compile"
10385case "(($ac_try" in
10386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10387 *) ac_try_echo=$ac_try;;
10388esac
10389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10390 (eval "$ac_compile") 2>conftest.er1
10391 ac_status=$?
10392 grep -v '^ *+' conftest.er1 >conftest.err
10393 rm -f conftest.er1
10394 cat conftest.err >&5
10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10396 (exit $ac_status); } && {
10397 test -z "$ac_c_werror_flag" ||
10398 test ! -s conftest.err
10399 } && test -s conftest.$ac_objext; then
10400 ac_cv_type_size_t=yes
10401else
10402 echo "$as_me: failed program was:" >&5
10403sed 's/^/| /' conftest.$ac_ext >&5
10404
10405 ac_cv_type_size_t=no
10406fi
10407
10408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10409fi
10410{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10411echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413# The cast to long int works around a bug in the HP C Compiler
10414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10416# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010417{ echo "$as_me:$LINENO: checking size of size_t" >&5
10418echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010420 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010422 if test "$cross_compiling" = yes; then
10423 # Depending upon the size, compute the lo and hi bounds.
10424cat >conftest.$ac_ext <<_ACEOF
10425/* confdefs.h. */
10426_ACEOF
10427cat confdefs.h >>conftest.$ac_ext
10428cat >>conftest.$ac_ext <<_ACEOF
10429/* end confdefs.h. */
10430$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010431 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432int
10433main ()
10434{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010436test_array [0] = 0
10437
10438 ;
10439 return 0;
10440}
10441_ACEOF
10442rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443if { (ac_try="$ac_compile"
10444case "(($ac_try" in
10445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10446 *) ac_try_echo=$ac_try;;
10447esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450 ac_status=$?
10451 grep -v '^ *+' conftest.er1 >conftest.err
10452 rm -f conftest.er1
10453 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455 (exit $ac_status); } && {
10456 test -z "$ac_c_werror_flag" ||
10457 test ! -s conftest.err
10458 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459 ac_lo=0 ac_mid=0
10460 while :; do
10461 cat >conftest.$ac_ext <<_ACEOF
10462/* confdefs.h. */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h. */
10467$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010468 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469int
10470main ()
10471{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473test_array [0] = 0
10474
10475 ;
10476 return 0;
10477}
10478_ACEOF
10479rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480if { (ac_try="$ac_compile"
10481case "(($ac_try" in
10482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10483 *) ac_try_echo=$ac_try;;
10484esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487 ac_status=$?
10488 grep -v '^ *+' conftest.er1 >conftest.err
10489 rm -f conftest.er1
10490 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492 (exit $ac_status); } && {
10493 test -z "$ac_c_werror_flag" ||
10494 test ! -s conftest.err
10495 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496 ac_hi=$ac_mid; break
10497else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010498 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499sed 's/^/| /' conftest.$ac_ext >&5
10500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501 ac_lo=`expr $ac_mid + 1`
10502 if test $ac_lo -le $ac_mid; then
10503 ac_lo= ac_hi=
10504 break
10505 fi
10506 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508
10509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510 done
10511else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010512 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010513sed 's/^/| /' conftest.$ac_ext >&5
10514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010515 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516/* confdefs.h. */
10517_ACEOF
10518cat confdefs.h >>conftest.$ac_ext
10519cat >>conftest.$ac_ext <<_ACEOF
10520/* end confdefs.h. */
10521$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010522 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523int
10524main ()
10525{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010527test_array [0] = 0
10528
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534if { (ac_try="$ac_compile"
10535case "(($ac_try" in
10536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10537 *) ac_try_echo=$ac_try;;
10538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541 ac_status=$?
10542 grep -v '^ *+' conftest.er1 >conftest.err
10543 rm -f conftest.er1
10544 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010546 (exit $ac_status); } && {
10547 test -z "$ac_c_werror_flag" ||
10548 test ! -s conftest.err
10549 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550 ac_hi=-1 ac_mid=-1
10551 while :; do
10552 cat >conftest.$ac_ext <<_ACEOF
10553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
10558$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010559 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560int
10561main ()
10562{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564test_array [0] = 0
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571if { (ac_try="$ac_compile"
10572case "(($ac_try" in
10573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10574 *) ac_try_echo=$ac_try;;
10575esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578 ac_status=$?
10579 grep -v '^ *+' conftest.er1 >conftest.err
10580 rm -f conftest.er1
10581 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583 (exit $ac_status); } && {
10584 test -z "$ac_c_werror_flag" ||
10585 test ! -s conftest.err
10586 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587 ac_lo=$ac_mid; break
10588else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010589 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590sed 's/^/| /' conftest.$ac_ext >&5
10591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592 ac_hi=`expr '(' $ac_mid ')' - 1`
10593 if test $ac_mid -le $ac_hi; then
10594 ac_lo= ac_hi=
10595 break
10596 fi
10597 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599
10600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 done
10602else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010603 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010604sed 's/^/| /' conftest.$ac_ext >&5
10605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608
10609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611
10612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613# Binary search between lo and hi bounds.
10614while test "x$ac_lo" != "x$ac_hi"; do
10615 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10616 cat >conftest.$ac_ext <<_ACEOF
10617/* confdefs.h. */
10618_ACEOF
10619cat confdefs.h >>conftest.$ac_ext
10620cat >>conftest.$ac_ext <<_ACEOF
10621/* end confdefs.h. */
10622$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010623 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624int
10625main ()
10626{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010628test_array [0] = 0
10629
10630 ;
10631 return 0;
10632}
10633_ACEOF
10634rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635if { (ac_try="$ac_compile"
10636case "(($ac_try" in
10637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10638 *) ac_try_echo=$ac_try;;
10639esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010642 ac_status=$?
10643 grep -v '^ *+' conftest.er1 >conftest.err
10644 rm -f conftest.er1
10645 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 (exit $ac_status); } && {
10648 test -z "$ac_c_werror_flag" ||
10649 test ! -s conftest.err
10650 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010651 ac_hi=$ac_mid
10652else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010653 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654sed 's/^/| /' conftest.$ac_ext >&5
10655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658
10659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660done
10661case $ac_lo in
10662?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010664 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010665See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010666echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010668 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669 else
10670 ac_cv_sizeof_size_t=0
10671 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010672esac
10673else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674 cat >conftest.$ac_ext <<_ACEOF
10675/* confdefs.h. */
10676_ACEOF
10677cat confdefs.h >>conftest.$ac_ext
10678cat >>conftest.$ac_ext <<_ACEOF
10679/* end confdefs.h. */
10680$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681 typedef size_t ac__type_sizeof_;
10682static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10683static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684#include <stdio.h>
10685#include <stdlib.h>
10686int
10687main ()
10688{
10689
10690 FILE *f = fopen ("conftest.val", "w");
10691 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010693 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010694 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010696 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010698 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699 }
10700 else
10701 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010703 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010705 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010706 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010708
10709 ;
10710 return 0;
10711}
10712_ACEOF
10713rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714if { (ac_try="$ac_link"
10715case "(($ac_try" in
10716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10717 *) ac_try_echo=$ac_try;;
10718esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724 { (case "(($ac_try" in
10725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10726 *) ac_try_echo=$ac_try;;
10727esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010730 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010732 (exit $ac_status); }; }; then
10733 ac_cv_sizeof_size_t=`cat conftest.val`
10734else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010735 echo "$as_me: program exited with status $ac_status" >&5
10736echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737sed 's/^/| /' conftest.$ac_ext >&5
10738
10739( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010741 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010743echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010744See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010745 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746 else
10747 ac_cv_sizeof_size_t=0
10748 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750rm -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 +000010751fi
10752rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010754{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10755echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756
10757
10758
Martin v. Löwis18e16552006-02-15 17:27:45 +000010759cat >>confdefs.h <<_ACEOF
10760#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10761_ACEOF
10762
10763
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010764{ echo "$as_me:$LINENO: checking for pid_t" >&5
10765echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10766if test "${ac_cv_type_pid_t+set}" = set; then
10767 echo $ECHO_N "(cached) $ECHO_C" >&6
10768else
10769 cat >conftest.$ac_ext <<_ACEOF
10770/* confdefs.h. */
10771_ACEOF
10772cat confdefs.h >>conftest.$ac_ext
10773cat >>conftest.$ac_ext <<_ACEOF
10774/* end confdefs.h. */
10775$ac_includes_default
10776typedef pid_t ac__type_new_;
10777int
10778main ()
10779{
10780if ((ac__type_new_ *) 0)
10781 return 0;
10782if (sizeof (ac__type_new_))
10783 return 0;
10784 ;
10785 return 0;
10786}
10787_ACEOF
10788rm -f conftest.$ac_objext
10789if { (ac_try="$ac_compile"
10790case "(($ac_try" in
10791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10792 *) ac_try_echo=$ac_try;;
10793esac
10794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10795 (eval "$ac_compile") 2>conftest.er1
10796 ac_status=$?
10797 grep -v '^ *+' conftest.er1 >conftest.err
10798 rm -f conftest.er1
10799 cat conftest.err >&5
10800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10801 (exit $ac_status); } && {
10802 test -z "$ac_c_werror_flag" ||
10803 test ! -s conftest.err
10804 } && test -s conftest.$ac_objext; then
10805 ac_cv_type_pid_t=yes
10806else
10807 echo "$as_me: failed program was:" >&5
10808sed 's/^/| /' conftest.$ac_ext >&5
10809
10810 ac_cv_type_pid_t=no
10811fi
10812
10813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10814fi
10815{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10816echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10817
Christian Heimes400adb02008-02-01 08:12:03 +000010818# The cast to long int works around a bug in the HP C Compiler
10819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10821# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010822{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10823echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010824if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010825 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010826else
10827 if test "$cross_compiling" = yes; then
10828 # Depending upon the size, compute the lo and hi bounds.
10829cat >conftest.$ac_ext <<_ACEOF
10830/* confdefs.h. */
10831_ACEOF
10832cat confdefs.h >>conftest.$ac_ext
10833cat >>conftest.$ac_ext <<_ACEOF
10834/* end confdefs.h. */
10835$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010836 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010837int
10838main ()
10839{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010840static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010841test_array [0] = 0
10842
10843 ;
10844 return 0;
10845}
10846_ACEOF
10847rm -f conftest.$ac_objext
10848if { (ac_try="$ac_compile"
10849case "(($ac_try" in
10850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10851 *) ac_try_echo=$ac_try;;
10852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854 (eval "$ac_compile") 2>conftest.er1
10855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
10864 ac_lo=0 ac_mid=0
10865 while :; do
10866 cat >conftest.$ac_ext <<_ACEOF
10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
10872$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010873 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010874int
10875main ()
10876{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010878test_array [0] = 0
10879
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884rm -f conftest.$ac_objext
10885if { (ac_try="$ac_compile"
10886case "(($ac_try" in
10887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10888 *) ac_try_echo=$ac_try;;
10889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (eval "$ac_compile") 2>conftest.er1
10892 ac_status=$?
10893 grep -v '^ *+' conftest.er1 >conftest.err
10894 rm -f conftest.er1
10895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010897 (exit $ac_status); } && {
10898 test -z "$ac_c_werror_flag" ||
10899 test ! -s conftest.err
10900 } && test -s conftest.$ac_objext; then
10901 ac_hi=$ac_mid; break
10902else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010903 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010904sed 's/^/| /' conftest.$ac_ext >&5
10905
10906 ac_lo=`expr $ac_mid + 1`
10907 if test $ac_lo -le $ac_mid; then
10908 ac_lo= ac_hi=
10909 break
10910 fi
10911 ac_mid=`expr 2 '*' $ac_mid + 1`
10912fi
10913
10914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10915 done
10916else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010917 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010918sed 's/^/| /' conftest.$ac_ext >&5
10919
10920 cat >conftest.$ac_ext <<_ACEOF
10921/* confdefs.h. */
10922_ACEOF
10923cat confdefs.h >>conftest.$ac_ext
10924cat >>conftest.$ac_ext <<_ACEOF
10925/* end confdefs.h. */
10926$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010927 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010928int
10929main ()
10930{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010932test_array [0] = 0
10933
10934 ;
10935 return 0;
10936}
10937_ACEOF
10938rm -f conftest.$ac_objext
10939if { (ac_try="$ac_compile"
10940case "(($ac_try" in
10941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10942 *) ac_try_echo=$ac_try;;
10943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010945 (eval "$ac_compile") 2>conftest.er1
10946 ac_status=$?
10947 grep -v '^ *+' conftest.er1 >conftest.err
10948 rm -f conftest.er1
10949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010951 (exit $ac_status); } && {
10952 test -z "$ac_c_werror_flag" ||
10953 test ! -s conftest.err
10954 } && test -s conftest.$ac_objext; then
10955 ac_hi=-1 ac_mid=-1
10956 while :; do
10957 cat >conftest.$ac_ext <<_ACEOF
10958/* confdefs.h. */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h. */
10963$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010964 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010965int
10966main ()
10967{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010969test_array [0] = 0
10970
10971 ;
10972 return 0;
10973}
10974_ACEOF
10975rm -f conftest.$ac_objext
10976if { (ac_try="$ac_compile"
10977case "(($ac_try" in
10978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10979 *) ac_try_echo=$ac_try;;
10980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982 (eval "$ac_compile") 2>conftest.er1
10983 ac_status=$?
10984 grep -v '^ *+' conftest.er1 >conftest.err
10985 rm -f conftest.er1
10986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010988 (exit $ac_status); } && {
10989 test -z "$ac_c_werror_flag" ||
10990 test ! -s conftest.err
10991 } && test -s conftest.$ac_objext; then
10992 ac_lo=$ac_mid; break
10993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010994 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010995sed 's/^/| /' conftest.$ac_ext >&5
10996
10997 ac_hi=`expr '(' $ac_mid ')' - 1`
10998 if test $ac_mid -le $ac_hi; then
10999 ac_lo= ac_hi=
11000 break
11001 fi
11002 ac_mid=`expr 2 '*' $ac_mid`
11003fi
11004
11005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006 done
11007else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011008 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011009sed 's/^/| /' conftest.$ac_ext >&5
11010
11011 ac_lo= ac_hi=
11012fi
11013
11014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11015fi
11016
11017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11018# Binary search between lo and hi bounds.
11019while test "x$ac_lo" != "x$ac_hi"; do
11020 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11021 cat >conftest.$ac_ext <<_ACEOF
11022/* confdefs.h. */
11023_ACEOF
11024cat confdefs.h >>conftest.$ac_ext
11025cat >>conftest.$ac_ext <<_ACEOF
11026/* end confdefs.h. */
11027$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011028 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000011029int
11030main ()
11031{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011033test_array [0] = 0
11034
11035 ;
11036 return 0;
11037}
11038_ACEOF
11039rm -f conftest.$ac_objext
11040if { (ac_try="$ac_compile"
11041case "(($ac_try" in
11042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11043 *) ac_try_echo=$ac_try;;
11044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011046 (eval "$ac_compile") 2>conftest.er1
11047 ac_status=$?
11048 grep -v '^ *+' conftest.er1 >conftest.err
11049 rm -f conftest.er1
11050 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011052 (exit $ac_status); } && {
11053 test -z "$ac_c_werror_flag" ||
11054 test ! -s conftest.err
11055 } && test -s conftest.$ac_objext; then
11056 ac_hi=$ac_mid
11057else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011058 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011059sed 's/^/| /' conftest.$ac_ext >&5
11060
11061 ac_lo=`expr '(' $ac_mid ')' + 1`
11062fi
11063
11064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11065done
11066case $ac_lo in
11067?*) ac_cv_sizeof_pid_t=$ac_lo;;
11068'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011069 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011070See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011071echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011072See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011073 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011074 else
11075 ac_cv_sizeof_pid_t=0
11076 fi ;;
11077esac
11078else
11079 cat >conftest.$ac_ext <<_ACEOF
11080/* confdefs.h. */
11081_ACEOF
11082cat confdefs.h >>conftest.$ac_ext
11083cat >>conftest.$ac_ext <<_ACEOF
11084/* end confdefs.h. */
11085$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086 typedef pid_t ac__type_sizeof_;
11087static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11088static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011089#include <stdio.h>
11090#include <stdlib.h>
11091int
11092main ()
11093{
11094
11095 FILE *f = fopen ("conftest.val", "w");
11096 if (! f)
11097 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011098 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011099 {
11100 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011101 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011102 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011103 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011104 }
11105 else
11106 {
11107 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011108 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011109 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011110 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011111 }
11112 return ferror (f) || fclose (f) != 0;
11113
11114 ;
11115 return 0;
11116}
11117_ACEOF
11118rm -f conftest$ac_exeext
11119if { (ac_try="$ac_link"
11120case "(($ac_try" in
11121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11122 *) ac_try_echo=$ac_try;;
11123esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011125 (eval "$ac_link") 2>&5
11126 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11129 { (case "(($ac_try" in
11130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11131 *) ac_try_echo=$ac_try;;
11132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011134 (eval "$ac_try") 2>&5
11135 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011137 (exit $ac_status); }; }; then
11138 ac_cv_sizeof_pid_t=`cat conftest.val`
11139else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011140 echo "$as_me: program exited with status $ac_status" >&5
11141echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
11144( exit $ac_status )
11145if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011146 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011147See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011149See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011150 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011151 else
11152 ac_cv_sizeof_pid_t=0
11153 fi
11154fi
11155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11156fi
11157rm -f conftest.val
11158fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011159{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11160echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011161
11162
11163
11164cat >>confdefs.h <<_ACEOF
11165#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11166_ACEOF
11167
11168
Michael W. Hudson54241132001-12-07 15:38:26 +000011169
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011170{ echo "$as_me:$LINENO: checking for long long support" >&5
11171echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011172have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011174/* confdefs.h. */
11175_ACEOF
11176cat confdefs.h >>conftest.$ac_ext
11177cat >>conftest.$ac_ext <<_ACEOF
11178/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011179
Martin v. Löwis11437992002-04-12 09:54:03 +000011180int
11181main ()
11182{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011183long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 ;
11185 return 0;
11186}
11187_ACEOF
11188rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011189if { (ac_try="$ac_compile"
11190case "(($ac_try" in
11191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11192 *) ac_try_echo=$ac_try;;
11193esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011197 grep -v '^ *+' conftest.er1 >conftest.err
11198 rm -f conftest.er1
11199 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201 (exit $ac_status); } && {
11202 test -z "$ac_c_werror_flag" ||
11203 test ! -s conftest.err
11204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011205
11206
11207cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011208#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
11210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011211 have_long_long=yes
11212
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011213else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011215sed 's/^/| /' conftest.$ac_ext >&5
11216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219
11220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011221{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11222echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011223if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011224{ echo "$as_me:$LINENO: checking for long long" >&5
11225echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11226if test "${ac_cv_type_long_long+set}" = set; then
11227 echo $ECHO_N "(cached) $ECHO_C" >&6
11228else
11229 cat >conftest.$ac_ext <<_ACEOF
11230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
11235$ac_includes_default
11236typedef long long ac__type_new_;
11237int
11238main ()
11239{
11240if ((ac__type_new_ *) 0)
11241 return 0;
11242if (sizeof (ac__type_new_))
11243 return 0;
11244 ;
11245 return 0;
11246}
11247_ACEOF
11248rm -f conftest.$ac_objext
11249if { (ac_try="$ac_compile"
11250case "(($ac_try" in
11251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11252 *) ac_try_echo=$ac_try;;
11253esac
11254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11255 (eval "$ac_compile") 2>conftest.er1
11256 ac_status=$?
11257 grep -v '^ *+' conftest.er1 >conftest.err
11258 rm -f conftest.er1
11259 cat conftest.err >&5
11260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11261 (exit $ac_status); } && {
11262 test -z "$ac_c_werror_flag" ||
11263 test ! -s conftest.err
11264 } && test -s conftest.$ac_objext; then
11265 ac_cv_type_long_long=yes
11266else
11267 echo "$as_me: failed program was:" >&5
11268sed 's/^/| /' conftest.$ac_ext >&5
11269
11270 ac_cv_type_long_long=no
11271fi
11272
11273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11274fi
11275{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11276echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278# The cast to long int works around a bug in the HP C Compiler
11279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11281# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011282{ echo "$as_me:$LINENO: checking size of long long" >&5
11283echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011284if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011285 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011286else
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 if test "$cross_compiling" = yes; then
11288 # Depending upon the size, compute the lo and hi bounds.
11289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011290/* confdefs.h. */
11291_ACEOF
11292cat confdefs.h >>conftest.$ac_ext
11293cat >>conftest.$ac_ext <<_ACEOF
11294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011295$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011296 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011297int
11298main ()
11299{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011301test_array [0] = 0
11302
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011308if { (ac_try="$ac_compile"
11309case "(($ac_try" in
11310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11311 *) ac_try_echo=$ac_try;;
11312esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011316 grep -v '^ *+' conftest.er1 >conftest.err
11317 rm -f conftest.er1
11318 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011320 (exit $ac_status); } && {
11321 test -z "$ac_c_werror_flag" ||
11322 test ! -s conftest.err
11323 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011324 ac_lo=0 ac_mid=0
11325 while :; do
11326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* confdefs.h. */
11328_ACEOF
11329cat confdefs.h >>conftest.$ac_ext
11330cat >>conftest.$ac_ext <<_ACEOF
11331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011332$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011333 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011338test_array [0] = 0
11339
11340 ;
11341 return 0;
11342}
11343_ACEOF
11344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345if { (ac_try="$ac_compile"
11346case "(($ac_try" in
11347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11348 *) ac_try_echo=$ac_try;;
11349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011353 grep -v '^ *+' conftest.er1 >conftest.err
11354 rm -f conftest.er1
11355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357 (exit $ac_status); } && {
11358 test -z "$ac_c_werror_flag" ||
11359 test ! -s conftest.err
11360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_hi=$ac_mid; break
11362else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011364sed 's/^/| /' conftest.$ac_ext >&5
11365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366 ac_lo=`expr $ac_mid + 1`
11367 if test $ac_lo -le $ac_mid; then
11368 ac_lo= ac_hi=
11369 break
11370 fi
11371 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373
11374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 done
11376else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011378sed 's/^/| /' conftest.$ac_ext >&5
11379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* confdefs.h. */
11382_ACEOF
11383cat confdefs.h >>conftest.$ac_ext
11384cat >>conftest.$ac_ext <<_ACEOF
11385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011386$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011387 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011388int
11389main ()
11390{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011391static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011392test_array [0] = 0
11393
11394 ;
11395 return 0;
11396}
11397_ACEOF
11398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399if { (ac_try="$ac_compile"
11400case "(($ac_try" in
11401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402 *) ac_try_echo=$ac_try;;
11403esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011407 grep -v '^ *+' conftest.er1 >conftest.err
11408 rm -f conftest.er1
11409 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411 (exit $ac_status); } && {
11412 test -z "$ac_c_werror_flag" ||
11413 test ! -s conftest.err
11414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ac_hi=-1 ac_mid=-1
11416 while :; do
11417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* confdefs.h. */
11419_ACEOF
11420cat confdefs.h >>conftest.$ac_ext
11421cat >>conftest.$ac_ext <<_ACEOF
11422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011423$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011424 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011429test_array [0] = 0
11430
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436if { (ac_try="$ac_compile"
11437case "(($ac_try" in
11438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11439 *) ac_try_echo=$ac_try;;
11440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011444 grep -v '^ *+' conftest.er1 >conftest.err
11445 rm -f conftest.er1
11446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448 (exit $ac_status); } && {
11449 test -z "$ac_c_werror_flag" ||
11450 test ! -s conftest.err
11451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_lo=$ac_mid; break
11453else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011455sed 's/^/| /' conftest.$ac_ext >&5
11456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457 ac_hi=`expr '(' $ac_mid ')' - 1`
11458 if test $ac_mid -le $ac_hi; then
11459 ac_lo= ac_hi=
11460 break
11461 fi
11462 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464
11465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 done
11467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011469sed 's/^/| /' conftest.$ac_ext >&5
11470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011471 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473
11474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476
11477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011478# Binary search between lo and hi bounds.
11479while test "x$ac_lo" != "x$ac_hi"; do
11480 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011482/* confdefs.h. */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011487$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011488 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011489int
11490main ()
11491{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011492static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011493test_array [0] = 0
11494
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500if { (ac_try="$ac_compile"
11501case "(($ac_try" in
11502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11503 *) ac_try_echo=$ac_try;;
11504esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011508 grep -v '^ *+' conftest.er1 >conftest.err
11509 rm -f conftest.er1
11510 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 (exit $ac_status); } && {
11513 test -z "$ac_c_werror_flag" ||
11514 test ! -s conftest.err
11515 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 ac_hi=$ac_mid
11517else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011519sed 's/^/| /' conftest.$ac_ext >&5
11520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523
11524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525done
11526case $ac_lo in
11527?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011530See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011531echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011532See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011533 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534 else
11535 ac_cv_sizeof_long_long=0
11536 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011537esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011538else
Martin v. Löwis11437992002-04-12 09:54:03 +000011539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011540/* confdefs.h. */
11541_ACEOF
11542cat confdefs.h >>conftest.$ac_ext
11543cat >>conftest.$ac_ext <<_ACEOF
11544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011545$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546 typedef long long ac__type_sizeof_;
11547static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11548static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011549#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011550#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011551int
11552main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011553{
Martin v. Löwis11437992002-04-12 09:54:03 +000011554
11555 FILE *f = fopen ("conftest.val", "w");
11556 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011558 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011561 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011563 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011564 }
11565 else
11566 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011568 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011569 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011570 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
11574 ;
11575 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011576}
Martin v. Löwis11437992002-04-12 09:54:03 +000011577_ACEOF
11578rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579if { (ac_try="$ac_link"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011585 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589 { (case "(($ac_try" in
11590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11591 *) ac_try_echo=$ac_try;;
11592esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 (exit $ac_status); }; }; then
11598 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011600 echo "$as_me: program exited with status $ac_status" >&5
11601echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011602sed 's/^/| /' conftest.$ac_ext >&5
11603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011606 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011607See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011608echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011609See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011610 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011611 else
11612 ac_cv_sizeof_long_long=0
11613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615rm -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 +000011616fi
11617rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011618fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011619{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11620echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011621
11622
11623
Martin v. Löwis11437992002-04-12 09:54:03 +000011624cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011625#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011626_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011627
Michael W. Hudson54241132001-12-07 15:38:26 +000011628
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011629fi
11630
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011631{ echo "$as_me:$LINENO: checking for long double support" >&5
11632echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011633have_long_double=no
11634cat >conftest.$ac_ext <<_ACEOF
11635/* confdefs.h. */
11636_ACEOF
11637cat confdefs.h >>conftest.$ac_ext
11638cat >>conftest.$ac_ext <<_ACEOF
11639/* end confdefs.h. */
11640
11641int
11642main ()
11643{
11644long double x; x = (long double)0;
11645 ;
11646 return 0;
11647}
11648_ACEOF
11649rm -f conftest.$ac_objext
11650if { (ac_try="$ac_compile"
11651case "(($ac_try" in
11652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11653 *) ac_try_echo=$ac_try;;
11654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011656 (eval "$ac_compile") 2>conftest.er1
11657 ac_status=$?
11658 grep -v '^ *+' conftest.er1 >conftest.err
11659 rm -f conftest.er1
11660 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011662 (exit $ac_status); } && {
11663 test -z "$ac_c_werror_flag" ||
11664 test ! -s conftest.err
11665 } && test -s conftest.$ac_objext; then
11666
11667
11668cat >>confdefs.h <<\_ACEOF
11669#define HAVE_LONG_DOUBLE 1
11670_ACEOF
11671
11672 have_long_double=yes
11673
11674else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011675 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676sed 's/^/| /' conftest.$ac_ext >&5
11677
11678
11679fi
11680
11681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011682{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11683echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011684if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011685{ echo "$as_me:$LINENO: checking for long double" >&5
11686echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11687if test "${ac_cv_type_long_double+set}" = set; then
11688 echo $ECHO_N "(cached) $ECHO_C" >&6
11689else
11690 cat >conftest.$ac_ext <<_ACEOF
11691/* confdefs.h. */
11692_ACEOF
11693cat confdefs.h >>conftest.$ac_ext
11694cat >>conftest.$ac_ext <<_ACEOF
11695/* end confdefs.h. */
11696$ac_includes_default
11697typedef long double ac__type_new_;
11698int
11699main ()
11700{
11701if ((ac__type_new_ *) 0)
11702 return 0;
11703if (sizeof (ac__type_new_))
11704 return 0;
11705 ;
11706 return 0;
11707}
11708_ACEOF
11709rm -f conftest.$ac_objext
11710if { (ac_try="$ac_compile"
11711case "(($ac_try" in
11712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11713 *) ac_try_echo=$ac_try;;
11714esac
11715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11716 (eval "$ac_compile") 2>conftest.er1
11717 ac_status=$?
11718 grep -v '^ *+' conftest.er1 >conftest.err
11719 rm -f conftest.er1
11720 cat conftest.err >&5
11721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11722 (exit $ac_status); } && {
11723 test -z "$ac_c_werror_flag" ||
11724 test ! -s conftest.err
11725 } && test -s conftest.$ac_objext; then
11726 ac_cv_type_long_double=yes
11727else
11728 echo "$as_me: failed program was:" >&5
11729sed 's/^/| /' conftest.$ac_ext >&5
11730
11731 ac_cv_type_long_double=no
11732fi
11733
11734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11735fi
11736{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11737echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11738
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739# The cast to long int works around a bug in the HP C Compiler
11740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11742# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011743{ echo "$as_me:$LINENO: checking size of long double" >&5
11744echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011746 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011747else
11748 if test "$cross_compiling" = yes; then
11749 # Depending upon the size, compute the lo and hi bounds.
11750cat >conftest.$ac_ext <<_ACEOF
11751/* confdefs.h. */
11752_ACEOF
11753cat confdefs.h >>conftest.$ac_ext
11754cat >>conftest.$ac_ext <<_ACEOF
11755/* end confdefs.h. */
11756$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011757 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758int
11759main ()
11760{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762test_array [0] = 0
11763
11764 ;
11765 return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775 (eval "$ac_compile") 2>conftest.er1
11776 ac_status=$?
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
11785 ac_lo=0 ac_mid=0
11786 while :; do
11787 cat >conftest.$ac_ext <<_ACEOF
11788/* confdefs.h. */
11789_ACEOF
11790cat confdefs.h >>conftest.$ac_ext
11791cat >>conftest.$ac_ext <<_ACEOF
11792/* end confdefs.h. */
11793$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011794 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795int
11796main ()
11797{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799test_array [0] = 0
11800
11801 ;
11802 return 0;
11803}
11804_ACEOF
11805rm -f conftest.$ac_objext
11806if { (ac_try="$ac_compile"
11807case "(($ac_try" in
11808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11809 *) ac_try_echo=$ac_try;;
11810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (eval "$ac_compile") 2>conftest.er1
11813 ac_status=$?
11814 grep -v '^ *+' conftest.er1 >conftest.err
11815 rm -f conftest.er1
11816 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818 (exit $ac_status); } && {
11819 test -z "$ac_c_werror_flag" ||
11820 test ! -s conftest.err
11821 } && test -s conftest.$ac_objext; then
11822 ac_hi=$ac_mid; break
11823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011824 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011825sed 's/^/| /' conftest.$ac_ext >&5
11826
11827 ac_lo=`expr $ac_mid + 1`
11828 if test $ac_lo -le $ac_mid; then
11829 ac_lo= ac_hi=
11830 break
11831 fi
11832 ac_mid=`expr 2 '*' $ac_mid + 1`
11833fi
11834
11835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11836 done
11837else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011838 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011839sed 's/^/| /' conftest.$ac_ext >&5
11840
11841 cat >conftest.$ac_ext <<_ACEOF
11842/* confdefs.h. */
11843_ACEOF
11844cat confdefs.h >>conftest.$ac_ext
11845cat >>conftest.$ac_ext <<_ACEOF
11846/* end confdefs.h. */
11847$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011848 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849int
11850main ()
11851{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011853test_array [0] = 0
11854
11855 ;
11856 return 0;
11857}
11858_ACEOF
11859rm -f conftest.$ac_objext
11860if { (ac_try="$ac_compile"
11861case "(($ac_try" in
11862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11863 *) ac_try_echo=$ac_try;;
11864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866 (eval "$ac_compile") 2>conftest.er1
11867 ac_status=$?
11868 grep -v '^ *+' conftest.er1 >conftest.err
11869 rm -f conftest.er1
11870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011872 (exit $ac_status); } && {
11873 test -z "$ac_c_werror_flag" ||
11874 test ! -s conftest.err
11875 } && test -s conftest.$ac_objext; then
11876 ac_hi=-1 ac_mid=-1
11877 while :; do
11878 cat >conftest.$ac_ext <<_ACEOF
11879/* confdefs.h. */
11880_ACEOF
11881cat confdefs.h >>conftest.$ac_ext
11882cat >>conftest.$ac_ext <<_ACEOF
11883/* end confdefs.h. */
11884$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011885 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011886int
11887main ()
11888{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890test_array [0] = 0
11891
11892 ;
11893 return 0;
11894}
11895_ACEOF
11896rm -f conftest.$ac_objext
11897if { (ac_try="$ac_compile"
11898case "(($ac_try" in
11899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11900 *) ac_try_echo=$ac_try;;
11901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903 (eval "$ac_compile") 2>conftest.er1
11904 ac_status=$?
11905 grep -v '^ *+' conftest.er1 >conftest.err
11906 rm -f conftest.er1
11907 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011909 (exit $ac_status); } && {
11910 test -z "$ac_c_werror_flag" ||
11911 test ! -s conftest.err
11912 } && test -s conftest.$ac_objext; then
11913 ac_lo=$ac_mid; break
11914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011915 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011916sed 's/^/| /' conftest.$ac_ext >&5
11917
11918 ac_hi=`expr '(' $ac_mid ')' - 1`
11919 if test $ac_mid -le $ac_hi; then
11920 ac_lo= ac_hi=
11921 break
11922 fi
11923 ac_mid=`expr 2 '*' $ac_mid`
11924fi
11925
11926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11927 done
11928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011929 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo= ac_hi=
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936fi
11937
11938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11939# Binary search between lo and hi bounds.
11940while test "x$ac_lo" != "x$ac_hi"; do
11941 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11942 cat >conftest.$ac_ext <<_ACEOF
11943/* confdefs.h. */
11944_ACEOF
11945cat confdefs.h >>conftest.$ac_ext
11946cat >>conftest.$ac_ext <<_ACEOF
11947/* end confdefs.h. */
11948$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011949 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950int
11951main ()
11952{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011953static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954test_array [0] = 0
11955
11956 ;
11957 return 0;
11958}
11959_ACEOF
11960rm -f conftest.$ac_objext
11961if { (ac_try="$ac_compile"
11962case "(($ac_try" in
11963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11964 *) ac_try_echo=$ac_try;;
11965esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011967 (eval "$ac_compile") 2>conftest.er1
11968 ac_status=$?
11969 grep -v '^ *+' conftest.er1 >conftest.err
11970 rm -f conftest.er1
11971 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011973 (exit $ac_status); } && {
11974 test -z "$ac_c_werror_flag" ||
11975 test ! -s conftest.err
11976 } && test -s conftest.$ac_objext; then
11977 ac_hi=$ac_mid
11978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011979 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980sed 's/^/| /' conftest.$ac_ext >&5
11981
11982 ac_lo=`expr '(' $ac_mid ')' + 1`
11983fi
11984
11985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11986done
11987case $ac_lo in
11988?*) ac_cv_sizeof_long_double=$ac_lo;;
11989'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011990 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011992echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011994 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 else
11996 ac_cv_sizeof_long_double=0
11997 fi ;;
11998esac
11999else
12000 cat >conftest.$ac_ext <<_ACEOF
12001/* confdefs.h. */
12002_ACEOF
12003cat confdefs.h >>conftest.$ac_ext
12004cat >>conftest.$ac_ext <<_ACEOF
12005/* end confdefs.h. */
12006$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007 typedef long double ac__type_sizeof_;
12008static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12009static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010#include <stdio.h>
12011#include <stdlib.h>
12012int
12013main ()
12014{
12015
12016 FILE *f = fopen ("conftest.val", "w");
12017 if (! f)
12018 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012019 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012020 {
12021 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012023 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012024 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012025 }
12026 else
12027 {
12028 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012031 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012032 }
12033 return ferror (f) || fclose (f) != 0;
12034
12035 ;
12036 return 0;
12037}
12038_ACEOF
12039rm -f conftest$ac_exeext
12040if { (ac_try="$ac_link"
12041case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012046 (eval "$ac_link") 2>&5
12047 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12050 { (case "(($ac_try" in
12051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12052 *) ac_try_echo=$ac_try;;
12053esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012055 (eval "$ac_try") 2>&5
12056 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012058 (exit $ac_status); }; }; then
12059 ac_cv_sizeof_long_double=`cat conftest.val`
12060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012061 echo "$as_me: program exited with status $ac_status" >&5
12062echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012063sed 's/^/| /' conftest.$ac_ext >&5
12064
12065( exit $ac_status )
12066if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012068See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012069echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012071 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012072 else
12073 ac_cv_sizeof_long_double=0
12074 fi
12075fi
12076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12077fi
12078rm -f conftest.val
12079fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012080{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12081echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012082
12083
12084
12085cat >>confdefs.h <<_ACEOF
12086#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12087_ACEOF
12088
12089
12090fi
12091
12092
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012093{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12094echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012095have_c99_bool=no
12096cat >conftest.$ac_ext <<_ACEOF
12097/* confdefs.h. */
12098_ACEOF
12099cat confdefs.h >>conftest.$ac_ext
12100cat >>conftest.$ac_ext <<_ACEOF
12101/* end confdefs.h. */
12102
12103int
12104main ()
12105{
12106_Bool x; x = (_Bool)0;
12107 ;
12108 return 0;
12109}
12110_ACEOF
12111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112if { (ac_try="$ac_compile"
12113case "(($ac_try" in
12114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12115 *) ac_try_echo=$ac_try;;
12116esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012119 ac_status=$?
12120 grep -v '^ *+' conftest.er1 >conftest.err
12121 rm -f conftest.er1
12122 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124 (exit $ac_status); } && {
12125 test -z "$ac_c_werror_flag" ||
12126 test ! -s conftest.err
12127 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012128
12129
12130cat >>confdefs.h <<\_ACEOF
12131#define HAVE_C99_BOOL 1
12132_ACEOF
12133
12134 have_c99_bool=yes
12135
12136else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012137 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012138sed 's/^/| /' conftest.$ac_ext >&5
12139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140
Thomas Woutersb2137042007-02-01 18:02:27 +000012141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142
12143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012144{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12145echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012146if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012147{ echo "$as_me:$LINENO: checking for _Bool" >&5
12148echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12149if test "${ac_cv_type__Bool+set}" = set; then
12150 echo $ECHO_N "(cached) $ECHO_C" >&6
12151else
12152 cat >conftest.$ac_ext <<_ACEOF
12153/* confdefs.h. */
12154_ACEOF
12155cat confdefs.h >>conftest.$ac_ext
12156cat >>conftest.$ac_ext <<_ACEOF
12157/* end confdefs.h. */
12158$ac_includes_default
12159typedef _Bool ac__type_new_;
12160int
12161main ()
12162{
12163if ((ac__type_new_ *) 0)
12164 return 0;
12165if (sizeof (ac__type_new_))
12166 return 0;
12167 ;
12168 return 0;
12169}
12170_ACEOF
12171rm -f conftest.$ac_objext
12172if { (ac_try="$ac_compile"
12173case "(($ac_try" in
12174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12175 *) ac_try_echo=$ac_try;;
12176esac
12177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12178 (eval "$ac_compile") 2>conftest.er1
12179 ac_status=$?
12180 grep -v '^ *+' conftest.er1 >conftest.err
12181 rm -f conftest.er1
12182 cat conftest.err >&5
12183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12184 (exit $ac_status); } && {
12185 test -z "$ac_c_werror_flag" ||
12186 test ! -s conftest.err
12187 } && test -s conftest.$ac_objext; then
12188 ac_cv_type__Bool=yes
12189else
12190 echo "$as_me: failed program was:" >&5
12191sed 's/^/| /' conftest.$ac_ext >&5
12192
12193 ac_cv_type__Bool=no
12194fi
12195
12196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12197fi
12198{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12199echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201# The cast to long int works around a bug in the HP C Compiler
12202# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12203# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12204# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012205{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12206echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012207if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012208 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012209else
12210 if test "$cross_compiling" = yes; then
12211 # Depending upon the size, compute the lo and hi bounds.
12212cat >conftest.$ac_ext <<_ACEOF
12213/* confdefs.h. */
12214_ACEOF
12215cat confdefs.h >>conftest.$ac_ext
12216cat >>conftest.$ac_ext <<_ACEOF
12217/* end confdefs.h. */
12218$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012219 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012220int
12221main ()
12222{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012224test_array [0] = 0
12225
12226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231if { (ac_try="$ac_compile"
12232case "(($ac_try" in
12233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12234 *) ac_try_echo=$ac_try;;
12235esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012237 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012238 ac_status=$?
12239 grep -v '^ *+' conftest.er1 >conftest.err
12240 rm -f conftest.er1
12241 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243 (exit $ac_status); } && {
12244 test -z "$ac_c_werror_flag" ||
12245 test ! -s conftest.err
12246 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012247 ac_lo=0 ac_mid=0
12248 while :; do
12249 cat >conftest.$ac_ext <<_ACEOF
12250/* confdefs.h. */
12251_ACEOF
12252cat confdefs.h >>conftest.$ac_ext
12253cat >>conftest.$ac_ext <<_ACEOF
12254/* end confdefs.h. */
12255$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012256 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012257int
12258main ()
12259{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012261test_array [0] = 0
12262
12263 ;
12264 return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268if { (ac_try="$ac_compile"
12269case "(($ac_try" in
12270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271 *) ac_try_echo=$ac_try;;
12272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012275 ac_status=$?
12276 grep -v '^ *+' conftest.er1 >conftest.err
12277 rm -f conftest.er1
12278 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280 (exit $ac_status); } && {
12281 test -z "$ac_c_werror_flag" ||
12282 test ! -s conftest.err
12283 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012284 ac_hi=$ac_mid; break
12285else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012286 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012287sed 's/^/| /' conftest.$ac_ext >&5
12288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289 ac_lo=`expr $ac_mid + 1`
12290 if test $ac_lo -le $ac_mid; then
12291 ac_lo= ac_hi=
12292 break
12293 fi
12294 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296
12297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012298 done
12299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012300 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012301sed 's/^/| /' conftest.$ac_ext >&5
12302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012304/* confdefs.h. */
12305_ACEOF
12306cat confdefs.h >>conftest.$ac_ext
12307cat >>conftest.$ac_ext <<_ACEOF
12308/* end confdefs.h. */
12309$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012310 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012311int
12312main ()
12313{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012314static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012315test_array [0] = 0
12316
12317 ;
12318 return 0;
12319}
12320_ACEOF
12321rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322if { (ac_try="$ac_compile"
12323case "(($ac_try" in
12324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12325 *) ac_try_echo=$ac_try;;
12326esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012328 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012329 ac_status=$?
12330 grep -v '^ *+' conftest.er1 >conftest.err
12331 rm -f conftest.er1
12332 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334 (exit $ac_status); } && {
12335 test -z "$ac_c_werror_flag" ||
12336 test ! -s conftest.err
12337 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012338 ac_hi=-1 ac_mid=-1
12339 while :; do
12340 cat >conftest.$ac_ext <<_ACEOF
12341/* confdefs.h. */
12342_ACEOF
12343cat confdefs.h >>conftest.$ac_ext
12344cat >>conftest.$ac_ext <<_ACEOF
12345/* end confdefs.h. */
12346$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012347 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012348int
12349main ()
12350{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012352test_array [0] = 0
12353
12354 ;
12355 return 0;
12356}
12357_ACEOF
12358rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359if { (ac_try="$ac_compile"
12360case "(($ac_try" in
12361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12362 *) ac_try_echo=$ac_try;;
12363esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012366 ac_status=$?
12367 grep -v '^ *+' conftest.er1 >conftest.err
12368 rm -f conftest.er1
12369 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371 (exit $ac_status); } && {
12372 test -z "$ac_c_werror_flag" ||
12373 test ! -s conftest.err
12374 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012375 ac_lo=$ac_mid; break
12376else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012377 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012378sed 's/^/| /' conftest.$ac_ext >&5
12379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380 ac_hi=`expr '(' $ac_mid ')' - 1`
12381 if test $ac_mid -le $ac_hi; then
12382 ac_lo= ac_hi=
12383 break
12384 fi
12385 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387
12388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012389 done
12390else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012391 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012392sed 's/^/| /' conftest.$ac_ext >&5
12393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396
12397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012399
12400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012401# Binary search between lo and hi bounds.
12402while test "x$ac_lo" != "x$ac_hi"; do
12403 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12404 cat >conftest.$ac_ext <<_ACEOF
12405/* confdefs.h. */
12406_ACEOF
12407cat confdefs.h >>conftest.$ac_ext
12408cat >>conftest.$ac_ext <<_ACEOF
12409/* end confdefs.h. */
12410$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012411 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012412int
12413main ()
12414{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012415static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012416test_array [0] = 0
12417
12418 ;
12419 return 0;
12420}
12421_ACEOF
12422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423if { (ac_try="$ac_compile"
12424case "(($ac_try" in
12425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12426 *) ac_try_echo=$ac_try;;
12427esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012430 ac_status=$?
12431 grep -v '^ *+' conftest.er1 >conftest.err
12432 rm -f conftest.er1
12433 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 (exit $ac_status); } && {
12436 test -z "$ac_c_werror_flag" ||
12437 test ! -s conftest.err
12438 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012439 ac_hi=$ac_mid
12440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012441 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012442sed 's/^/| /' conftest.$ac_ext >&5
12443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446
12447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012448done
12449case $ac_lo in
12450?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012452 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012453See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012454echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012455See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012456 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 else
12458 ac_cv_sizeof__Bool=0
12459 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012460esac
12461else
12462 cat >conftest.$ac_ext <<_ACEOF
12463/* confdefs.h. */
12464_ACEOF
12465cat confdefs.h >>conftest.$ac_ext
12466cat >>conftest.$ac_ext <<_ACEOF
12467/* end confdefs.h. */
12468$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469 typedef _Bool ac__type_sizeof_;
12470static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12471static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012472#include <stdio.h>
12473#include <stdlib.h>
12474int
12475main ()
12476{
12477
12478 FILE *f = fopen ("conftest.val", "w");
12479 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012481 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012482 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012486 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012487 }
12488 else
12489 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012491 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012493 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012494 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012495 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012496
12497 ;
12498 return 0;
12499}
12500_ACEOF
12501rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502if { (ac_try="$ac_link"
12503case "(($ac_try" in
12504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12505 *) ac_try_echo=$ac_try;;
12506esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012509 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512 { (case "(($ac_try" in
12513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12514 *) ac_try_echo=$ac_try;;
12515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012517 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012518 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012520 (exit $ac_status); }; }; then
12521 ac_cv_sizeof__Bool=`cat conftest.val`
12522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012523 echo "$as_me: program exited with status $ac_status" >&5
12524echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012525sed 's/^/| /' conftest.$ac_ext >&5
12526
12527( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012529 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012530See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012531echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012532See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012533 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534 else
12535 ac_cv_sizeof__Bool=0
12536 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538rm -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 +000012539fi
12540rm -f conftest.val
12541fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012542{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12543echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544
12545
12546
Thomas Woutersb2137042007-02-01 18:02:27 +000012547cat >>confdefs.h <<_ACEOF
12548#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12549_ACEOF
12550
12551
12552fi
12553
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012554{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12555echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012556if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012557 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012558else
12559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012560/* confdefs.h. */
12561_ACEOF
12562cat confdefs.h >>conftest.$ac_ext
12563cat >>conftest.$ac_ext <<_ACEOF
12564/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012565#ifdef HAVE_STDINT_H
12566 #include <stdint.h>
12567 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012569typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012570int
12571main ()
12572{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012573if ((ac__type_new_ *) 0)
12574 return 0;
12575if (sizeof (ac__type_new_))
12576 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 ;
12578 return 0;
12579}
12580_ACEOF
12581rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582if { (ac_try="$ac_compile"
12583case "(($ac_try" in
12584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12585 *) ac_try_echo=$ac_try;;
12586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012590 grep -v '^ *+' conftest.er1 >conftest.err
12591 rm -f conftest.er1
12592 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594 (exit $ac_status); } && {
12595 test -z "$ac_c_werror_flag" ||
12596 test ! -s conftest.err
12597 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012598 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012599else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012601sed 's/^/| /' conftest.$ac_ext >&5
12602
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012603 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605
12606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012607fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012608{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12609echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12610if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012611
12612cat >>confdefs.h <<_ACEOF
12613#define HAVE_UINTPTR_T 1
12614_ACEOF
12615
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012616{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12617echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12618if test "${ac_cv_type_uintptr_t+set}" = set; then
12619 echo $ECHO_N "(cached) $ECHO_C" >&6
12620else
12621 cat >conftest.$ac_ext <<_ACEOF
12622/* confdefs.h. */
12623_ACEOF
12624cat confdefs.h >>conftest.$ac_ext
12625cat >>conftest.$ac_ext <<_ACEOF
12626/* end confdefs.h. */
12627$ac_includes_default
12628typedef uintptr_t ac__type_new_;
12629int
12630main ()
12631{
12632if ((ac__type_new_ *) 0)
12633 return 0;
12634if (sizeof (ac__type_new_))
12635 return 0;
12636 ;
12637 return 0;
12638}
12639_ACEOF
12640rm -f conftest.$ac_objext
12641if { (ac_try="$ac_compile"
12642case "(($ac_try" in
12643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12644 *) ac_try_echo=$ac_try;;
12645esac
12646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12647 (eval "$ac_compile") 2>conftest.er1
12648 ac_status=$?
12649 grep -v '^ *+' conftest.er1 >conftest.err
12650 rm -f conftest.er1
12651 cat conftest.err >&5
12652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12653 (exit $ac_status); } && {
12654 test -z "$ac_c_werror_flag" ||
12655 test ! -s conftest.err
12656 } && test -s conftest.$ac_objext; then
12657 ac_cv_type_uintptr_t=yes
12658else
12659 echo "$as_me: failed program was:" >&5
12660sed 's/^/| /' conftest.$ac_ext >&5
12661
12662 ac_cv_type_uintptr_t=no
12663fi
12664
12665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12666fi
12667{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12668echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670# The cast to long int works around a bug in the HP C Compiler
12671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12673# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012674{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12675echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012676if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012677 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012678else
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 if test "$cross_compiling" = yes; then
12680 # Depending upon the size, compute the lo and hi bounds.
12681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* confdefs.h. */
12683_ACEOF
12684cat confdefs.h >>conftest.$ac_ext
12685cat >>conftest.$ac_ext <<_ACEOF
12686/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012687$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012688 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012689int
12690main ()
12691{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012693test_array [0] = 0
12694
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700if { (ac_try="$ac_compile"
12701case "(($ac_try" in
12702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12703 *) ac_try_echo=$ac_try;;
12704esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012708 grep -v '^ *+' conftest.er1 >conftest.err
12709 rm -f conftest.er1
12710 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 (exit $ac_status); } && {
12713 test -z "$ac_c_werror_flag" ||
12714 test ! -s conftest.err
12715 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012716 ac_lo=0 ac_mid=0
12717 while :; do
12718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* confdefs.h. */
12720_ACEOF
12721cat confdefs.h >>conftest.$ac_ext
12722cat >>conftest.$ac_ext <<_ACEOF
12723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012724$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012725 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012730test_array [0] = 0
12731
12732 ;
12733 return 0;
12734}
12735_ACEOF
12736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737if { (ac_try="$ac_compile"
12738case "(($ac_try" in
12739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12740 *) ac_try_echo=$ac_try;;
12741esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012745 grep -v '^ *+' conftest.er1 >conftest.err
12746 rm -f conftest.er1
12747 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749 (exit $ac_status); } && {
12750 test -z "$ac_c_werror_flag" ||
12751 test ! -s conftest.err
12752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ac_hi=$ac_mid; break
12754else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012756sed 's/^/| /' conftest.$ac_ext >&5
12757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758 ac_lo=`expr $ac_mid + 1`
12759 if test $ac_lo -le $ac_mid; then
12760 ac_lo= ac_hi=
12761 break
12762 fi
12763 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765
12766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012767 done
12768else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012770sed 's/^/| /' conftest.$ac_ext >&5
12771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012778$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012779 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012784test_array [0] = 0
12785
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791if { (ac_try="$ac_compile"
12792case "(($ac_try" in
12793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12794 *) ac_try_echo=$ac_try;;
12795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012799 grep -v '^ *+' conftest.er1 >conftest.err
12800 rm -f conftest.er1
12801 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012803 (exit $ac_status); } && {
12804 test -z "$ac_c_werror_flag" ||
12805 test ! -s conftest.err
12806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012807 ac_hi=-1 ac_mid=-1
12808 while :; do
12809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012816 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012821test_array [0] = 0
12822
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828if { (ac_try="$ac_compile"
12829case "(($ac_try" in
12830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12831 *) ac_try_echo=$ac_try;;
12832esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012836 grep -v '^ *+' conftest.er1 >conftest.err
12837 rm -f conftest.er1
12838 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840 (exit $ac_status); } && {
12841 test -z "$ac_c_werror_flag" ||
12842 test ! -s conftest.err
12843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ac_lo=$ac_mid; break
12845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012847sed 's/^/| /' conftest.$ac_ext >&5
12848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849 ac_hi=`expr '(' $ac_mid ')' - 1`
12850 if test $ac_mid -le $ac_hi; then
12851 ac_lo= ac_hi=
12852 break
12853 fi
12854 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 done
12859else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012861sed 's/^/| /' conftest.$ac_ext >&5
12862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865
12866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012870# Binary search between lo and hi bounds.
12871while test "x$ac_lo" != "x$ac_hi"; do
12872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012874/* confdefs.h. */
12875_ACEOF
12876cat confdefs.h >>conftest.$ac_ext
12877cat >>conftest.$ac_ext <<_ACEOF
12878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012879$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012880 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012881int
12882main ()
12883{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012885test_array [0] = 0
12886
12887 ;
12888 return 0;
12889}
12890_ACEOF
12891rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892if { (ac_try="$ac_compile"
12893case "(($ac_try" in
12894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12895 *) ac_try_echo=$ac_try;;
12896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012900 grep -v '^ *+' conftest.er1 >conftest.err
12901 rm -f conftest.er1
12902 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 (exit $ac_status); } && {
12905 test -z "$ac_c_werror_flag" ||
12906 test ! -s conftest.err
12907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 ac_hi=$ac_mid
12909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012911sed 's/^/| /' conftest.$ac_ext >&5
12912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915
12916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012917done
12918case $ac_lo in
12919?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012921 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012922See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012923echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012924See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012925 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012926 else
12927 ac_cv_sizeof_uintptr_t=0
12928 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012929esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012930else
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012932/* confdefs.h. */
12933_ACEOF
12934cat confdefs.h >>conftest.$ac_ext
12935cat >>conftest.$ac_ext <<_ACEOF
12936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012937$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938 typedef uintptr_t ac__type_sizeof_;
12939static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12940static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012941#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012942#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012943int
12944main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012945{
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
12947 FILE *f = fopen ("conftest.val", "w");
12948 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012950 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012953 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012954 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012955 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 }
12957 else
12958 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012960 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012962 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
12966 ;
12967 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012968}
Martin v. Löwis11437992002-04-12 09:54:03 +000012969_ACEOF
12970rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971if { (ac_try="$ac_link"
12972case "(($ac_try" in
12973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12974 *) ac_try_echo=$ac_try;;
12975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981 { (case "(($ac_try" in
12982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12983 *) ac_try_echo=$ac_try;;
12984esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012986 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 (exit $ac_status); }; }; then
12990 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012991else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012992 echo "$as_me: program exited with status $ac_status" >&5
12993echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012994sed 's/^/| /' conftest.$ac_ext >&5
12995
Martin v. Löwis11437992002-04-12 09:54:03 +000012996( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012999See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013000echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013001See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013002 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003 else
13004 ac_cv_sizeof_uintptr_t=0
13005 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007rm -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 +000013008fi
13009rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013010fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013011{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13012echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013
13014
13015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013017#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013018_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013019
Michael W. Hudson54241132001-12-07 15:38:26 +000013020
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013021fi
13022
Thomas Wouters89f507f2006-12-13 04:49:30 +000013023
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013024{ echo "$as_me:$LINENO: checking for off_t" >&5
13025echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13026if test "${ac_cv_type_off_t+set}" = set; then
13027 echo $ECHO_N "(cached) $ECHO_C" >&6
13028else
13029 cat >conftest.$ac_ext <<_ACEOF
13030/* confdefs.h. */
13031_ACEOF
13032cat confdefs.h >>conftest.$ac_ext
13033cat >>conftest.$ac_ext <<_ACEOF
13034/* end confdefs.h. */
13035
13036#ifdef HAVE_SYS_TYPES_H
13037#include <sys/types.h>
13038#endif
13039
13040
13041typedef off_t ac__type_new_;
13042int
13043main ()
13044{
13045if ((ac__type_new_ *) 0)
13046 return 0;
13047if (sizeof (ac__type_new_))
13048 return 0;
13049 ;
13050 return 0;
13051}
13052_ACEOF
13053rm -f conftest.$ac_objext
13054if { (ac_try="$ac_compile"
13055case "(($ac_try" in
13056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13057 *) ac_try_echo=$ac_try;;
13058esac
13059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13060 (eval "$ac_compile") 2>conftest.er1
13061 ac_status=$?
13062 grep -v '^ *+' conftest.er1 >conftest.err
13063 rm -f conftest.er1
13064 cat conftest.err >&5
13065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13066 (exit $ac_status); } && {
13067 test -z "$ac_c_werror_flag" ||
13068 test ! -s conftest.err
13069 } && test -s conftest.$ac_objext; then
13070 ac_cv_type_off_t=yes
13071else
13072 echo "$as_me: failed program was:" >&5
13073sed 's/^/| /' conftest.$ac_ext >&5
13074
13075 ac_cv_type_off_t=no
13076fi
13077
13078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13079fi
13080{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13081echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013083# The cast to long int works around a bug in the HP C Compiler
13084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13086# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013087{ echo "$as_me:$LINENO: checking size of off_t" >&5
13088echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013090 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013091else
13092 if test "$cross_compiling" = yes; then
13093 # Depending upon the size, compute the lo and hi bounds.
13094cat >conftest.$ac_ext <<_ACEOF
13095/* confdefs.h. */
13096_ACEOF
13097cat confdefs.h >>conftest.$ac_ext
13098cat >>conftest.$ac_ext <<_ACEOF
13099/* end confdefs.h. */
13100
13101#ifdef HAVE_SYS_TYPES_H
13102#include <sys/types.h>
13103#endif
13104
13105
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013106 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013107int
13108main ()
13109{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013111test_array [0] = 0
13112
13113 ;
13114 return 0;
13115}
13116_ACEOF
13117rm -f conftest.$ac_objext
13118if { (ac_try="$ac_compile"
13119case "(($ac_try" in
13120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13121 *) ac_try_echo=$ac_try;;
13122esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013124 (eval "$ac_compile") 2>conftest.er1
13125 ac_status=$?
13126 grep -v '^ *+' conftest.er1 >conftest.err
13127 rm -f conftest.er1
13128 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130 (exit $ac_status); } && {
13131 test -z "$ac_c_werror_flag" ||
13132 test ! -s conftest.err
13133 } && test -s conftest.$ac_objext; then
13134 ac_lo=0 ac_mid=0
13135 while :; do
13136 cat >conftest.$ac_ext <<_ACEOF
13137/* confdefs.h. */
13138_ACEOF
13139cat confdefs.h >>conftest.$ac_ext
13140cat >>conftest.$ac_ext <<_ACEOF
13141/* end confdefs.h. */
13142
13143#ifdef HAVE_SYS_TYPES_H
13144#include <sys/types.h>
13145#endif
13146
13147
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013148 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013149int
13150main ()
13151{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013152static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013153test_array [0] = 0
13154
13155 ;
13156 return 0;
13157}
13158_ACEOF
13159rm -f conftest.$ac_objext
13160if { (ac_try="$ac_compile"
13161case "(($ac_try" in
13162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13163 *) ac_try_echo=$ac_try;;
13164esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013166 (eval "$ac_compile") 2>conftest.er1
13167 ac_status=$?
13168 grep -v '^ *+' conftest.er1 >conftest.err
13169 rm -f conftest.er1
13170 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013172 (exit $ac_status); } && {
13173 test -z "$ac_c_werror_flag" ||
13174 test ! -s conftest.err
13175 } && test -s conftest.$ac_objext; then
13176 ac_hi=$ac_mid; break
13177else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013178 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179sed 's/^/| /' conftest.$ac_ext >&5
13180
13181 ac_lo=`expr $ac_mid + 1`
13182 if test $ac_lo -le $ac_mid; then
13183 ac_lo= ac_hi=
13184 break
13185 fi
13186 ac_mid=`expr 2 '*' $ac_mid + 1`
13187fi
13188
13189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13190 done
13191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013192 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013193sed 's/^/| /' conftest.$ac_ext >&5
13194
13195 cat >conftest.$ac_ext <<_ACEOF
13196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
13201
13202#ifdef HAVE_SYS_TYPES_H
13203#include <sys/types.h>
13204#endif
13205
13206
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013207 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013208int
13209main ()
13210{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013212test_array [0] = 0
13213
13214 ;
13215 return 0;
13216}
13217_ACEOF
13218rm -f conftest.$ac_objext
13219if { (ac_try="$ac_compile"
13220case "(($ac_try" in
13221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13222 *) ac_try_echo=$ac_try;;
13223esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225 (eval "$ac_compile") 2>conftest.er1
13226 ac_status=$?
13227 grep -v '^ *+' conftest.er1 >conftest.err
13228 rm -f conftest.er1
13229 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013231 (exit $ac_status); } && {
13232 test -z "$ac_c_werror_flag" ||
13233 test ! -s conftest.err
13234 } && test -s conftest.$ac_objext; then
13235 ac_hi=-1 ac_mid=-1
13236 while :; do
13237 cat >conftest.$ac_ext <<_ACEOF
13238/* confdefs.h. */
13239_ACEOF
13240cat confdefs.h >>conftest.$ac_ext
13241cat >>conftest.$ac_ext <<_ACEOF
13242/* end confdefs.h. */
13243
13244#ifdef HAVE_SYS_TYPES_H
13245#include <sys/types.h>
13246#endif
13247
13248
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013249 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250int
13251main ()
13252{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013254test_array [0] = 0
13255
13256 ;
13257 return 0;
13258}
13259_ACEOF
13260rm -f conftest.$ac_objext
13261if { (ac_try="$ac_compile"
13262case "(($ac_try" in
13263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13264 *) ac_try_echo=$ac_try;;
13265esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267 (eval "$ac_compile") 2>conftest.er1
13268 ac_status=$?
13269 grep -v '^ *+' conftest.er1 >conftest.err
13270 rm -f conftest.er1
13271 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273 (exit $ac_status); } && {
13274 test -z "$ac_c_werror_flag" ||
13275 test ! -s conftest.err
13276 } && test -s conftest.$ac_objext; then
13277 ac_lo=$ac_mid; break
13278else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013279 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013280sed 's/^/| /' conftest.$ac_ext >&5
13281
13282 ac_hi=`expr '(' $ac_mid ')' - 1`
13283 if test $ac_mid -le $ac_hi; then
13284 ac_lo= ac_hi=
13285 break
13286 fi
13287 ac_mid=`expr 2 '*' $ac_mid`
13288fi
13289
13290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13291 done
13292else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013293 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013294sed 's/^/| /' conftest.$ac_ext >&5
13295
13296 ac_lo= ac_hi=
13297fi
13298
13299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300fi
13301
13302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303# Binary search between lo and hi bounds.
13304while test "x$ac_lo" != "x$ac_hi"; do
13305 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13306 cat >conftest.$ac_ext <<_ACEOF
13307/* confdefs.h. */
13308_ACEOF
13309cat confdefs.h >>conftest.$ac_ext
13310cat >>conftest.$ac_ext <<_ACEOF
13311/* end confdefs.h. */
13312
13313#ifdef HAVE_SYS_TYPES_H
13314#include <sys/types.h>
13315#endif
13316
13317
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013318 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013319int
13320main ()
13321{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013322static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013323test_array [0] = 0
13324
13325 ;
13326 return 0;
13327}
13328_ACEOF
13329rm -f conftest.$ac_objext
13330if { (ac_try="$ac_compile"
13331case "(($ac_try" in
13332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13333 *) ac_try_echo=$ac_try;;
13334esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 (eval "$ac_compile") 2>conftest.er1
13337 ac_status=$?
13338 grep -v '^ *+' conftest.er1 >conftest.err
13339 rm -f conftest.er1
13340 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342 (exit $ac_status); } && {
13343 test -z "$ac_c_werror_flag" ||
13344 test ! -s conftest.err
13345 } && test -s conftest.$ac_objext; then
13346 ac_hi=$ac_mid
13347else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013348 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349sed 's/^/| /' conftest.$ac_ext >&5
13350
13351 ac_lo=`expr '(' $ac_mid ')' + 1`
13352fi
13353
13354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13355done
13356case $ac_lo in
13357?*) ac_cv_sizeof_off_t=$ac_lo;;
13358'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013359 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013361echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013362See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013363 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013364 else
13365 ac_cv_sizeof_off_t=0
13366 fi ;;
13367esac
13368else
13369 cat >conftest.$ac_ext <<_ACEOF
13370/* confdefs.h. */
13371_ACEOF
13372cat confdefs.h >>conftest.$ac_ext
13373cat >>conftest.$ac_ext <<_ACEOF
13374/* end confdefs.h. */
13375
13376#ifdef HAVE_SYS_TYPES_H
13377#include <sys/types.h>
13378#endif
13379
13380
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013381 typedef off_t ac__type_sizeof_;
13382static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13383static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013384#include <stdio.h>
13385#include <stdlib.h>
13386int
13387main ()
13388{
13389
13390 FILE *f = fopen ("conftest.val", "w");
13391 if (! f)
13392 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013393 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013394 {
13395 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013396 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013397 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013398 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013399 }
13400 else
13401 {
13402 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013404 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013405 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013406 }
13407 return ferror (f) || fclose (f) != 0;
13408
13409 ;
13410 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013411}
Martin v. Löwis11437992002-04-12 09:54:03 +000013412_ACEOF
13413rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013414if { (ac_try="$ac_link"
13415case "(($ac_try" in
13416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13417 *) ac_try_echo=$ac_try;;
13418esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013424 { (case "(($ac_try" in
13425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13426 *) ac_try_echo=$ac_try;;
13427esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013433 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013434else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013435 echo "$as_me: program exited with status $ac_status" >&5
13436echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013437sed 's/^/| /' conftest.$ac_ext >&5
13438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013440if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013441 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013443echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013444See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013445 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013446 else
13447 ac_cv_sizeof_off_t=0
13448 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450rm -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 +000013451fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013452rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013453fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013454{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13455echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013456
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013457
13458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013460#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013461_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013462
Michael W. Hudson54241132001-12-07 15:38:26 +000013463
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013464
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013465{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13466echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013467if test "$have_long_long" = yes
13468then
13469if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013470 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013471
Martin v. Löwis11437992002-04-12 09:54:03 +000013472cat >>confdefs.h <<\_ACEOF
13473#define HAVE_LARGEFILE_SUPPORT 1
13474_ACEOF
13475
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013476 { echo "$as_me:$LINENO: result: yes" >&5
13477echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013478else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013479 { echo "$as_me:$LINENO: result: no" >&5
13480echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013481fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013482else
13483 { echo "$as_me:$LINENO: result: no" >&5
13484echo "${ECHO_T}no" >&6; }
13485fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013486
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013487{ echo "$as_me:$LINENO: checking for time_t" >&5
13488echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13489if test "${ac_cv_type_time_t+set}" = set; then
13490 echo $ECHO_N "(cached) $ECHO_C" >&6
13491else
13492 cat >conftest.$ac_ext <<_ACEOF
13493/* confdefs.h. */
13494_ACEOF
13495cat confdefs.h >>conftest.$ac_ext
13496cat >>conftest.$ac_ext <<_ACEOF
13497/* end confdefs.h. */
13498
13499#ifdef HAVE_SYS_TYPES_H
13500#include <sys/types.h>
13501#endif
13502#ifdef HAVE_TIME_H
13503#include <time.h>
13504#endif
13505
13506
13507typedef time_t ac__type_new_;
13508int
13509main ()
13510{
13511if ((ac__type_new_ *) 0)
13512 return 0;
13513if (sizeof (ac__type_new_))
13514 return 0;
13515 ;
13516 return 0;
13517}
13518_ACEOF
13519rm -f conftest.$ac_objext
13520if { (ac_try="$ac_compile"
13521case "(($ac_try" in
13522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13523 *) ac_try_echo=$ac_try;;
13524esac
13525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13526 (eval "$ac_compile") 2>conftest.er1
13527 ac_status=$?
13528 grep -v '^ *+' conftest.er1 >conftest.err
13529 rm -f conftest.er1
13530 cat conftest.err >&5
13531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13532 (exit $ac_status); } && {
13533 test -z "$ac_c_werror_flag" ||
13534 test ! -s conftest.err
13535 } && test -s conftest.$ac_objext; then
13536 ac_cv_type_time_t=yes
13537else
13538 echo "$as_me: failed program was:" >&5
13539sed 's/^/| /' conftest.$ac_ext >&5
13540
13541 ac_cv_type_time_t=no
13542fi
13543
13544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545fi
13546{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13547echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13548
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013549# The cast to long int works around a bug in the HP C Compiler
13550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13552# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013553{ echo "$as_me:$LINENO: checking size of time_t" >&5
13554echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013555if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013556 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013557else
13558 if test "$cross_compiling" = yes; then
13559 # Depending upon the size, compute the lo and hi bounds.
13560cat >conftest.$ac_ext <<_ACEOF
13561/* confdefs.h. */
13562_ACEOF
13563cat confdefs.h >>conftest.$ac_ext
13564cat >>conftest.$ac_ext <<_ACEOF
13565/* end confdefs.h. */
13566
13567#ifdef HAVE_SYS_TYPES_H
13568#include <sys/types.h>
13569#endif
13570#ifdef HAVE_TIME_H
13571#include <time.h>
13572#endif
13573
13574
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013575 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013576int
13577main ()
13578{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013579static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580test_array [0] = 0
13581
13582 ;
13583 return 0;
13584}
13585_ACEOF
13586rm -f conftest.$ac_objext
13587if { (ac_try="$ac_compile"
13588case "(($ac_try" in
13589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13590 *) ac_try_echo=$ac_try;;
13591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593 (eval "$ac_compile") 2>conftest.er1
13594 ac_status=$?
13595 grep -v '^ *+' conftest.er1 >conftest.err
13596 rm -f conftest.er1
13597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013599 (exit $ac_status); } && {
13600 test -z "$ac_c_werror_flag" ||
13601 test ! -s conftest.err
13602 } && test -s conftest.$ac_objext; then
13603 ac_lo=0 ac_mid=0
13604 while :; do
13605 cat >conftest.$ac_ext <<_ACEOF
13606/* confdefs.h. */
13607_ACEOF
13608cat confdefs.h >>conftest.$ac_ext
13609cat >>conftest.$ac_ext <<_ACEOF
13610/* end confdefs.h. */
13611
13612#ifdef HAVE_SYS_TYPES_H
13613#include <sys/types.h>
13614#endif
13615#ifdef HAVE_TIME_H
13616#include <time.h>
13617#endif
13618
13619
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013620 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013621int
13622main ()
13623{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013625test_array [0] = 0
13626
13627 ;
13628 return 0;
13629}
13630_ACEOF
13631rm -f conftest.$ac_objext
13632if { (ac_try="$ac_compile"
13633case "(($ac_try" in
13634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13635 *) ac_try_echo=$ac_try;;
13636esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013638 (eval "$ac_compile") 2>conftest.er1
13639 ac_status=$?
13640 grep -v '^ *+' conftest.er1 >conftest.err
13641 rm -f conftest.er1
13642 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013644 (exit $ac_status); } && {
13645 test -z "$ac_c_werror_flag" ||
13646 test ! -s conftest.err
13647 } && test -s conftest.$ac_objext; then
13648 ac_hi=$ac_mid; break
13649else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013651sed 's/^/| /' conftest.$ac_ext >&5
13652
13653 ac_lo=`expr $ac_mid + 1`
13654 if test $ac_lo -le $ac_mid; then
13655 ac_lo= ac_hi=
13656 break
13657 fi
13658 ac_mid=`expr 2 '*' $ac_mid + 1`
13659fi
13660
13661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13662 done
13663else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013664 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013665sed 's/^/| /' conftest.$ac_ext >&5
13666
13667 cat >conftest.$ac_ext <<_ACEOF
13668/* confdefs.h. */
13669_ACEOF
13670cat confdefs.h >>conftest.$ac_ext
13671cat >>conftest.$ac_ext <<_ACEOF
13672/* end confdefs.h. */
13673
13674#ifdef HAVE_SYS_TYPES_H
13675#include <sys/types.h>
13676#endif
13677#ifdef HAVE_TIME_H
13678#include <time.h>
13679#endif
13680
13681
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013682 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013683int
13684main ()
13685{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013687test_array [0] = 0
13688
13689 ;
13690 return 0;
13691}
13692_ACEOF
13693rm -f conftest.$ac_objext
13694if { (ac_try="$ac_compile"
13695case "(($ac_try" in
13696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13697 *) ac_try_echo=$ac_try;;
13698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013700 (eval "$ac_compile") 2>conftest.er1
13701 ac_status=$?
13702 grep -v '^ *+' conftest.er1 >conftest.err
13703 rm -f conftest.er1
13704 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013706 (exit $ac_status); } && {
13707 test -z "$ac_c_werror_flag" ||
13708 test ! -s conftest.err
13709 } && test -s conftest.$ac_objext; then
13710 ac_hi=-1 ac_mid=-1
13711 while :; do
13712 cat >conftest.$ac_ext <<_ACEOF
13713/* confdefs.h. */
13714_ACEOF
13715cat confdefs.h >>conftest.$ac_ext
13716cat >>conftest.$ac_ext <<_ACEOF
13717/* end confdefs.h. */
13718
13719#ifdef HAVE_SYS_TYPES_H
13720#include <sys/types.h>
13721#endif
13722#ifdef HAVE_TIME_H
13723#include <time.h>
13724#endif
13725
13726
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013727 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013728int
13729main ()
13730{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013731static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013732test_array [0] = 0
13733
13734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext
13739if { (ac_try="$ac_compile"
13740case "(($ac_try" in
13741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13742 *) ac_try_echo=$ac_try;;
13743esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013745 (eval "$ac_compile") 2>conftest.er1
13746 ac_status=$?
13747 grep -v '^ *+' conftest.er1 >conftest.err
13748 rm -f conftest.er1
13749 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013751 (exit $ac_status); } && {
13752 test -z "$ac_c_werror_flag" ||
13753 test ! -s conftest.err
13754 } && test -s conftest.$ac_objext; then
13755 ac_lo=$ac_mid; break
13756else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013757 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013758sed 's/^/| /' conftest.$ac_ext >&5
13759
13760 ac_hi=`expr '(' $ac_mid ')' - 1`
13761 if test $ac_mid -le $ac_hi; then
13762 ac_lo= ac_hi=
13763 break
13764 fi
13765 ac_mid=`expr 2 '*' $ac_mid`
13766fi
13767
13768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769 done
13770else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013771 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013772sed 's/^/| /' conftest.$ac_ext >&5
13773
13774 ac_lo= ac_hi=
13775fi
13776
13777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778fi
13779
13780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13781# Binary search between lo and hi bounds.
13782while test "x$ac_lo" != "x$ac_hi"; do
13783 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13784 cat >conftest.$ac_ext <<_ACEOF
13785/* confdefs.h. */
13786_ACEOF
13787cat confdefs.h >>conftest.$ac_ext
13788cat >>conftest.$ac_ext <<_ACEOF
13789/* end confdefs.h. */
13790
13791#ifdef HAVE_SYS_TYPES_H
13792#include <sys/types.h>
13793#endif
13794#ifdef HAVE_TIME_H
13795#include <time.h>
13796#endif
13797
13798
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013799 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013800int
13801main ()
13802{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013803static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013804test_array [0] = 0
13805
13806 ;
13807 return 0;
13808}
13809_ACEOF
13810rm -f conftest.$ac_objext
13811if { (ac_try="$ac_compile"
13812case "(($ac_try" in
13813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13814 *) ac_try_echo=$ac_try;;
13815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817 (eval "$ac_compile") 2>conftest.er1
13818 ac_status=$?
13819 grep -v '^ *+' conftest.er1 >conftest.err
13820 rm -f conftest.er1
13821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013823 (exit $ac_status); } && {
13824 test -z "$ac_c_werror_flag" ||
13825 test ! -s conftest.err
13826 } && test -s conftest.$ac_objext; then
13827 ac_hi=$ac_mid
13828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013829 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013830sed 's/^/| /' conftest.$ac_ext >&5
13831
13832 ac_lo=`expr '(' $ac_mid ')' + 1`
13833fi
13834
13835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13836done
13837case $ac_lo in
13838?*) ac_cv_sizeof_time_t=$ac_lo;;
13839'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013840 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013841See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013843See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013844 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013845 else
13846 ac_cv_sizeof_time_t=0
13847 fi ;;
13848esac
13849else
13850 cat >conftest.$ac_ext <<_ACEOF
13851/* confdefs.h. */
13852_ACEOF
13853cat confdefs.h >>conftest.$ac_ext
13854cat >>conftest.$ac_ext <<_ACEOF
13855/* end confdefs.h. */
13856
13857#ifdef HAVE_SYS_TYPES_H
13858#include <sys/types.h>
13859#endif
13860#ifdef HAVE_TIME_H
13861#include <time.h>
13862#endif
13863
13864
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013865 typedef time_t ac__type_sizeof_;
13866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868#include <stdio.h>
13869#include <stdlib.h>
13870int
13871main ()
13872{
13873
13874 FILE *f = fopen ("conftest.val", "w");
13875 if (! f)
13876 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013878 {
13879 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013881 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013882 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013883 }
13884 else
13885 {
13886 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013888 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013889 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013890 }
13891 return ferror (f) || fclose (f) != 0;
13892
13893 ;
13894 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013895}
Martin v. Löwis11437992002-04-12 09:54:03 +000013896_ACEOF
13897rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898if { (ac_try="$ac_link"
13899case "(($ac_try" in
13900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13901 *) ac_try_echo=$ac_try;;
13902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908 { (case "(($ac_try" in
13909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13910 *) ac_try_echo=$ac_try;;
13911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013919 echo "$as_me: program exited with status $ac_status" >&5
13920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013921sed 's/^/| /' conftest.$ac_ext >&5
13922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013924if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013926See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013927echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013928See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013929 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013930 else
13931 ac_cv_sizeof_time_t=0
13932 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934rm -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 +000013935fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013936rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13939echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013941
13942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013944#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013945_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013946
Michael W. Hudson54241132001-12-07 15:38:26 +000013947
13948
Trent Mick635f6fb2000-08-23 21:33:05 +000013949# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013950ac_save_cc="$CC"
13951if test "$ac_cv_kpthread" = "yes"
13952then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013953elif test "$ac_cv_kthread" = "yes"
13954then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013955elif test "$ac_cv_pthread" = "yes"
13956then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013957fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013958
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013959{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13960echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013961have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013962cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* confdefs.h. */
13964_ACEOF
13965cat confdefs.h >>conftest.$ac_ext
13966cat >>conftest.$ac_ext <<_ACEOF
13967/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013968#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013969int
13970main ()
13971{
Guido van Rossum12580492000-09-24 16:47:19 +000013972pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ;
13974 return 0;
13975}
13976_ACEOF
13977rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978if { (ac_try="$ac_compile"
13979case "(($ac_try" in
13980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13981 *) ac_try_echo=$ac_try;;
13982esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013986 grep -v '^ *+' conftest.er1 >conftest.err
13987 rm -f conftest.er1
13988 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990 (exit $ac_status); } && {
13991 test -z "$ac_c_werror_flag" ||
13992 test ! -s conftest.err
13993 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013994 have_pthread_t=yes
13995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013997sed 's/^/| /' conftest.$ac_ext >&5
13998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999
Trent Mick635f6fb2000-08-23 21:33:05 +000014000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001
14002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014003{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14004echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014005if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014006 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14007echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14008if test "${ac_cv_type_pthread_t+set}" = set; then
14009 echo $ECHO_N "(cached) $ECHO_C" >&6
14010else
14011 cat >conftest.$ac_ext <<_ACEOF
14012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
14017
14018#ifdef HAVE_PTHREAD_H
14019#include <pthread.h>
14020#endif
14021
14022
14023typedef pthread_t ac__type_new_;
14024int
14025main ()
14026{
14027if ((ac__type_new_ *) 0)
14028 return 0;
14029if (sizeof (ac__type_new_))
14030 return 0;
14031 ;
14032 return 0;
14033}
14034_ACEOF
14035rm -f conftest.$ac_objext
14036if { (ac_try="$ac_compile"
14037case "(($ac_try" in
14038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14039 *) ac_try_echo=$ac_try;;
14040esac
14041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14042 (eval "$ac_compile") 2>conftest.er1
14043 ac_status=$?
14044 grep -v '^ *+' conftest.er1 >conftest.err
14045 rm -f conftest.er1
14046 cat conftest.err >&5
14047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14048 (exit $ac_status); } && {
14049 test -z "$ac_c_werror_flag" ||
14050 test ! -s conftest.err
14051 } && test -s conftest.$ac_objext; then
14052 ac_cv_type_pthread_t=yes
14053else
14054 echo "$as_me: failed program was:" >&5
14055sed 's/^/| /' conftest.$ac_ext >&5
14056
14057 ac_cv_type_pthread_t=no
14058fi
14059
14060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14061fi
14062{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14063echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14064
14065# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014066# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14067# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14068# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014069{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14070echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014071if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014072 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014073else
14074 if test "$cross_compiling" = yes; then
14075 # Depending upon the size, compute the lo and hi bounds.
14076cat >conftest.$ac_ext <<_ACEOF
14077/* confdefs.h. */
14078_ACEOF
14079cat confdefs.h >>conftest.$ac_ext
14080cat >>conftest.$ac_ext <<_ACEOF
14081/* end confdefs.h. */
14082
14083#ifdef HAVE_PTHREAD_H
14084#include <pthread.h>
14085#endif
14086
14087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014088 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014089int
14090main ()
14091{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014092static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014093test_array [0] = 0
14094
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099rm -f conftest.$ac_objext
14100if { (ac_try="$ac_compile"
14101case "(($ac_try" in
14102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14103 *) ac_try_echo=$ac_try;;
14104esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106 (eval "$ac_compile") 2>conftest.er1
14107 ac_status=$?
14108 grep -v '^ *+' conftest.er1 >conftest.err
14109 rm -f conftest.er1
14110 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112 (exit $ac_status); } && {
14113 test -z "$ac_c_werror_flag" ||
14114 test ! -s conftest.err
14115 } && test -s conftest.$ac_objext; then
14116 ac_lo=0 ac_mid=0
14117 while :; do
14118 cat >conftest.$ac_ext <<_ACEOF
14119/* confdefs.h. */
14120_ACEOF
14121cat confdefs.h >>conftest.$ac_ext
14122cat >>conftest.$ac_ext <<_ACEOF
14123/* end confdefs.h. */
14124
14125#ifdef HAVE_PTHREAD_H
14126#include <pthread.h>
14127#endif
14128
14129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014130 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014131int
14132main ()
14133{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135test_array [0] = 0
14136
14137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext
14142if { (ac_try="$ac_compile"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014148 (eval "$ac_compile") 2>conftest.er1
14149 ac_status=$?
14150 grep -v '^ *+' conftest.er1 >conftest.err
14151 rm -f conftest.er1
14152 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014154 (exit $ac_status); } && {
14155 test -z "$ac_c_werror_flag" ||
14156 test ! -s conftest.err
14157 } && test -s conftest.$ac_objext; then
14158 ac_hi=$ac_mid; break
14159else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014160 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014161sed 's/^/| /' conftest.$ac_ext >&5
14162
14163 ac_lo=`expr $ac_mid + 1`
14164 if test $ac_lo -le $ac_mid; then
14165 ac_lo= ac_hi=
14166 break
14167 fi
14168 ac_mid=`expr 2 '*' $ac_mid + 1`
14169fi
14170
14171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172 done
14173else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014174 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175sed 's/^/| /' conftest.$ac_ext >&5
14176
14177 cat >conftest.$ac_ext <<_ACEOF
14178/* confdefs.h. */
14179_ACEOF
14180cat confdefs.h >>conftest.$ac_ext
14181cat >>conftest.$ac_ext <<_ACEOF
14182/* end confdefs.h. */
14183
14184#ifdef HAVE_PTHREAD_H
14185#include <pthread.h>
14186#endif
14187
14188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014189 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190int
14191main ()
14192{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194test_array [0] = 0
14195
14196 ;
14197 return 0;
14198}
14199_ACEOF
14200rm -f conftest.$ac_objext
14201if { (ac_try="$ac_compile"
14202case "(($ac_try" in
14203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14204 *) ac_try_echo=$ac_try;;
14205esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014207 (eval "$ac_compile") 2>conftest.er1
14208 ac_status=$?
14209 grep -v '^ *+' conftest.er1 >conftest.err
14210 rm -f conftest.er1
14211 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014213 (exit $ac_status); } && {
14214 test -z "$ac_c_werror_flag" ||
14215 test ! -s conftest.err
14216 } && test -s conftest.$ac_objext; then
14217 ac_hi=-1 ac_mid=-1
14218 while :; do
14219 cat >conftest.$ac_ext <<_ACEOF
14220/* confdefs.h. */
14221_ACEOF
14222cat confdefs.h >>conftest.$ac_ext
14223cat >>conftest.$ac_ext <<_ACEOF
14224/* end confdefs.h. */
14225
14226#ifdef HAVE_PTHREAD_H
14227#include <pthread.h>
14228#endif
14229
14230
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014231 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232int
14233main ()
14234{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014236test_array [0] = 0
14237
14238 ;
14239 return 0;
14240}
14241_ACEOF
14242rm -f conftest.$ac_objext
14243if { (ac_try="$ac_compile"
14244case "(($ac_try" in
14245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14246 *) ac_try_echo=$ac_try;;
14247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014249 (eval "$ac_compile") 2>conftest.er1
14250 ac_status=$?
14251 grep -v '^ *+' conftest.er1 >conftest.err
14252 rm -f conftest.er1
14253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255 (exit $ac_status); } && {
14256 test -z "$ac_c_werror_flag" ||
14257 test ! -s conftest.err
14258 } && test -s conftest.$ac_objext; then
14259 ac_lo=$ac_mid; break
14260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014261 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014262sed 's/^/| /' conftest.$ac_ext >&5
14263
14264 ac_hi=`expr '(' $ac_mid ')' - 1`
14265 if test $ac_mid -le $ac_hi; then
14266 ac_lo= ac_hi=
14267 break
14268 fi
14269 ac_mid=`expr 2 '*' $ac_mid`
14270fi
14271
14272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14273 done
14274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014275 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014276sed 's/^/| /' conftest.$ac_ext >&5
14277
14278 ac_lo= ac_hi=
14279fi
14280
14281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14282fi
14283
14284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285# Binary search between lo and hi bounds.
14286while test "x$ac_lo" != "x$ac_hi"; do
14287 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14288 cat >conftest.$ac_ext <<_ACEOF
14289/* confdefs.h. */
14290_ACEOF
14291cat confdefs.h >>conftest.$ac_ext
14292cat >>conftest.$ac_ext <<_ACEOF
14293/* end confdefs.h. */
14294
14295#ifdef HAVE_PTHREAD_H
14296#include <pthread.h>
14297#endif
14298
14299
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014300 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014301int
14302main ()
14303{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014304static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014305test_array [0] = 0
14306
14307 ;
14308 return 0;
14309}
14310_ACEOF
14311rm -f conftest.$ac_objext
14312if { (ac_try="$ac_compile"
14313case "(($ac_try" in
14314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14315 *) ac_try_echo=$ac_try;;
14316esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014318 (eval "$ac_compile") 2>conftest.er1
14319 ac_status=$?
14320 grep -v '^ *+' conftest.er1 >conftest.err
14321 rm -f conftest.er1
14322 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014324 (exit $ac_status); } && {
14325 test -z "$ac_c_werror_flag" ||
14326 test ! -s conftest.err
14327 } && test -s conftest.$ac_objext; then
14328 ac_hi=$ac_mid
14329else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014330 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014331sed 's/^/| /' conftest.$ac_ext >&5
14332
14333 ac_lo=`expr '(' $ac_mid ')' + 1`
14334fi
14335
14336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14337done
14338case $ac_lo in
14339?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14340'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014341 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014343echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014345 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346 else
14347 ac_cv_sizeof_pthread_t=0
14348 fi ;;
14349esac
14350else
14351 cat >conftest.$ac_ext <<_ACEOF
14352/* confdefs.h. */
14353_ACEOF
14354cat confdefs.h >>conftest.$ac_ext
14355cat >>conftest.$ac_ext <<_ACEOF
14356/* end confdefs.h. */
14357
14358#ifdef HAVE_PTHREAD_H
14359#include <pthread.h>
14360#endif
14361
14362
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014363 typedef pthread_t ac__type_sizeof_;
14364static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14365static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014366#include <stdio.h>
14367#include <stdlib.h>
14368int
14369main ()
14370{
14371
14372 FILE *f = fopen ("conftest.val", "w");
14373 if (! f)
14374 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014375 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376 {
14377 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014378 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014379 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014380 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014381 }
14382 else
14383 {
14384 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014385 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014387 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014388 }
14389 return ferror (f) || fclose (f) != 0;
14390
14391 ;
14392 return 0;
14393}
Martin v. Löwis11437992002-04-12 09:54:03 +000014394_ACEOF
14395rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396if { (ac_try="$ac_link"
14397case "(($ac_try" in
14398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14399 *) ac_try_echo=$ac_try;;
14400esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014403 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406 { (case "(($ac_try" in
14407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14408 *) ac_try_echo=$ac_try;;
14409esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014414 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014415 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014416else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014417 echo "$as_me: program exited with status $ac_status" >&5
14418echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014419sed 's/^/| /' conftest.$ac_ext >&5
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014423 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014424See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014425echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014426See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014427 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014428 else
14429 ac_cv_sizeof_pthread_t=0
14430 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432rm -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 +000014433fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014434rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014436{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14437echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014439
14440
Martin v. Löwis11437992002-04-12 09:54:03 +000014441cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014442#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014444
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014445
Trent Mick635f6fb2000-08-23 21:33:05 +000014446fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014447CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014448
Michael W. Hudson54241132001-12-07 15:38:26 +000014449
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014450case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014451 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014452 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14453 ;;
14454 Darwin/*)
14455 OTHER_LIBTOOL_OPT=""
14456 ;;
14457esac
14458
14459
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014460ARCH_RUN_32BIT=""
14461
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014462case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014463 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014464 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14465 if test "${enable_universalsdk}"; then
14466 :
14467 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014468 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014469 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014470 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014471 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014472 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +000014473 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014474 if test ${gcc_version} '<' 4.0
14475 then
14476 LIBTOOL_CRUFT="-lcc_dynamic"
14477 else
14478 LIBTOOL_CRUFT=""
14479 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014480 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014481 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014482else
14483 cat >conftest.$ac_ext <<_ACEOF
14484/* confdefs.h. */
14485_ACEOF
14486cat confdefs.h >>conftest.$ac_ext
14487cat >>conftest.$ac_ext <<_ACEOF
14488/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014489
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014490 #include <unistd.h>
14491 int main(int argc, char*argv[])
14492 {
14493 if (sizeof(long) == 4) {
14494 return 0;
14495 } else {
14496 return 1;
14497 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014498 }
14499
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014500_ACEOF
14501rm -f conftest$ac_exeext
14502if { (ac_try="$ac_link"
14503case "(($ac_try" in
14504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14505 *) ac_try_echo=$ac_try;;
14506esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014508 (eval "$ac_link") 2>&5
14509 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014511 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14512 { (case "(($ac_try" in
14513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14514 *) ac_try_echo=$ac_try;;
14515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014517 (eval "$ac_try") 2>&5
14518 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014520 (exit $ac_status); }; }; then
14521 ac_osx_32bit=yes
14522else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014523 echo "$as_me: program exited with status $ac_status" >&5
14524echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014525sed 's/^/| /' conftest.$ac_ext >&5
14526
14527( exit $ac_status )
14528ac_osx_32bit=no
14529fi
14530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14531fi
14532
14533
14534
14535 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014536 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014537 i386)
14538 MACOSX_DEFAULT_ARCH="i386"
14539 ;;
14540 ppc)
14541 MACOSX_DEFAULT_ARCH="ppc"
14542 ;;
14543 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014544 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14545echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014546 { (exit 1); exit 1; }; }
14547 ;;
14548 esac
14549 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +000014550 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014551 i386)
14552 MACOSX_DEFAULT_ARCH="x86_64"
14553 ;;
14554 ppc)
14555 MACOSX_DEFAULT_ARCH="ppc64"
14556 ;;
14557 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014558 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14559echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014560 { (exit 1); exit 1; }; }
14561 ;;
14562 esac
14563
14564 #ARCH_RUN_32BIT="true"
14565 fi
14566
14567 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014568 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014569 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014570esac
14571
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014572{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14573echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014574if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014575then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014576 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014578 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014579
Martin v. Löwis11437992002-04-12 09:54:03 +000014580cat >>confdefs.h <<\_ACEOF
14581#define WITH_NEXT_FRAMEWORK 1
14582_ACEOF
14583
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014584 { echo "$as_me:$LINENO: result: yes" >&5
14585echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014586 if test $enable_shared = "yes"
14587 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014588 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14589echo "$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 +000014590 { (exit 1); exit 1; }; }
14591 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014592else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014593 { echo "$as_me:$LINENO: result: no" >&5
14594echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014595fi
14596
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014597{ echo "$as_me:$LINENO: checking for dyld" >&5
14598echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014599case $ac_sys_system/$ac_sys_release in
14600 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601
Martin v. Löwis11437992002-04-12 09:54:03 +000014602cat >>confdefs.h <<\_ACEOF
14603#define WITH_DYLD 1
14604_ACEOF
14605
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014606 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14607echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014608 ;;
14609 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014610 { echo "$as_me:$LINENO: result: no" >&5
14611echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014612 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014613esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014614
Guido van Rossum0a516c91994-09-12 10:58:40 +000014615# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014616
Michael W. Hudson54241132001-12-07 15:38:26 +000014617
14618
14619
14620
Guido van Rossum0a516c91994-09-12 10:58:40 +000014621# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014622# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014623{ echo "$as_me:$LINENO: checking SO" >&5
14624echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014625if test -z "$SO"
14626then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014627 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014628 hp*|HP*)
14629 case `uname -m` in
14630 ia64) SO=.so;;
14631 *) SO=.sl;;
14632 esac
14633 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014634 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014635 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014636 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014637else
14638 # this might also be a termcap variable, see #610332
14639 echo
14640 echo '====================================================================='
14641 echo '+ +'
14642 echo '+ WARNING: You have set SO in your environment. +'
14643 echo '+ Do you really mean to change the extension for shared libraries? +'
14644 echo '+ Continuing in 10 seconds to let you to ponder. +'
14645 echo '+ +'
14646 echo '====================================================================='
14647 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014648fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014649{ echo "$as_me:$LINENO: result: $SO" >&5
14650echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014651
Georg Brandlb1441c72009-01-03 22:33:39 +000014652
Thomas Wouters477c8d52006-05-27 19:21:47 +000014653cat >>confdefs.h <<_ACEOF
14654#define SHLIB_EXT "$SO"
14655_ACEOF
14656
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014658# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014659# (Shared libraries in this instance are shared modules to be loaded into
14660# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014661{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14662echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014663if test -z "$LDSHARED"
14664then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014665 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014666 AIX*)
14667 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014668 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014669 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014670 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014671 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014672 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014673 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014674 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014675 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014676 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014677 hp*|HP*)
14678 if test "$GCC" = "yes"
14679 then LDSHARED='$(CC) -shared'
14680 else LDSHARED='ld -b';
14681 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014682 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014683 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014684 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14685 if test "$enable_framework" ; then
14686 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014687 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14688 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014689 else
14690 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014691 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014692 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014693 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014694 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14695 if test "$enable_framework" ; then
14696 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014697 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14698 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014699 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014700 # No framework, use the Python app as bundle-loader
14701 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014702 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014703 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014704 Darwin/*)
14705 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14706 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014707
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014708 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014709 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014710 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014711 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014712 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014713 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14714 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014715 else
14716 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14717 if test "$enable_framework" ; then
14718 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014719 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14720 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014721 else
14722 # No framework, use the Python app as bundle-loader
14723 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14724 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14725 fi
14726 fi
14727 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014728 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014729 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014730 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014731 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014732 then
Benjamin Petersonab0a7522010-03-14 15:18:25 +000014733 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014734 else
14735 LDSHARED="ld -Bshareable ${LDFLAGS}"
14736 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014737 OpenBSD*)
14738 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14739 then
14740 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14741 else
14742 case `uname -r` in
14743 [01].* | 2.[0-7] | 2.[0-7].*)
14744 LDSHARED="ld -Bshareable ${LDFLAGS}"
14745 ;;
14746 *)
14747 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14748 ;;
14749 esac
14750 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014751 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014752 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014753 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014754 then LDSHARED='$(CC) -shared'
14755 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014756 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014757 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014758 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014759 *) LDSHARED="ld";;
14760 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014761fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014762{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14763echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014764BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014765# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014766# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014767{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14768echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014769if test -z "$CCSHARED"
14770then
Guido van Rossum07397971997-04-29 21:49:50 +000014771 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014772 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014773 then CCSHARED="-fPIC";
14774 elif test `uname -p` = sparc;
14775 then CCSHARED="-xcode=pic32";
14776 else CCSHARED="-Kpic";
14777 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014778 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014779 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014780 else CCSHARED="+z";
14781 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014782 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014783 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014784 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014785 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014786 if test "$GCC" = "yes"
14787 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014788 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014789 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014790 SCO_SV*)
14791 if test "$GCC" = "yes"
14792 then CCSHARED="-fPIC"
14793 else CCSHARED="-Kpic -belf"
14794 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014795 IRIX*/6*) case $CC in
14796 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014797 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014798 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014799 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014800fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014801{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14802echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014803# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014804# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014805{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14806echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014807if test -z "$LINKFORSHARED"
14808then
Guido van Rossum07397971997-04-29 21:49:50 +000014809 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014810 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014811 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014812 LINKFORSHARED="-Wl,-E -Wl,+s";;
14813# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014814 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014815 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014816 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014818 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014819 if test "$enable_framework"
14820 then
Jack Jansenda49e192005-01-07 13:08:22 +000014821 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014822 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014823 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014824 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014825 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014826 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014827 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014828 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14829 then
14830 LINKFORSHARED="-Wl,--export-dynamic"
14831 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014832 SunOS/5*) case $CC in
14833 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014834 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014835 then
14836 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014837 fi;;
14838 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014839 CYGWIN*)
14840 if test $enable_shared = "no"
14841 then
14842 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14843 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014844 QNX*)
14845 # -Wl,-E causes the symbols to be added to the dynamic
14846 # symbol table so that they can be found when a module
14847 # is loaded. -N 2048K causes the stack size to be set
14848 # to 2048 kilobytes so that the stack doesn't overflow
14849 # when running test_compile.py.
14850 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014851 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014853{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14854echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014855
Michael W. Hudson54241132001-12-07 15:38:26 +000014856
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014857
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014858{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14859echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014860if test ! "$LIBRARY" = "$LDLIBRARY"
14861then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014862 case $ac_sys_system in
14863 CYGWIN*)
14864 # Cygwin needs CCSHARED when building extension DLLs
14865 # but not when building the interpreter DLL.
14866 CFLAGSFORSHARED='';;
14867 *)
14868 CFLAGSFORSHARED='$(CCSHARED)'
14869 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014871{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14872echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014873
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014874# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14875# library (with --enable-shared).
14876# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014877# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14878# if it is not required, since it creates a dependency of the shared library
14879# to LIBS. This, in turn, means that applications linking the shared libpython
14880# don't need to link LIBS explicitly. The default should be only changed
14881# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014882
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014883{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14884echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014885case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014886 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014887 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014888esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014889{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14890echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014891
14892
Guido van Rossum627b2d71993-12-24 10:39:16 +000014893# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014895{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14896echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014897if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014898 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014899else
Martin v. Löwis11437992002-04-12 09:54:03 +000014900 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014901LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014903/* confdefs.h. */
14904_ACEOF
14905cat confdefs.h >>conftest.$ac_ext
14906cat >>conftest.$ac_ext <<_ACEOF
14907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909/* Override any GCC internal prototype to avoid an error.
14910 Use char because int might match the return type of a GCC
14911 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014912#ifdef __cplusplus
14913extern "C"
14914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014915char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014916int
14917main ()
14918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 ;
14921 return 0;
14922}
14923_ACEOF
14924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014925if { (ac_try="$ac_link"
14926case "(($ac_try" in
14927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14928 *) ac_try_echo=$ac_try;;
14929esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014933 grep -v '^ *+' conftest.er1 >conftest.err
14934 rm -f conftest.er1
14935 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937 (exit $ac_status); } && {
14938 test -z "$ac_c_werror_flag" ||
14939 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014940 } && test -s conftest$ac_exeext &&
14941 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014943else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014944 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014945sed 's/^/| /' conftest.$ac_ext >&5
14946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949
14950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014951 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014952LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014953fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014954{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14955echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14956if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 cat >>confdefs.h <<_ACEOF
14958#define HAVE_LIBDL 1
14959_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014961 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014962
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014963fi
14964 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014965
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014966{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14967echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014968if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014970else
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014972LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014974/* confdefs.h. */
14975_ACEOF
14976cat confdefs.h >>conftest.$ac_ext
14977cat >>conftest.$ac_ext <<_ACEOF
14978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980/* Override any GCC internal prototype to avoid an error.
14981 Use char because int might match the return type of a GCC
14982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014983#ifdef __cplusplus
14984extern "C"
14985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014986char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014987int
14988main ()
14989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014990return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 ;
14992 return 0;
14993}
14994_ACEOF
14995rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996if { (ac_try="$ac_link"
14997case "(($ac_try" in
14998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14999 *) ac_try_echo=$ac_try;;
15000esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015004 grep -v '^ *+' conftest.er1 >conftest.err
15005 rm -f conftest.er1
15006 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 (exit $ac_status); } && {
15009 test -z "$ac_c_werror_flag" ||
15010 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015011 } && test -s conftest$ac_exeext &&
15012 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015014else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015016sed 's/^/| /' conftest.$ac_ext >&5
15017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020
15021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015023LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015025{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15026echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15027if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 cat >>confdefs.h <<_ACEOF
15029#define HAVE_LIBDLD 1
15030_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015032 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034fi
15035 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015036
Georg Brandlb1441c72009-01-03 22:33:39 +000015037# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015038if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015039 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15040echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015041if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015043else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015044 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015045cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015046/* confdefs.h. */
15047_ACEOF
15048cat confdefs.h >>conftest.$ac_ext
15049cat >>conftest.$ac_ext <<_ACEOF
15050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052/* Override any GCC internal prototype to avoid an error.
15053 Use char because int might match the return type of a GCC
15054 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015055#ifdef __cplusplus
15056extern "C"
15057#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015058char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015059int
15060main ()
15061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 ;
15064 return 0;
15065}
15066_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067for ac_lib in '' pthread rt posix4; do
15068 if test -z "$ac_lib"; then
15069 ac_res="none required"
15070 else
15071 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015072 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 fi
15074 rm -f conftest.$ac_objext conftest$ac_exeext
15075if { (ac_try="$ac_link"
15076case "(($ac_try" in
15077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15078 *) ac_try_echo=$ac_try;;
15079esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015082 ac_status=$?
15083 grep -v '^ *+' conftest.er1 >conftest.err
15084 rm -f conftest.er1
15085 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087 (exit $ac_status); } && {
15088 test -z "$ac_c_werror_flag" ||
15089 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015090 } && test -s conftest$ac_exeext &&
15091 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015093else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015094 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015095sed 's/^/| /' conftest.$ac_ext >&5
15096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097
Thomas Wouters477c8d52006-05-27 19:21:47 +000015098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099
15100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15101 conftest$ac_exeext
15102 if test "${ac_cv_search_sem_init+set}" = set; then
15103 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105done
15106if test "${ac_cv_search_sem_init+set}" = set; then
15107 :
15108else
15109 ac_cv_search_sem_init=no
15110fi
15111rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015112LIBS=$ac_func_search_save_LIBS
15113fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015114{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15115echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116ac_res=$ac_cv_search_sem_init
15117if test "$ac_res" != no; then
15118 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015119
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015120fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015121 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015122 # posix4 on Solaris 2.6
15123 # pthread (first!) on Linux
15124fi
15125
Martin v. Löwis19d17342003-06-14 21:03:05 +000015126# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015127{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15128echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015129if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015130 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015131else
15132 ac_check_lib_save_LIBS=$LIBS
15133LIBS="-lintl $LIBS"
15134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* confdefs.h. */
15136_ACEOF
15137cat confdefs.h >>conftest.$ac_ext
15138cat >>conftest.$ac_ext <<_ACEOF
15139/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141/* Override any GCC internal prototype to avoid an error.
15142 Use char because int might match the return type of a GCC
15143 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015144#ifdef __cplusplus
15145extern "C"
15146#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015147char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015148int
15149main ()
15150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015152 ;
15153 return 0;
15154}
15155_ACEOF
15156rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157if { (ac_try="$ac_link"
15158case "(($ac_try" in
15159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15160 *) ac_try_echo=$ac_try;;
15161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015165 grep -v '^ *+' conftest.er1 >conftest.err
15166 rm -f conftest.er1
15167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169 (exit $ac_status); } && {
15170 test -z "$ac_c_werror_flag" ||
15171 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015172 } && test -s conftest$ac_exeext &&
15173 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174 ac_cv_lib_intl_textdomain=yes
15175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015177sed 's/^/| /' conftest.$ac_ext >&5
15178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181
15182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015184LIBS=$ac_check_lib_save_LIBS
15185fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015186{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15187echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15188if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189
15190cat >>confdefs.h <<\_ACEOF
15191#define WITH_LIBINTL 1
15192_ACEOF
15193
Brett Cannonc6d936e2009-06-07 20:09:53 +000015194 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015195fi
15196
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015197
15198# checks for system dependent C++ extensions support
15199case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015200 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15201echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015203/* confdefs.h. */
15204_ACEOF
15205cat confdefs.h >>conftest.$ac_ext
15206cat >>conftest.$ac_ext <<_ACEOF
15207/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015208#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015209int
15210main ()
15211{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015212loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ;
15214 return 0;
15215}
15216_ACEOF
15217rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218if { (ac_try="$ac_link"
15219case "(($ac_try" in
15220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15221 *) ac_try_echo=$ac_try;;
15222esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015226 grep -v '^ *+' conftest.er1 >conftest.err
15227 rm -f conftest.er1
15228 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230 (exit $ac_status); } && {
15231 test -z "$ac_c_werror_flag" ||
15232 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015233 } && test -s conftest$ac_exeext &&
15234 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236cat >>confdefs.h <<\_ACEOF
15237#define AIX_GENUINE_CPLUSPLUS 1
15238_ACEOF
15239
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015240 { echo "$as_me:$LINENO: result: yes" >&5
15241echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015244sed 's/^/| /' conftest.$ac_ext >&5
15245
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015246 { echo "$as_me:$LINENO: result: no" >&5
15247echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015248fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249
15250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015251 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015252 *) ;;
15253esac
15254
Guido van Rossum70c7f481998-03-26 18:44:10 +000015255# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015256{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15257echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015258if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015259 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015260else
Martin v. Löwis11437992002-04-12 09:54:03 +000015261 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015262LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015264/* confdefs.h. */
15265_ACEOF
15266cat confdefs.h >>conftest.$ac_ext
15267cat >>conftest.$ac_ext <<_ACEOF
15268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270/* Override any GCC internal prototype to avoid an error.
15271 Use char because int might match the return type of a GCC
15272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015273#ifdef __cplusplus
15274extern "C"
15275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015276char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015277int
15278main ()
15279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015281 ;
15282 return 0;
15283}
15284_ACEOF
15285rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286if { (ac_try="$ac_link"
15287case "(($ac_try" in
15288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15289 *) ac_try_echo=$ac_try;;
15290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015294 grep -v '^ *+' conftest.er1 >conftest.err
15295 rm -f conftest.er1
15296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298 (exit $ac_status); } && {
15299 test -z "$ac_c_werror_flag" ||
15300 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015301 } && test -s conftest$ac_exeext &&
15302 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015304else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015306sed 's/^/| /' conftest.$ac_ext >&5
15307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310
15311rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015312 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015314fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015315{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15316echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15317if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015318 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015319fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015320 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015321{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15322echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015323if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015324 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015325else
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015327LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015329/* confdefs.h. */
15330_ACEOF
15331cat confdefs.h >>conftest.$ac_ext
15332cat >>conftest.$ac_ext <<_ACEOF
15333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015334
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335/* Override any GCC internal prototype to avoid an error.
15336 Use char because int might match the return type of a GCC
15337 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015338#ifdef __cplusplus
15339extern "C"
15340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015341char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015342int
15343main ()
15344{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 ;
15347 return 0;
15348}
15349_ACEOF
15350rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351if { (ac_try="$ac_link"
15352case "(($ac_try" in
15353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15354 *) ac_try_echo=$ac_try;;
15355esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015359 grep -v '^ *+' conftest.er1 >conftest.err
15360 rm -f conftest.er1
15361 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015363 (exit $ac_status); } && {
15364 test -z "$ac_c_werror_flag" ||
15365 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015366 } && test -s conftest$ac_exeext &&
15367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015370 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015371sed 's/^/| /' conftest.$ac_ext >&5
15372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375
15376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015378LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015379fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015380{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15381echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15382if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015383 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015384fi
15385 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015386
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015387{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15388echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015391if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015393{ echo "$as_me:$LINENO: result: $withval" >&5
15394echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015395LIBS="$withval $LIBS"
15396
15397else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015398 { echo "$as_me:$LINENO: result: no" >&5
15399echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400fi
15401
Guido van Rossum7f43da71994-08-01 12:15:30 +000015402
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015403if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015404 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15405set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15406{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15407echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15408if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15409 echo $ECHO_N "(cached) $ECHO_C" >&6
15410else
15411 case $PKG_CONFIG in
15412 [\\/]* | ?:[\\/]*)
15413 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15414 ;;
15415 *)
15416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15417for as_dir in $PATH
15418do
15419 IFS=$as_save_IFS
15420 test -z "$as_dir" && as_dir=.
15421 for ac_exec_ext in '' $ac_executable_extensions; do
15422 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15423 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15424 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15425 break 2
15426 fi
15427done
15428done
15429IFS=$as_save_IFS
15430
15431 ;;
15432esac
15433fi
15434PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15435if test -n "$PKG_CONFIG"; then
15436 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15437echo "${ECHO_T}$PKG_CONFIG" >&6; }
15438else
15439 { echo "$as_me:$LINENO: result: no" >&5
15440echo "${ECHO_T}no" >&6; }
15441fi
15442
15443
15444fi
15445if test -z "$ac_cv_path_PKG_CONFIG"; then
15446 ac_pt_PKG_CONFIG=$PKG_CONFIG
15447 # Extract the first word of "pkg-config", so it can be a program name with args.
15448set dummy pkg-config; ac_word=$2
15449{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15450echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15451if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15452 echo $ECHO_N "(cached) $ECHO_C" >&6
15453else
15454 case $ac_pt_PKG_CONFIG in
15455 [\\/]* | ?:[\\/]*)
15456 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15457 ;;
15458 *)
15459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15460for as_dir in $PATH
15461do
15462 IFS=$as_save_IFS
15463 test -z "$as_dir" && as_dir=.
15464 for ac_exec_ext in '' $ac_executable_extensions; do
15465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15466 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15467 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15468 break 2
15469 fi
15470done
15471done
15472IFS=$as_save_IFS
15473
15474 ;;
15475esac
15476fi
15477ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15478if test -n "$ac_pt_PKG_CONFIG"; then
15479 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15480echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15481else
15482 { echo "$as_me:$LINENO: result: no" >&5
15483echo "${ECHO_T}no" >&6; }
15484fi
15485
15486 if test "x$ac_pt_PKG_CONFIG" = x; then
15487 PKG_CONFIG=""
15488 else
15489 case $cross_compiling:$ac_tool_warned in
15490yes:)
15491{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15492whose name does not start with the host triplet. If you think this
15493configuration is useful to you, please write to autoconf@gnu.org." >&5
15494echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15495whose name does not start with the host triplet. If you think this
15496configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15497ac_tool_warned=yes ;;
15498esac
15499 PKG_CONFIG=$ac_pt_PKG_CONFIG
15500 fi
15501else
15502 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15503fi
15504
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015505
15506# Check for use of the system expat library
15507{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15508echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15509
15510# Check whether --with-system_expat was given.
15511if test "${with_system_expat+set}" = set; then
15512 withval=$with_system_expat;
15513fi
15514
15515
15516{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15517echo "${ECHO_T}$with_system_expat" >&6; }
15518
15519# Check for use of the system libffi library
15520{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15521echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15522
15523# Check whether --with-system_ffi was given.
15524if test "${with_system_ffi+set}" = set; then
15525 withval=$with_system_ffi;
15526fi
15527
15528
15529if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000015530 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15531else
15532 LIBFFI_INCLUDEDIR=""
15533fi
15534
15535
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015536{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15537echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015538
Matthias Klose55708cc2009-04-30 08:06:49 +000015539# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015540{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15541echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015542
15543# Check whether --with-dbmliborder was given.
15544if test "${with_dbmliborder+set}" = set; then
15545 withval=$with_dbmliborder;
15546if test x$with_dbmliborder = xyes
15547then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015548{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15549echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015550 { (exit 1); exit 1; }; }
15551else
15552 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15553 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15554 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015555 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15556echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015557 { (exit 1); exit 1; }; }
15558 fi
15559 done
15560fi
15561fi
15562
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015563{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15564echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015565
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015566# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015567
15568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015569{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15570echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015573if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574 withval=$with_signal_module;
15575fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015576
15577
15578if test -z "$with_signal_module"
15579then with_signal_module="yes"
15580fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015581{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15582echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015583
15584if test "${with_signal_module}" = "yes"; then
15585 USE_SIGNAL_MODULE=""
15586 SIGNAL_OBJS=""
15587else
15588 USE_SIGNAL_MODULE="#"
15589 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15590fi
15591
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015592# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015593
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015594USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015595
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015596{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15597echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015598
Guido van Rossumec2f0731997-01-22 20:54:01 +000015599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015601if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015603{ echo "$as_me:$LINENO: result: $withval" >&5
15604echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015605LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015606if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015607 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015608fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015609else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015610 { echo "$as_me:$LINENO: result: no" >&5
15611echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612fi
15613
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615# Templates for things AC_DEFINEd more than once.
15616# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015617
15618
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620
15621
15622
15623
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015624{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15625echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015628if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629 withval=$with_threads;
15630fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015631
15632
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015633# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015636if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637 withval=$with_thread; with_threads=$with_thread
15638fi
15639
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015640
15641if test -z "$with_threads"
15642then with_threads="yes"
15643fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015644{ echo "$as_me:$LINENO: result: $with_threads" >&5
15645echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015646
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015647
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015648if test "$with_threads" = "no"
15649then
15650 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015651elif test "$ac_cv_pthread_is_default" = yes
15652then
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015654#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015656
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015657 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015658 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015659#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015661
15662 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015664elif test "$ac_cv_kpthread" = "yes"
15665then
15666 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015667 if test "$ac_cv_cxx_thread" = "yes"; then
15668 CXX="$CXX -Kpthread"
15669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015671#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015672_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015673
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015674 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015675 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015676elif test "$ac_cv_kthread" = "yes"
15677then
15678 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015679 if test "$ac_cv_cxx_thread" = "yes"; then
15680 CXX="$CXX -Kthread"
15681 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015682 cat >>confdefs.h <<\_ACEOF
15683#define WITH_THREAD 1
15684_ACEOF
15685
15686 posix_threads=yes
15687 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015688elif test "$ac_cv_pthread" = "yes"
15689then
15690 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015691 if test "$ac_cv_cxx_thread" = "yes"; then
15692 CXX="$CXX -pthread"
15693 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015694 cat >>confdefs.h <<\_ACEOF
15695#define WITH_THREAD 1
15696_ACEOF
15697
15698 posix_threads=yes
15699 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015700else
15701 if test ! -z "$with_threads" -a -d "$with_threads"
15702 then LDFLAGS="$LDFLAGS -L$with_threads"
15703 fi
15704 if test ! -z "$withval" -a -d "$withval"
15705 then LDFLAGS="$LDFLAGS -L$withval"
15706 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015707
15708 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015709 # define _POSIX_THREADS in unistd.h. Some apparently don't
15710 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015711 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15712echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015714/* confdefs.h. */
15715_ACEOF
15716cat confdefs.h >>conftest.$ac_ext
15717cat >>conftest.$ac_ext <<_ACEOF
15718/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015719
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015720#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015721#ifdef _POSIX_THREADS
15722yes
15723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015724
15725_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015727 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015728 unistd_defines_pthreads=yes
15729else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015730 unistd_defines_pthreads=no
15731fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000015732rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015733
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015734 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15735echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015736
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015738#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015739_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015740
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015742 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15743echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015744if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015745 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015746fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015747{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15748echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015749else
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015751{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15752echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015754/* confdefs.h. */
15755_ACEOF
15756cat confdefs.h >>conftest.$ac_ext
15757cat >>conftest.$ac_ext <<_ACEOF
15758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015759$ac_includes_default
15760#include <cthreads.h>
15761_ACEOF
15762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763if { (ac_try="$ac_compile"
15764case "(($ac_try" in
15765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766 *) ac_try_echo=$ac_try;;
15767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015771 grep -v '^ *+' conftest.er1 >conftest.err
15772 rm -f conftest.er1
15773 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 (exit $ac_status); } && {
15776 test -z "$ac_c_werror_flag" ||
15777 test ! -s conftest.err
15778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 ac_header_compiler=yes
15780else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015782sed 's/^/| /' conftest.$ac_ext >&5
15783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786
15787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015788{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15789echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
15791# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015792{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15793echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015795/* confdefs.h. */
15796_ACEOF
15797cat confdefs.h >>conftest.$ac_ext
15798cat >>conftest.$ac_ext <<_ACEOF
15799/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015800#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015801_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802if { (ac_try="$ac_cpp conftest.$ac_ext"
15803case "(($ac_try" in
15804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15805 *) ac_try_echo=$ac_try;;
15806esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015810 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 rm -f conftest.er1
15812 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 (exit $ac_status); } >/dev/null && {
15815 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15816 test ! -s conftest.err
15817 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015818 ac_header_preproc=yes
15819else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015821sed 's/^/| /' conftest.$ac_ext >&5
15822
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825
Martin v. Löwis11437992002-04-12 09:54:03 +000015826rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015827{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15828echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015829
15830# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15832 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015833 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15834echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15835 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15836echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015837 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015838 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015839 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015840 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15841echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15842 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15843echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15844 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15845echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15846 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15847echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15848 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15849echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15850 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15851echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015853## -------------------------------------- ##
15854## Report this to http://bugs.python.org/ ##
15855## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015856_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015857 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015858 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015859esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015860{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15861echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015862if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015863 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015864else
15865 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015866fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015867{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15868echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015871if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015872 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015873#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015874_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015877#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015878_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015879
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
15881cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015882#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015883_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015884
15885 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015886 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015887else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015888
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015890 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15891echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015892if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015893 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015894fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015895{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15896echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015897else
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015899{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15900echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015901cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015902/* confdefs.h. */
15903_ACEOF
15904cat confdefs.h >>conftest.$ac_ext
15905cat >>conftest.$ac_ext <<_ACEOF
15906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015907$ac_includes_default
15908#include <mach/cthreads.h>
15909_ACEOF
15910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911if { (ac_try="$ac_compile"
15912case "(($ac_try" in
15913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15914 *) ac_try_echo=$ac_try;;
15915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015919 grep -v '^ *+' conftest.er1 >conftest.err
15920 rm -f conftest.er1
15921 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923 (exit $ac_status); } && {
15924 test -z "$ac_c_werror_flag" ||
15925 test ! -s conftest.err
15926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015927 ac_header_compiler=yes
15928else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015930sed 's/^/| /' conftest.$ac_ext >&5
15931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934
15935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015936{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15937echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015938
15939# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015940{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15941echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015943/* confdefs.h. */
15944_ACEOF
15945cat confdefs.h >>conftest.$ac_ext
15946cat >>conftest.$ac_ext <<_ACEOF
15947/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015948#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015949_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015950if { (ac_try="$ac_cpp conftest.$ac_ext"
15951case "(($ac_try" in
15952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15953 *) ac_try_echo=$ac_try;;
15954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015958 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 rm -f conftest.er1
15960 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962 (exit $ac_status); } >/dev/null && {
15963 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15964 test ! -s conftest.err
15965 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 ac_header_preproc=yes
15967else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015969sed 's/^/| /' conftest.$ac_ext >&5
15970
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015975{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15976echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015977
15978# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015979case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15980 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015981 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15982echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15983 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15984echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015986 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015987 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015988 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15989echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15990 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15991echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15992 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15993echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15994 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15995echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15996 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15997echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15998 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15999echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016001## -------------------------------------- ##
16002## Report this to http://bugs.python.org/ ##
16003## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016004_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016005 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016006 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016008{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16009echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016011 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016012else
16013 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016015{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16016echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016017
16018fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016019if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016021#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016022_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016023
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016025#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016026_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016027
Martin v. Löwis11437992002-04-12 09:54:03 +000016028
16029cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016030#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016031_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016032
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016033 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016034else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016035
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016036 # Just looking for pthread_create in libpthread is not enough:
16037 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16038 # So we really have to include pthread.h, and then link.
16039 _libs=$LIBS
16040 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016041 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16042echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016044/* confdefs.h. */
16045_ACEOF
16046cat confdefs.h >>conftest.$ac_ext
16047cat >>conftest.$ac_ext <<_ACEOF
16048/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016049#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016050
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016051void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016052int
16053main ()
16054{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016055
16056pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 ;
16058 return 0;
16059}
16060_ACEOF
16061rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062if { (ac_try="$ac_link"
16063case "(($ac_try" in
16064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16065 *) ac_try_echo=$ac_try;;
16066esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016070 grep -v '^ *+' conftest.er1 >conftest.err
16071 rm -f conftest.er1
16072 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016074 (exit $ac_status); } && {
16075 test -z "$ac_c_werror_flag" ||
16076 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016077 } && test -s conftest$ac_exeext &&
16078 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016079
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016080 { echo "$as_me:$LINENO: result: yes" >&5
16081echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016083#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016084_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016085
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016086 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016087 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016090sed 's/^/| /' conftest.$ac_ext >&5
16091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016093 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016094 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16095echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016096if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016097 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016098else
Martin v. Löwis11437992002-04-12 09:54:03 +000016099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016100/* confdefs.h. */
16101_ACEOF
16102cat confdefs.h >>conftest.$ac_ext
16103cat >>conftest.$ac_ext <<_ACEOF
16104/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016105/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16106 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16107#define pthread_detach innocuous_pthread_detach
16108
Guido van Rossumad678af1998-10-02 14:42:15 +000016109/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016110 which can conflict with char pthread_detach (); below.
16111 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016112 <limits.h> exists even on freestanding compilers. */
16113
16114#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016115# include <limits.h>
16116#else
16117# include <assert.h>
16118#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016119
16120#undef pthread_detach
16121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122/* Override any GCC internal prototype to avoid an error.
16123 Use char because int might match the return type of a GCC
16124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016125#ifdef __cplusplus
16126extern "C"
16127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016128char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016129/* The GNU C library defines this for functions which it implements
16130 to always fail with ENOSYS. Some functions are actually named
16131 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016132#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016133choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016134#endif
16135
Skip Montanaro6dead952003-09-25 14:50:04 +000016136int
16137main ()
16138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 ;
16141 return 0;
16142}
16143_ACEOF
16144rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016145if { (ac_try="$ac_link"
16146case "(($ac_try" in
16147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16148 *) ac_try_echo=$ac_try;;
16149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016153 grep -v '^ *+' conftest.er1 >conftest.err
16154 rm -f conftest.er1
16155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157 (exit $ac_status); } && {
16158 test -z "$ac_c_werror_flag" ||
16159 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016160 } && test -s conftest$ac_exeext &&
16161 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016162 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016165sed 's/^/| /' conftest.$ac_ext >&5
16166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169
16170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016171 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016172fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016173{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16174echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16175if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016176 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016177#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016178_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016179
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016180 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016181 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016182else
Guido van Rossumad678af1998-10-02 14:42:15 +000016183
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016184 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16185echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016186if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016188else
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016190LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016192/* confdefs.h. */
16193_ACEOF
16194cat confdefs.h >>conftest.$ac_ext
16195cat >>conftest.$ac_ext <<_ACEOF
16196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198/* Override any GCC internal prototype to avoid an error.
16199 Use char because int might match the return type of a GCC
16200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016201#ifdef __cplusplus
16202extern "C"
16203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016204char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016205int
16206main ()
16207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 ;
16210 return 0;
16211}
16212_ACEOF
16213rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214if { (ac_try="$ac_link"
16215case "(($ac_try" in
16216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16217 *) ac_try_echo=$ac_try;;
16218esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016222 grep -v '^ *+' conftest.er1 >conftest.err
16223 rm -f conftest.er1
16224 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 (exit $ac_status); } && {
16227 test -z "$ac_c_werror_flag" ||
16228 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016229 } && test -s conftest$ac_exeext &&
16230 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016232else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016234sed 's/^/| /' conftest.$ac_ext >&5
16235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238
16239rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016241LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016242fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016243{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16244echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16245if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016247#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016248_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016249
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016250 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016251 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016252 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016253else
Greg Steinadf63d62000-07-05 10:38:09 +000016254
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016255 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16256echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016257if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016258 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016259else
Martin v. Löwis11437992002-04-12 09:54:03 +000016260 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016261LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269/* Override any GCC internal prototype to avoid an error.
16270 Use char because int might match the return type of a GCC
16271 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016272#ifdef __cplusplus
16273extern "C"
16274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016275char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016276int
16277main ()
16278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016280 ;
16281 return 0;
16282}
16283_ACEOF
16284rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285if { (ac_try="$ac_link"
16286case "(($ac_try" in
16287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16288 *) ac_try_echo=$ac_try;;
16289esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016293 grep -v '^ *+' conftest.er1 >conftest.err
16294 rm -f conftest.er1
16295 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 (exit $ac_status); } && {
16298 test -z "$ac_c_werror_flag" ||
16299 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016300 } && test -s conftest$ac_exeext &&
16301 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016305sed 's/^/| /' conftest.$ac_ext >&5
16306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016307 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309
16310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016312LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016313fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016314{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16315echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16316if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016318#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016319_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016320
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016321 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016322 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016323 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016324else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016325
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016326 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16327echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016328if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016330else
Martin v. Löwis11437992002-04-12 09:54:03 +000016331 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016332LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016334/* confdefs.h. */
16335_ACEOF
16336cat confdefs.h >>conftest.$ac_ext
16337cat >>conftest.$ac_ext <<_ACEOF
16338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340/* Override any GCC internal prototype to avoid an error.
16341 Use char because int might match the return type of a GCC
16342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016343#ifdef __cplusplus
16344extern "C"
16345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016346char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016347int
16348main ()
16349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 ;
16352 return 0;
16353}
16354_ACEOF
16355rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356if { (ac_try="$ac_link"
16357case "(($ac_try" in
16358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16359 *) ac_try_echo=$ac_try;;
16360esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016364 grep -v '^ *+' conftest.er1 >conftest.err
16365 rm -f conftest.er1
16366 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016368 (exit $ac_status); } && {
16369 test -z "$ac_c_werror_flag" ||
16370 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016371 } && test -s conftest$ac_exeext &&
16372 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016373 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016376sed 's/^/| /' conftest.$ac_ext >&5
16377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380
16381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016382 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016383LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016384fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016385{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16386echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16387if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016389#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016390_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016392 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016393 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016394 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016395else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016396
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016397 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16398echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016399if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016400 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016401else
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016403LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411/* Override any GCC internal prototype to avoid an error.
16412 Use char because int might match the return type of a GCC
16413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016414#ifdef __cplusplus
16415extern "C"
16416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016417char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016418int
16419main ()
16420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 ;
16423 return 0;
16424}
16425_ACEOF
16426rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427if { (ac_try="$ac_link"
16428case "(($ac_try" in
16429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16430 *) ac_try_echo=$ac_try;;
16431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 grep -v '^ *+' conftest.er1 >conftest.err
16436 rm -f conftest.er1
16437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016439 (exit $ac_status); } && {
16440 test -z "$ac_c_werror_flag" ||
16441 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016442 } && test -s conftest$ac_exeext &&
16443 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016447sed 's/^/| /' conftest.$ac_ext >&5
16448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016449 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016451
16452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016453 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016454LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016455fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016456{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16457echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16458if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016460#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016461_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016462
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016463 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016464 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016465 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016466else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016467
Martin v. Löwis130fb172001-07-19 11:00:41 +000016468 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016469fi
16470
Guido van Rossum627b2d71993-12-24 10:39:16 +000016471
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016472fi
16473
Guido van Rossum0be3e491997-05-22 20:33:33 +000016474fi
16475
Guido van Rossum49545951997-12-02 19:28:29 +000016476fi
16477
Guido van Rossumb93a8621998-05-07 13:27:32 +000016478fi
16479
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481
16482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016483 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484fi
16485
Martin v. Löwis11437992002-04-12 09:54:03 +000016486
16487fi
16488
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016489
Michael W. Hudson54241132001-12-07 15:38:26 +000016490
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016491 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16492echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016493if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016495else
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016497LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016499/* confdefs.h. */
16500_ACEOF
16501cat confdefs.h >>conftest.$ac_ext
16502cat >>conftest.$ac_ext <<_ACEOF
16503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505/* Override any GCC internal prototype to avoid an error.
16506 Use char because int might match the return type of a GCC
16507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016508#ifdef __cplusplus
16509extern "C"
16510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016511char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016512int
16513main ()
16514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 ;
16517 return 0;
16518}
16519_ACEOF
16520rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521if { (ac_try="$ac_link"
16522case "(($ac_try" in
16523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16524 *) ac_try_echo=$ac_try;;
16525esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016529 grep -v '^ *+' conftest.er1 >conftest.err
16530 rm -f conftest.er1
16531 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 (exit $ac_status); } && {
16534 test -z "$ac_c_werror_flag" ||
16535 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016536 } && test -s conftest$ac_exeext &&
16537 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016539else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016541sed 's/^/| /' conftest.$ac_ext >&5
16542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016545
16546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016549fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016550{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16551echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16552if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016554#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016555_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016556
Martin v. Löwis130fb172001-07-19 11:00:41 +000016557 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016558 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016559 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016560fi
16561
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016562
Neal Norwitza978ab02002-11-02 16:58:05 +000016563 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016564 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16565echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016566if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016568else
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016570LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016571cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016572/* confdefs.h. */
16573_ACEOF
16574cat confdefs.h >>conftest.$ac_ext
16575cat >>conftest.$ac_ext <<_ACEOF
16576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578/* Override any GCC internal prototype to avoid an error.
16579 Use char because int might match the return type of a GCC
16580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016581#ifdef __cplusplus
16582extern "C"
16583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016584char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016585int
16586main ()
16587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 ;
16590 return 0;
16591}
16592_ACEOF
16593rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594if { (ac_try="$ac_link"
16595case "(($ac_try" in
16596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16597 *) ac_try_echo=$ac_try;;
16598esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016602 grep -v '^ *+' conftest.er1 >conftest.err
16603 rm -f conftest.er1
16604 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606 (exit $ac_status); } && {
16607 test -z "$ac_c_werror_flag" ||
16608 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016609 } && test -s conftest$ac_exeext &&
16610 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016611 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016614sed 's/^/| /' conftest.$ac_ext >&5
16615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618
16619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016621LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016622fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016623{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16624echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16625if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016626 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016627#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016628_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016629
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016630 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016631 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016632 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016633fi
16634
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016635 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016636
Martin v. Löwis130fb172001-07-19 11:00:41 +000016637 if test "$USE_THREAD_MODULE" != "#"
16638 then
16639 # If the above checks didn't disable threads, (at least) OSF1
16640 # needs this '-threads' argument during linking.
16641 case $ac_sys_system in
16642 OSF1) LDLAST=-threads;;
16643 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016644 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016645fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016646
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016647if test "$posix_threads" = "yes"; then
16648 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016649
16650cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016651#define _POSIX_THREADS 1
16652_ACEOF
16653
16654 fi
16655
16656 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16657 case $ac_sys_system/$ac_sys_release in
16658 SunOS/5.6)
16659cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016660#define HAVE_PTHREAD_DESTRUCTOR 1
16661_ACEOF
16662
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016663 ;;
16664 SunOS/5.8)
16665cat >>confdefs.h <<\_ACEOF
16666#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16667_ACEOF
16668
16669 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016670 AIX/5)
16671cat >>confdefs.h <<\_ACEOF
16672#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16673_ACEOF
16674
16675 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016676 esac
16677
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016678 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16679echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016680 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016681 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016682else
16683 if test "$cross_compiling" = yes; then
16684 ac_cv_pthread_system_supported=no
16685else
16686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016687/* confdefs.h. */
16688_ACEOF
16689cat confdefs.h >>conftest.$ac_ext
16690cat >>conftest.$ac_ext <<_ACEOF
16691/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016692#include <pthread.h>
16693 void *foo(void *parm) {
16694 return NULL;
16695 }
16696 main() {
16697 pthread_attr_t attr;
16698 pthread_t id;
16699 if (pthread_attr_init(&attr)) exit(-1);
16700 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16701 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16702 exit(0);
16703 }
16704_ACEOF
16705rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706if { (ac_try="$ac_link"
16707case "(($ac_try" in
16708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16709 *) ac_try_echo=$ac_try;;
16710esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716 { (case "(($ac_try" in
16717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16718 *) ac_try_echo=$ac_try;;
16719esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016724 (exit $ac_status); }; }; then
16725 ac_cv_pthread_system_supported=yes
16726else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016727 echo "$as_me: program exited with status $ac_status" >&5
16728echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016729sed 's/^/| /' conftest.$ac_ext >&5
16730
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016731( exit $ac_status )
16732ac_cv_pthread_system_supported=no
16733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734rm -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 +000016735fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737
16738
Guido van Rossum627b2d71993-12-24 10:39:16 +000016739fi
16740
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016741 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16742echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016743 if test "$ac_cv_pthread_system_supported" = "yes"; then
16744
16745cat >>confdefs.h <<\_ACEOF
16746#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16747_ACEOF
16748
16749 fi
16750
16751for ac_func in pthread_sigmask
16752do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016753as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16754{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16755echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016757 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016758else
16759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016760/* confdefs.h. */
16761_ACEOF
16762cat confdefs.h >>conftest.$ac_ext
16763cat >>conftest.$ac_ext <<_ACEOF
16764/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016765/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16766 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16767#define $ac_func innocuous_$ac_func
16768
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016769/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016770 which can conflict with char $ac_func (); below.
16771 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016772 <limits.h> exists even on freestanding compilers. */
16773
16774#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016775# include <limits.h>
16776#else
16777# include <assert.h>
16778#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016779
16780#undef $ac_func
16781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016782/* Override any GCC internal prototype to avoid an error.
16783 Use char because int might match the return type of a GCC
16784 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016785#ifdef __cplusplus
16786extern "C"
16787#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016788char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016789/* The GNU C library defines this for functions which it implements
16790 to always fail with ENOSYS. Some functions are actually named
16791 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016792#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016793choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016794#endif
16795
Skip Montanaro6dead952003-09-25 14:50:04 +000016796int
16797main ()
16798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016799return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016800 ;
16801 return 0;
16802}
16803_ACEOF
16804rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016805if { (ac_try="$ac_link"
16806case "(($ac_try" in
16807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808 *) ac_try_echo=$ac_try;;
16809esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016811 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016813 grep -v '^ *+' conftest.er1 >conftest.err
16814 rm -f conftest.er1
16815 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817 (exit $ac_status); } && {
16818 test -z "$ac_c_werror_flag" ||
16819 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016820 } && test -s conftest$ac_exeext &&
16821 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016822 eval "$as_ac_var=yes"
16823else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016825sed 's/^/| /' conftest.$ac_ext >&5
16826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829
16830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016831 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016832fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016833ac_res=`eval echo '${'$as_ac_var'}'`
16834 { echo "$as_me:$LINENO: result: $ac_res" >&5
16835echo "${ECHO_T}$ac_res" >&6; }
16836if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016837 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016838#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016840 case $ac_sys_system in
16841 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016842
Jason Tishlerfac083d2003-07-22 15:20:49 +000016843cat >>confdefs.h <<\_ACEOF
16844#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16845_ACEOF
16846
16847 ;;
16848 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016849fi
16850done
16851
16852fi
16853
16854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016855# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
16857
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016858{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16859echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016861if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016863 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016864 { echo "$as_me:$LINENO: result: no" >&5
16865echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016866 ipv6=no
16867 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016868 *) { echo "$as_me:$LINENO: result: yes" >&5
16869echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016870 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873
16874 ipv6=yes
16875 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016876 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016877else
Martin v. Löwis11437992002-04-12 09:54:03 +000016878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016879 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016880 { echo "$as_me:$LINENO: result: no" >&5
16881echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016882 ipv6=no
16883
16884else
Martin v. Löwis11437992002-04-12 09:54:03 +000016885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016886/* confdefs.h. */
16887_ACEOF
16888cat confdefs.h >>conftest.$ac_ext
16889cat >>conftest.$ac_ext <<_ACEOF
16890/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016891 /* AF_INET6 available check */
16892#include <sys/types.h>
16893#include <sys/socket.h>
16894main()
16895{
16896 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16897 exit(1);
16898 else
16899 exit(0);
16900}
16901
Martin v. Löwis11437992002-04-12 09:54:03 +000016902_ACEOF
16903rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904if { (ac_try="$ac_link"
16905case "(($ac_try" in
16906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16907 *) ac_try_echo=$ac_try;;
16908esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 { (case "(($ac_try" in
16915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16916 *) ac_try_echo=$ac_try;;
16917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016920 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016922 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016923 { echo "$as_me:$LINENO: result: yes" >&5
16924echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925 ipv6=yes
16926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016927 echo "$as_me: program exited with status $ac_status" >&5
16928echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016929sed 's/^/| /' conftest.$ac_ext >&5
16930
Martin v. Löwis11437992002-04-12 09:54:03 +000016931( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016932{ echo "$as_me:$LINENO: result: no" >&5
16933echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934 ipv6=no
16935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936rm -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 +000016937fi
16938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016939
16940
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016941if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016942 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16943echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016945/* confdefs.h. */
16946_ACEOF
16947cat confdefs.h >>conftest.$ac_ext
16948cat >>conftest.$ac_ext <<_ACEOF
16949/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016950#include <sys/types.h>
16951#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016952int
16953main ()
16954{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016955struct sockaddr_in6 x;
16956x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 ;
16958 return 0;
16959}
16960_ACEOF
16961rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962if { (ac_try="$ac_compile"
16963case "(($ac_try" in
16964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16965 *) ac_try_echo=$ac_try;;
16966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016970 grep -v '^ *+' conftest.er1 >conftest.err
16971 rm -f conftest.er1
16972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974 (exit $ac_status); } && {
16975 test -z "$ac_c_werror_flag" ||
16976 test ! -s conftest.err
16977 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016978 { echo "$as_me:$LINENO: result: yes" >&5
16979echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016980 ipv6=yes
16981else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016983sed 's/^/| /' conftest.$ac_ext >&5
16984
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016985 { echo "$as_me:$LINENO: result: no" >&5
16986echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016987 ipv6=no
16988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989
16990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016991fi
16992
16993if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016995#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016996_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016997
16998fi
16999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000fi
17001
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017002
17003ipv6type=unknown
17004ipv6lib=none
17005ipv6trylibc=no
17006
17007if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017008 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17009echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017010 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17011 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017012 case $i in
17013 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017015/* confdefs.h. */
17016_ACEOF
17017cat confdefs.h >>conftest.$ac_ext
17018cat >>conftest.$ac_ext <<_ACEOF
17019/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017021#include <netinet/in.h>
17022#ifdef IPV6_INRIA_VERSION
17023yes
17024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017027 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017028 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017030rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017031
17032 ;;
17033 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017035/* confdefs.h. */
17036_ACEOF
17037cat confdefs.h >>conftest.$ac_ext
17038cat >>conftest.$ac_ext <<_ACEOF
17039/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017040
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017041#include <netinet/in.h>
17042#ifdef __KAME__
17043yes
17044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017045_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017047 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017048 ipv6type=$i;
17049 ipv6lib=inet6
17050 ipv6libdir=/usr/local/v6/lib
17051 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017052fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017053rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017054
17055 ;;
17056 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017058/* confdefs.h. */
17059_ACEOF
17060cat confdefs.h >>conftest.$ac_ext
17061cat >>conftest.$ac_ext <<_ACEOF
17062/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017063
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064#include <features.h>
17065#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17066yes
17067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017068_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017070 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017071 ipv6type=$i;
17072 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017073fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017074rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017075
17076 ;;
17077 linux-inet6)
17078 if test -d /usr/inet6; then
17079 ipv6type=$i
17080 ipv6lib=inet6
17081 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017082 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017083 fi
17084 ;;
17085 solaris)
17086 if test -f /etc/netconfig; then
17087 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17088 ipv6type=$i
17089 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017090 fi
17091 fi
17092 ;;
17093 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017095/* confdefs.h. */
17096_ACEOF
17097cat confdefs.h >>conftest.$ac_ext
17098cat >>conftest.$ac_ext <<_ACEOF
17099/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017101#include <sys/param.h>
17102#ifdef _TOSHIBA_INET6
17103yes
17104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017105_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017107 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017108 ipv6type=$i;
17109 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017110 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017111fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017112rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017113
17114 ;;
17115 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017117/* confdefs.h. */
17118_ACEOF
17119cat confdefs.h >>conftest.$ac_ext
17120cat >>conftest.$ac_ext <<_ACEOF
17121/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017122
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017123#include </usr/local/v6/include/sys/v6config.h>
17124#ifdef __V6D__
17125yes
17126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017127_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017129 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017130 ipv6type=$i;
17131 ipv6lib=v6;
17132 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017133 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017134fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017135rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017136
17137 ;;
17138 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017140/* confdefs.h. */
17141_ACEOF
17142cat confdefs.h >>conftest.$ac_ext
17143cat >>conftest.$ac_ext <<_ACEOF
17144/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017146#include <sys/param.h>
17147#ifdef _ZETA_MINAMI_INET6
17148yes
17149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017152 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017153 ipv6type=$i;
17154 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017155 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017156fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000017157rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017158
17159 ;;
17160 esac
17161 if test "$ipv6type" != "unknown"; then
17162 break
17163 fi
17164 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017165 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17166echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017167fi
17168
17169if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17170 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17171 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17172 echo "using lib$ipv6lib"
17173 else
17174 if test $ipv6trylibc = "yes"; then
17175 echo "using libc"
17176 else
17177 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17178 echo "You need to fetch lib$ipv6lib.a from appropriate"
17179 echo 'ipv6 kit and compile beforehand.'
17180 exit 1
17181 fi
17182 fi
17183fi
17184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017185{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17186echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017187cat >conftest.$ac_ext <<_ACEOF
17188/* confdefs.h. */
17189_ACEOF
17190cat confdefs.h >>conftest.$ac_ext
17191cat >>conftest.$ac_ext <<_ACEOF
17192/* end confdefs.h. */
17193#include <Carbon/Carbon.h>
17194int
17195main ()
17196{
17197FSIORefNum fRef = 0
17198 ;
17199 return 0;
17200}
17201_ACEOF
17202rm -f conftest.$ac_objext
17203if { (ac_try="$ac_compile"
17204case "(($ac_try" in
17205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17206 *) ac_try_echo=$ac_try;;
17207esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017209 (eval "$ac_compile") 2>conftest.er1
17210 ac_status=$?
17211 grep -v '^ *+' conftest.er1 >conftest.err
17212 rm -f conftest.er1
17213 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017215 (exit $ac_status); } && {
17216 test -z "$ac_c_werror_flag" ||
17217 test ! -s conftest.err
17218 } && test -s conftest.$ac_objext; then
17219
17220cat >>confdefs.h <<\_ACEOF
17221#define HAVE_OSX105_SDK 1
17222_ACEOF
17223
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017224 { echo "$as_me:$LINENO: result: yes" >&5
17225echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017227 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017228sed 's/^/| /' conftest.$ac_ext >&5
17229
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017230 { echo "$as_me:$LINENO: result: no" >&5
17231echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017232
17233fi
17234
17235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17236
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017237# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017238{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17239echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017242if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243 withval=$with_doc_strings;
17244fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017245
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017246
17247if test -z "$with_doc_strings"
17248then with_doc_strings="yes"
17249fi
17250if test "$with_doc_strings" != "no"
17251then
17252
17253cat >>confdefs.h <<\_ACEOF
17254#define WITH_DOC_STRINGS 1
17255_ACEOF
17256
17257fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017258{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17259echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017260
Neil Schemenauera35c6882001-02-27 04:45:05 +000017261# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017262{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17263echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017265# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017266if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017267 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017268if test "$withval" != no
17269then
17270
17271cat >>confdefs.h <<\_ACEOF
17272#define WITH_TSC 1
17273_ACEOF
17274
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017275 { echo "$as_me:$LINENO: result: yes" >&5
17276echo "${ECHO_T}yes" >&6; }
17277else { echo "$as_me:$LINENO: result: no" >&5
17278echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017279fi
17280else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017281 { echo "$as_me:$LINENO: result: no" >&5
17282echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283fi
17284
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017285
17286# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017287{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17288echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017291if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292 withval=$with_pymalloc;
17293fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017294
Neil Schemenauera35c6882001-02-27 04:45:05 +000017295
Neil Schemenauer16c22972002-03-22 15:34:49 +000017296if test -z "$with_pymalloc"
17297then with_pymalloc="yes"
17298fi
17299if test "$with_pymalloc" != "no"
17300then
Martin v. Löwis11437992002-04-12 09:54:03 +000017301
17302cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017303#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017304_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017305
17306fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017307{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17308echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017309
Benjamin Peterson05159c42009-12-03 03:01:27 +000017310# Check for Valgrind support
17311{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17312echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17313
17314# Check whether --with-valgrind was given.
17315if test "${with_valgrind+set}" = set; then
17316 withval=$with_valgrind;
17317else
17318 with_valgrind=no
17319fi
17320
17321{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17322echo "${ECHO_T}$with_valgrind" >&6; }
17323if test "$with_valgrind" != no; then
17324 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17325 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17326echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17327if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17328 echo $ECHO_N "(cached) $ECHO_C" >&6
17329fi
17330{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17331echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17332else
17333 # Is the header compilable?
17334{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17335echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17336cat >conftest.$ac_ext <<_ACEOF
17337/* confdefs.h. */
17338_ACEOF
17339cat confdefs.h >>conftest.$ac_ext
17340cat >>conftest.$ac_ext <<_ACEOF
17341/* end confdefs.h. */
17342$ac_includes_default
17343#include <valgrind/valgrind.h>
17344_ACEOF
17345rm -f conftest.$ac_objext
17346if { (ac_try="$ac_compile"
17347case "(($ac_try" in
17348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17349 *) ac_try_echo=$ac_try;;
17350esac
17351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17352 (eval "$ac_compile") 2>conftest.er1
17353 ac_status=$?
17354 grep -v '^ *+' conftest.er1 >conftest.err
17355 rm -f conftest.er1
17356 cat conftest.err >&5
17357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358 (exit $ac_status); } && {
17359 test -z "$ac_c_werror_flag" ||
17360 test ! -s conftest.err
17361 } && test -s conftest.$ac_objext; then
17362 ac_header_compiler=yes
17363else
17364 echo "$as_me: failed program was:" >&5
17365sed 's/^/| /' conftest.$ac_ext >&5
17366
17367 ac_header_compiler=no
17368fi
17369
17370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17371{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17372echo "${ECHO_T}$ac_header_compiler" >&6; }
17373
17374# Is the header present?
17375{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17376echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17377cat >conftest.$ac_ext <<_ACEOF
17378/* confdefs.h. */
17379_ACEOF
17380cat confdefs.h >>conftest.$ac_ext
17381cat >>conftest.$ac_ext <<_ACEOF
17382/* end confdefs.h. */
17383#include <valgrind/valgrind.h>
17384_ACEOF
17385if { (ac_try="$ac_cpp conftest.$ac_ext"
17386case "(($ac_try" in
17387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17388 *) ac_try_echo=$ac_try;;
17389esac
17390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17391 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17392 ac_status=$?
17393 grep -v '^ *+' conftest.er1 >conftest.err
17394 rm -f conftest.er1
17395 cat conftest.err >&5
17396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17397 (exit $ac_status); } >/dev/null && {
17398 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17399 test ! -s conftest.err
17400 }; then
17401 ac_header_preproc=yes
17402else
17403 echo "$as_me: failed program was:" >&5
17404sed 's/^/| /' conftest.$ac_ext >&5
17405
17406 ac_header_preproc=no
17407fi
17408
17409rm -f conftest.err conftest.$ac_ext
17410{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17411echo "${ECHO_T}$ac_header_preproc" >&6; }
17412
17413# So? What about this header?
17414case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17415 yes:no: )
17416 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17417echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17418 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17419echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17420 ac_header_preproc=yes
17421 ;;
17422 no:yes:* )
17423 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17424echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17425 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17426echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17427 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17428echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17429 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17430echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17431 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17432echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17433 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17434echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17435 ( cat <<\_ASBOX
17436## -------------------------------------- ##
17437## Report this to http://bugs.python.org/ ##
17438## -------------------------------------- ##
17439_ASBOX
17440 ) | sed "s/^/$as_me: WARNING: /" >&2
17441 ;;
17442esac
17443{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17444echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17445if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17446 echo $ECHO_N "(cached) $ECHO_C" >&6
17447else
17448 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17449fi
17450{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17451echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17452
17453fi
17454if test $ac_cv_header_valgrind_valgrind_h = yes; then
17455
17456cat >>confdefs.h <<\_ACEOF
17457#define WITH_VALGRIND 1
17458_ACEOF
17459
17460else
17461 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17462echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17463 { (exit 1); exit 1; }; }
17464
17465fi
17466
17467
17468fi
17469
Barry Warsawef82cd72000-06-30 16:21:01 +000017470# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017471{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17472echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017475if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017477if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017478then
17479
17480cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017481#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017482_ACEOF
17483
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017484 { echo "$as_me:$LINENO: result: yes" >&5
17485echo "${ECHO_T}yes" >&6; }
17486else { echo "$as_me:$LINENO: result: no" >&5
17487echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017488fi
17489else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017490 { echo "$as_me:$LINENO: result: no" >&5
17491echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492fi
17493
Barry Warsawef82cd72000-06-30 16:21:01 +000017494
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017495# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017496
Guido van Rossum98935bf2001-09-05 19:13:16 +000017497DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017498
Guido van Rossume97ee181999-12-20 21:27:22 +000017499# the dlopen() function means we might want to use dynload_shlib.o. some
17500# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
Thomas Wouters3a584202000-08-05 23:28:51 +000017502for ac_func in dlopen
17503do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017504as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17505{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17506echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017508 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017509else
Martin v. Löwis11437992002-04-12 09:54:03 +000017510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017511/* confdefs.h. */
17512_ACEOF
17513cat confdefs.h >>conftest.$ac_ext
17514cat >>conftest.$ac_ext <<_ACEOF
17515/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017516/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17517 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17518#define $ac_func innocuous_$ac_func
17519
Guido van Rossume97ee181999-12-20 21:27:22 +000017520/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017521 which can conflict with char $ac_func (); below.
17522 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017523 <limits.h> exists even on freestanding compilers. */
17524
17525#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017526# include <limits.h>
17527#else
17528# include <assert.h>
17529#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017530
17531#undef $ac_func
17532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533/* Override any GCC internal prototype to avoid an error.
17534 Use char because int might match the return type of a GCC
17535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017536#ifdef __cplusplus
17537extern "C"
17538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017539char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017540/* The GNU C library defines this for functions which it implements
17541 to always fail with ENOSYS. Some functions are actually named
17542 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017544choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017545#endif
17546
Skip Montanaro6dead952003-09-25 14:50:04 +000017547int
17548main ()
17549{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017551 ;
17552 return 0;
17553}
17554_ACEOF
17555rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556if { (ac_try="$ac_link"
17557case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017564 grep -v '^ *+' conftest.er1 >conftest.err
17565 rm -f conftest.er1
17566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 (exit $ac_status); } && {
17569 test -z "$ac_c_werror_flag" ||
17570 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017571 } && test -s conftest$ac_exeext &&
17572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017574else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017576sed 's/^/| /' conftest.$ac_ext >&5
17577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580
17581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017582 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017583fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017584ac_res=`eval echo '${'$as_ac_var'}'`
17585 { echo "$as_me:$LINENO: result: $ac_res" >&5
17586echo "${ECHO_T}$ac_res" >&6; }
17587if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017588 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017589#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017590_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017591
Guido van Rossume97ee181999-12-20 21:27:22 +000017592fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017593done
Guido van Rossume97ee181999-12-20 21:27:22 +000017594
Michael W. Hudson54241132001-12-07 15:38:26 +000017595
Guido van Rossume97ee181999-12-20 21:27:22 +000017596# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17597# loading of modules.
17598
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017599{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17600echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017601if test -z "$DYNLOADFILE"
17602then
17603 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017604 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17605 if test "$ac_cv_func_dlopen" = yes
17606 then DYNLOADFILE="dynload_shlib.o"
17607 else DYNLOADFILE="dynload_aix.o"
17608 fi
17609 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017610 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017611 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17612 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017613 *)
17614 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17615 # out any dynamic loading
17616 if test "$ac_cv_func_dlopen" = yes
17617 then DYNLOADFILE="dynload_shlib.o"
17618 else DYNLOADFILE="dynload_stub.o"
17619 fi
17620 ;;
17621 esac
17622fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017623{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17624echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017625if test "$DYNLOADFILE" != "dynload_stub.o"
17626then
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
17628cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017629#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017630_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017631
17632fi
17633
Neil Schemenauer4e425612001-06-19 15:44:15 +000017634# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17635
Michael W. Hudson54241132001-12-07 15:38:26 +000017636
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017637{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17638echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017639if test -z "$MACHDEP_OBJS"
17640then
Jack Jansene578a632001-08-15 01:27:14 +000017641 MACHDEP_OBJS=$extra_machdep_objs
17642else
17643 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017644fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017645{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17646echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017647
Guido van Rossum627b2d71993-12-24 10:39:16 +000017648# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
Martin v. Löwisd6320502004-08-12 13:45:08 +000017720
Martin v. Löwisc3001752005-01-23 09:27:24 +000017721
17722
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017723
17724
Thomas Wouterscf297e42007-02-23 15:07:44 +000017725
17726
Gregory P. Smith25523d22007-09-03 16:44:55 +000017727
Christian Heimes4e30a842007-11-30 22:12:06 +000017728
Martin v. Löwis92fab752008-03-08 10:40:41 +000017729
Martin v. Löwis823725e2008-03-24 13:39:54 +000017730
17731
Benjamin Peterson965ce872009-04-05 21:24:58 +000017732
17733
17734
17735
Martin v. Löwis011e8422009-05-05 04:43:17 +000017736
Martin v. Löwis113a0852009-05-29 17:25:39 +000017737
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017738
17739
17740
17741
Antoine Pitroub7572f02009-12-02 20:46:48 +000017742
Martin v. Löwis823725e2008-03-24 13:39:54 +000017743for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17744 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017745 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017746 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017747 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017748 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017749 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017750 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17751 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017752 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17753 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017754 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017755 truncate uname unsetenv utimes waitpid wait3 wait4 \
17756 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017757do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17759{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017763else
Martin v. Löwis11437992002-04-12 09:54:03 +000017764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017765/* confdefs.h. */
17766_ACEOF
17767cat confdefs.h >>conftest.$ac_ext
17768cat >>conftest.$ac_ext <<_ACEOF
17769/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017770/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17771 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17772#define $ac_func innocuous_$ac_func
17773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017774/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017775 which can conflict with char $ac_func (); below.
17776 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017777 <limits.h> exists even on freestanding compilers. */
17778
17779#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017780# include <limits.h>
17781#else
17782# include <assert.h>
17783#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017784
17785#undef $ac_func
17786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787/* Override any GCC internal prototype to avoid an error.
17788 Use char because int might match the return type of a GCC
17789 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017790#ifdef __cplusplus
17791extern "C"
17792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017793char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017794/* The GNU C library defines this for functions which it implements
17795 to always fail with ENOSYS. Some functions are actually named
17796 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017798choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017799#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017800
Skip Montanaro6dead952003-09-25 14:50:04 +000017801int
17802main ()
17803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 ;
17806 return 0;
17807}
17808_ACEOF
17809rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017810if { (ac_try="$ac_link"
17811case "(($ac_try" in
17812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17813 *) ac_try_echo=$ac_try;;
17814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017818 grep -v '^ *+' conftest.er1 >conftest.err
17819 rm -f conftest.er1
17820 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822 (exit $ac_status); } && {
17823 test -z "$ac_c_werror_flag" ||
17824 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017825 } && test -s conftest$ac_exeext &&
17826 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017830sed 's/^/| /' conftest.$ac_ext >&5
17831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834
17835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017838ac_res=`eval echo '${'$as_ac_var'}'`
17839 { echo "$as_me:$LINENO: result: $ac_res" >&5
17840echo "${ECHO_T}$ac_res" >&6; }
17841if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017842 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017843#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017844_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017845
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017846fi
17847done
17848
Michael W. Hudson54241132001-12-07 15:38:26 +000017849
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017850# For some functions, having a definition is not sufficient, since
17851# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017852{ echo "$as_me:$LINENO: checking for chroot" >&5
17853echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017855/* confdefs.h. */
17856_ACEOF
17857cat confdefs.h >>conftest.$ac_ext
17858cat >>conftest.$ac_ext <<_ACEOF
17859/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017860#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017861int
17862main ()
17863{
17864void *x=chroot
17865 ;
17866 return 0;
17867}
17868_ACEOF
17869rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017870if { (ac_try="$ac_compile"
17871case "(($ac_try" in
17872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17873 *) ac_try_echo=$ac_try;;
17874esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017878 grep -v '^ *+' conftest.er1 >conftest.err
17879 rm -f conftest.er1
17880 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017882 (exit $ac_status); } && {
17883 test -z "$ac_c_werror_flag" ||
17884 test ! -s conftest.err
17885 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017886
17887cat >>confdefs.h <<\_ACEOF
17888#define HAVE_CHROOT 1
17889_ACEOF
17890
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017891 { echo "$as_me:$LINENO: result: yes" >&5
17892echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017893else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017895sed 's/^/| /' conftest.$ac_ext >&5
17896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017897 { echo "$as_me:$LINENO: result: no" >&5
17898echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017899
17900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901
17902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017903{ echo "$as_me:$LINENO: checking for link" >&5
17904echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017906/* confdefs.h. */
17907_ACEOF
17908cat confdefs.h >>conftest.$ac_ext
17909cat >>conftest.$ac_ext <<_ACEOF
17910/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017911#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017912int
17913main ()
17914{
17915void *x=link
17916 ;
17917 return 0;
17918}
17919_ACEOF
17920rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017921if { (ac_try="$ac_compile"
17922case "(($ac_try" in
17923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17924 *) ac_try_echo=$ac_try;;
17925esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017929 grep -v '^ *+' conftest.er1 >conftest.err
17930 rm -f conftest.er1
17931 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 (exit $ac_status); } && {
17934 test -z "$ac_c_werror_flag" ||
17935 test ! -s conftest.err
17936 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017937
17938cat >>confdefs.h <<\_ACEOF
17939#define HAVE_LINK 1
17940_ACEOF
17941
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017942 { echo "$as_me:$LINENO: result: yes" >&5
17943echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017946sed 's/^/| /' conftest.$ac_ext >&5
17947
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017948 { echo "$as_me:$LINENO: result: no" >&5
17949echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017950
17951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952
17953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017954{ echo "$as_me:$LINENO: checking for symlink" >&5
17955echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017956cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017957/* confdefs.h. */
17958_ACEOF
17959cat confdefs.h >>conftest.$ac_ext
17960cat >>conftest.$ac_ext <<_ACEOF
17961/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017962#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017963int
17964main ()
17965{
17966void *x=symlink
17967 ;
17968 return 0;
17969}
17970_ACEOF
17971rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972if { (ac_try="$ac_compile"
17973case "(($ac_try" in
17974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17975 *) ac_try_echo=$ac_try;;
17976esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017980 grep -v '^ *+' conftest.er1 >conftest.err
17981 rm -f conftest.er1
17982 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 (exit $ac_status); } && {
17985 test -z "$ac_c_werror_flag" ||
17986 test ! -s conftest.err
17987 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017988
17989cat >>confdefs.h <<\_ACEOF
17990#define HAVE_SYMLINK 1
17991_ACEOF
17992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017993 { echo "$as_me:$LINENO: result: yes" >&5
17994echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017995else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017997sed 's/^/| /' conftest.$ac_ext >&5
17998
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017999 { echo "$as_me:$LINENO: result: no" >&5
18000echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018001
18002fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003
18004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018005{ echo "$as_me:$LINENO: checking for fchdir" >&5
18006echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018008/* confdefs.h. */
18009_ACEOF
18010cat confdefs.h >>conftest.$ac_ext
18011cat >>conftest.$ac_ext <<_ACEOF
18012/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018013#include <unistd.h>
18014int
18015main ()
18016{
18017void *x=fchdir
18018 ;
18019 return 0;
18020}
18021_ACEOF
18022rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023if { (ac_try="$ac_compile"
18024case "(($ac_try" in
18025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18026 *) ac_try_echo=$ac_try;;
18027esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 (exit $ac_status); } && {
18036 test -z "$ac_c_werror_flag" ||
18037 test ! -s conftest.err
18038 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018039
18040cat >>confdefs.h <<\_ACEOF
18041#define HAVE_FCHDIR 1
18042_ACEOF
18043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044 { echo "$as_me:$LINENO: result: yes" >&5
18045echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018046else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018048sed 's/^/| /' conftest.$ac_ext >&5
18049
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018050 { echo "$as_me:$LINENO: result: no" >&5
18051echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018052
18053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054
18055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018056{ echo "$as_me:$LINENO: checking for fsync" >&5
18057echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018059/* confdefs.h. */
18060_ACEOF
18061cat confdefs.h >>conftest.$ac_ext
18062cat >>conftest.$ac_ext <<_ACEOF
18063/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018064#include <unistd.h>
18065int
18066main ()
18067{
18068void *x=fsync
18069 ;
18070 return 0;
18071}
18072_ACEOF
18073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074if { (ac_try="$ac_compile"
18075case "(($ac_try" in
18076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18077 *) ac_try_echo=$ac_try;;
18078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018082 grep -v '^ *+' conftest.er1 >conftest.err
18083 rm -f conftest.er1
18084 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 (exit $ac_status); } && {
18087 test -z "$ac_c_werror_flag" ||
18088 test ! -s conftest.err
18089 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018090
18091cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018092#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018093_ACEOF
18094
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018095 { echo "$as_me:$LINENO: result: yes" >&5
18096echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018099sed 's/^/| /' conftest.$ac_ext >&5
18100
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018101 { echo "$as_me:$LINENO: result: no" >&5
18102echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018103
18104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018105
18106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018107{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18108echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018110/* confdefs.h. */
18111_ACEOF
18112cat confdefs.h >>conftest.$ac_ext
18113cat >>conftest.$ac_ext <<_ACEOF
18114/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018115#include <unistd.h>
18116int
18117main ()
18118{
18119void *x=fdatasync
18120 ;
18121 return 0;
18122}
18123_ACEOF
18124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125if { (ac_try="$ac_compile"
18126case "(($ac_try" in
18127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18128 *) ac_try_echo=$ac_try;;
18129esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018133 grep -v '^ *+' conftest.er1 >conftest.err
18134 rm -f conftest.er1
18135 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018137 (exit $ac_status); } && {
18138 test -z "$ac_c_werror_flag" ||
18139 test ! -s conftest.err
18140 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018141
18142cat >>confdefs.h <<\_ACEOF
18143#define HAVE_FDATASYNC 1
18144_ACEOF
18145
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018146 { echo "$as_me:$LINENO: result: yes" >&5
18147echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018148else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018150sed 's/^/| /' conftest.$ac_ext >&5
18151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018152 { echo "$as_me:$LINENO: result: no" >&5
18153echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018154
18155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156
18157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018158{ echo "$as_me:$LINENO: checking for epoll" >&5
18159echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018160cat >conftest.$ac_ext <<_ACEOF
18161/* confdefs.h. */
18162_ACEOF
18163cat confdefs.h >>conftest.$ac_ext
18164cat >>conftest.$ac_ext <<_ACEOF
18165/* end confdefs.h. */
18166#include <sys/epoll.h>
18167int
18168main ()
18169{
18170void *x=epoll_create
18171 ;
18172 return 0;
18173}
18174_ACEOF
18175rm -f conftest.$ac_objext
18176if { (ac_try="$ac_compile"
18177case "(($ac_try" in
18178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18179 *) ac_try_echo=$ac_try;;
18180esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018182 (eval "$ac_compile") 2>conftest.er1
18183 ac_status=$?
18184 grep -v '^ *+' conftest.er1 >conftest.err
18185 rm -f conftest.er1
18186 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018188 (exit $ac_status); } && {
18189 test -z "$ac_c_werror_flag" ||
18190 test ! -s conftest.err
18191 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018192
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018193cat >>confdefs.h <<\_ACEOF
18194#define HAVE_EPOLL 1
18195_ACEOF
18196
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018197 { echo "$as_me:$LINENO: result: yes" >&5
18198echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018199else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018200 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018201sed 's/^/| /' conftest.$ac_ext >&5
18202
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018203 { echo "$as_me:$LINENO: result: no" >&5
18204echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018205
18206fi
18207
18208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018209{ echo "$as_me:$LINENO: checking for kqueue" >&5
18210echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018211cat >conftest.$ac_ext <<_ACEOF
18212/* confdefs.h. */
18213_ACEOF
18214cat confdefs.h >>conftest.$ac_ext
18215cat >>conftest.$ac_ext <<_ACEOF
18216/* end confdefs.h. */
18217
18218#include <sys/types.h>
18219#include <sys/event.h>
18220
18221int
18222main ()
18223{
18224int x=kqueue()
18225 ;
18226 return 0;
18227}
18228_ACEOF
18229rm -f conftest.$ac_objext
18230if { (ac_try="$ac_compile"
18231case "(($ac_try" in
18232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18233 *) ac_try_echo=$ac_try;;
18234esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018236 (eval "$ac_compile") 2>conftest.er1
18237 ac_status=$?
18238 grep -v '^ *+' conftest.er1 >conftest.err
18239 rm -f conftest.er1
18240 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018242 (exit $ac_status); } && {
18243 test -z "$ac_c_werror_flag" ||
18244 test ! -s conftest.err
18245 } && test -s conftest.$ac_objext; then
18246
18247cat >>confdefs.h <<\_ACEOF
18248#define HAVE_KQUEUE 1
18249_ACEOF
18250
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018251 { echo "$as_me:$LINENO: result: yes" >&5
18252echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018253else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018254 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018255sed 's/^/| /' conftest.$ac_ext >&5
18256
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018257 { echo "$as_me:$LINENO: result: no" >&5
18258echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018259
18260fi
18261
18262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018263# On some systems (eg. FreeBSD 5), we would find a definition of the
18264# functions ctermid_r, setgroups in the library, but no prototype
18265# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18266# address to avoid compiler warnings and potential miscompilations
18267# because of the missing prototypes.
18268
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018269{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18270echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018271cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018272/* confdefs.h. */
18273_ACEOF
18274cat confdefs.h >>conftest.$ac_ext
18275cat >>conftest.$ac_ext <<_ACEOF
18276/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018277
18278#include "confdefs.h"
18279#include <stdio.h>
18280
Martin v. Löwisd5843682002-11-21 20:41:28 +000018281int
18282main ()
18283{
18284void* p = ctermid_r
18285 ;
18286 return 0;
18287}
18288_ACEOF
18289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018290if { (ac_try="$ac_compile"
18291case "(($ac_try" in
18292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18293 *) ac_try_echo=$ac_try;;
18294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018298 grep -v '^ *+' conftest.er1 >conftest.err
18299 rm -f conftest.er1
18300 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302 (exit $ac_status); } && {
18303 test -z "$ac_c_werror_flag" ||
18304 test ! -s conftest.err
18305 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018306
18307cat >>confdefs.h <<\_ACEOF
18308#define HAVE_CTERMID_R 1
18309_ACEOF
18310
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018311 { echo "$as_me:$LINENO: result: yes" >&5
18312echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018313else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018315sed 's/^/| /' conftest.$ac_ext >&5
18316
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018317 { echo "$as_me:$LINENO: result: no" >&5
18318echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018319
18320fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018324{ echo "$as_me:$LINENO: checking for flock" >&5
18325echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018327/* confdefs.h. */
18328_ACEOF
18329cat confdefs.h >>conftest.$ac_ext
18330cat >>conftest.$ac_ext <<_ACEOF
18331/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018332
18333#include "confdefs.h"
18334#include <sys/file.h>
18335
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018336int
18337main ()
18338{
18339void* p = flock
18340 ;
18341 return 0;
18342}
18343_ACEOF
18344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345if { (ac_try="$ac_compile"
18346case "(($ac_try" in
18347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18348 *) ac_try_echo=$ac_try;;
18349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018353 grep -v '^ *+' conftest.er1 >conftest.err
18354 rm -f conftest.er1
18355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357 (exit $ac_status); } && {
18358 test -z "$ac_c_werror_flag" ||
18359 test ! -s conftest.err
18360 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018361
18362cat >>confdefs.h <<\_ACEOF
18363#define HAVE_FLOCK 1
18364_ACEOF
18365
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018366 { echo "$as_me:$LINENO: result: yes" >&5
18367echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018370sed 's/^/| /' conftest.$ac_ext >&5
18371
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018372 { echo "$as_me:$LINENO: result: no" >&5
18373echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018374
18375fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18378
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018379{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18380echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018382/* confdefs.h. */
18383_ACEOF
18384cat confdefs.h >>conftest.$ac_ext
18385cat >>conftest.$ac_ext <<_ACEOF
18386/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018387
18388#include "confdefs.h"
18389#include <unistd.h>
18390
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018391int
18392main ()
18393{
18394void* p = getpagesize
18395 ;
18396 return 0;
18397}
18398_ACEOF
18399rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400if { (ac_try="$ac_compile"
18401case "(($ac_try" in
18402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18403 *) ac_try_echo=$ac_try;;
18404esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408 grep -v '^ *+' conftest.er1 >conftest.err
18409 rm -f conftest.er1
18410 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 (exit $ac_status); } && {
18413 test -z "$ac_c_werror_flag" ||
18414 test ! -s conftest.err
18415 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018416
18417cat >>confdefs.h <<\_ACEOF
18418#define HAVE_GETPAGESIZE 1
18419_ACEOF
18420
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018421 { echo "$as_me:$LINENO: result: yes" >&5
18422echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018423else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018424 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018425sed 's/^/| /' conftest.$ac_ext >&5
18426
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018427 { echo "$as_me:$LINENO: result: no" >&5
18428echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018429
18430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431
18432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018433
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018434for ac_prog in true
18435do
18436 # Extract the first word of "$ac_prog", so it can be a program name with args.
18437set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018438{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18439echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018440if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018441 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018442else
18443 if test -n "$TRUE"; then
18444 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18445else
18446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18447for as_dir in $PATH
18448do
18449 IFS=$as_save_IFS
18450 test -z "$as_dir" && as_dir=.
18451 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 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 +000018453 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018454 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018455 break 2
18456 fi
18457done
18458done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018459IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018460
18461fi
18462fi
18463TRUE=$ac_cv_prog_TRUE
18464if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018465 { echo "$as_me:$LINENO: result: $TRUE" >&5
18466echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018467else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018468 { echo "$as_me:$LINENO: result: no" >&5
18469echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018470fi
18471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018473 test -n "$TRUE" && break
18474done
18475test -n "$TRUE" || TRUE="/bin/true"
18476
18477
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018478{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18479echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018480if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018482else
18483 ac_check_lib_save_LIBS=$LIBS
18484LIBS="-lc $LIBS"
18485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018486/* confdefs.h. */
18487_ACEOF
18488cat confdefs.h >>conftest.$ac_ext
18489cat >>conftest.$ac_ext <<_ACEOF
18490/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492/* Override any GCC internal prototype to avoid an error.
18493 Use char because int might match the return type of a GCC
18494 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018495#ifdef __cplusplus
18496extern "C"
18497#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018498char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018499int
18500main ()
18501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018503 ;
18504 return 0;
18505}
18506_ACEOF
18507rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508if { (ac_try="$ac_link"
18509case "(($ac_try" in
18510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18511 *) ac_try_echo=$ac_try;;
18512esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018516 grep -v '^ *+' conftest.er1 >conftest.err
18517 rm -f conftest.er1
18518 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520 (exit $ac_status); } && {
18521 test -z "$ac_c_werror_flag" ||
18522 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018523 } && test -s conftest$ac_exeext &&
18524 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018525 ac_cv_lib_c_inet_aton=yes
18526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018528sed 's/^/| /' conftest.$ac_ext >&5
18529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018532
18533rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018535LIBS=$ac_check_lib_save_LIBS
18536fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018537{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18538echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18539if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018540 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018541else
18542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018543{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18544echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018545if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018547else
18548 ac_check_lib_save_LIBS=$LIBS
18549LIBS="-lresolv $LIBS"
18550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018551/* confdefs.h. */
18552_ACEOF
18553cat confdefs.h >>conftest.$ac_ext
18554cat >>conftest.$ac_ext <<_ACEOF
18555/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018556
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557/* Override any GCC internal prototype to avoid an error.
18558 Use char because int might match the return type of a GCC
18559 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018560#ifdef __cplusplus
18561extern "C"
18562#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018563char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018564int
18565main ()
18566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018567return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018568 ;
18569 return 0;
18570}
18571_ACEOF
18572rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018573if { (ac_try="$ac_link"
18574case "(($ac_try" in
18575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18576 *) ac_try_echo=$ac_try;;
18577esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018581 grep -v '^ *+' conftest.er1 >conftest.err
18582 rm -f conftest.er1
18583 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585 (exit $ac_status); } && {
18586 test -z "$ac_c_werror_flag" ||
18587 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018588 } && test -s conftest$ac_exeext &&
18589 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018590 ac_cv_lib_resolv_inet_aton=yes
18591else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018593sed 's/^/| /' conftest.$ac_ext >&5
18594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018595 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018597
18598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018600LIBS=$ac_check_lib_save_LIBS
18601fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018602{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18603echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18604if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018605 cat >>confdefs.h <<_ACEOF
18606#define HAVE_LIBRESOLV 1
18607_ACEOF
18608
18609 LIBS="-lresolv $LIBS"
18610
18611fi
18612
18613
18614fi
18615
18616
Christian Heimesd0764e22007-12-04 15:00:33 +000018617# On Tru64, chflags seems to be present, but calling it will
18618# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018619{ echo "$as_me:$LINENO: checking for chflags" >&5
18620echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018621if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018622 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018623else
18624 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018625 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018626else
18627 cat >conftest.$ac_ext <<_ACEOF
18628/* confdefs.h. */
18629_ACEOF
18630cat confdefs.h >>conftest.$ac_ext
18631cat >>conftest.$ac_ext <<_ACEOF
18632/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018633[
Christian Heimesd0764e22007-12-04 15:00:33 +000018634#include <sys/stat.h>
18635#include <unistd.h>
18636int main(int argc, char*argv[])
18637{
18638 if(chflags(argv[0], 0) != 0)
18639 return 1;
18640 return 0;
18641}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018642]
Christian Heimesd0764e22007-12-04 15:00:33 +000018643_ACEOF
18644rm -f conftest$ac_exeext
18645if { (ac_try="$ac_link"
18646case "(($ac_try" in
18647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18648 *) ac_try_echo=$ac_try;;
18649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018651 (eval "$ac_link") 2>&5
18652 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18655 { (case "(($ac_try" in
18656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18657 *) ac_try_echo=$ac_try;;
18658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018660 (eval "$ac_try") 2>&5
18661 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018663 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018664 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018665else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018666 echo "$as_me: program exited with status $ac_status" >&5
18667echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018668sed 's/^/| /' conftest.$ac_ext >&5
18669
18670( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018671ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018672fi
18673rm -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 +000018674fi
18675
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018676
18677
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018678fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018679{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18680echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018681if test "$ac_cv_have_chflags" = cross ; then
18682 { echo "$as_me:$LINENO: checking for chflags" >&5
18683echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
18684if test "${ac_cv_func_chflags+set}" = set; then
18685 echo $ECHO_N "(cached) $ECHO_C" >&6
18686else
18687 cat >conftest.$ac_ext <<_ACEOF
18688/* confdefs.h. */
18689_ACEOF
18690cat confdefs.h >>conftest.$ac_ext
18691cat >>conftest.$ac_ext <<_ACEOF
18692/* end confdefs.h. */
18693/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
18694 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18695#define chflags innocuous_chflags
18696
18697/* System header to define __stub macros and hopefully few prototypes,
18698 which can conflict with char chflags (); below.
18699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18700 <limits.h> exists even on freestanding compilers. */
18701
18702#ifdef __STDC__
18703# include <limits.h>
18704#else
18705# include <assert.h>
18706#endif
18707
18708#undef chflags
18709
18710/* Override any GCC internal prototype to avoid an error.
18711 Use char because int might match the return type of a GCC
18712 builtin and then its argument prototype would still apply. */
18713#ifdef __cplusplus
18714extern "C"
18715#endif
18716char chflags ();
18717/* The GNU C library defines this for functions which it implements
18718 to always fail with ENOSYS. Some functions are actually named
18719 something starting with __ and the normal name is an alias. */
18720#if defined __stub_chflags || defined __stub___chflags
18721choke me
18722#endif
18723
18724int
18725main ()
18726{
18727return chflags ();
18728 ;
18729 return 0;
18730}
18731_ACEOF
18732rm -f conftest.$ac_objext conftest$ac_exeext
18733if { (ac_try="$ac_link"
18734case "(($ac_try" in
18735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18736 *) ac_try_echo=$ac_try;;
18737esac
18738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18739 (eval "$ac_link") 2>conftest.er1
18740 ac_status=$?
18741 grep -v '^ *+' conftest.er1 >conftest.err
18742 rm -f conftest.er1
18743 cat conftest.err >&5
18744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18745 (exit $ac_status); } && {
18746 test -z "$ac_c_werror_flag" ||
18747 test ! -s conftest.err
18748 } && test -s conftest$ac_exeext &&
18749 $as_test_x conftest$ac_exeext; then
18750 ac_cv_func_chflags=yes
18751else
18752 echo "$as_me: failed program was:" >&5
18753sed 's/^/| /' conftest.$ac_ext >&5
18754
18755 ac_cv_func_chflags=no
18756fi
18757
18758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18759 conftest$ac_exeext conftest.$ac_ext
18760fi
18761{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
18762echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
18763if test $ac_cv_func_chflags = yes; then
18764 ac_cv_have_chflags="yes"
18765else
18766 ac_cv_have_chflags="no"
18767fi
18768
18769fi
18770if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018771
18772cat >>confdefs.h <<\_ACEOF
18773#define HAVE_CHFLAGS 1
18774_ACEOF
18775
18776fi
18777
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018778{ echo "$as_me:$LINENO: checking for lchflags" >&5
18779echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018780if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018781 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018782else
18783 if test "$cross_compiling" = yes; then
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018784 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000018785else
18786 cat >conftest.$ac_ext <<_ACEOF
18787/* confdefs.h. */
18788_ACEOF
18789cat confdefs.h >>conftest.$ac_ext
18790cat >>conftest.$ac_ext <<_ACEOF
18791/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018792[
Christian Heimesd0764e22007-12-04 15:00:33 +000018793#include <sys/stat.h>
18794#include <unistd.h>
18795int main(int argc, char*argv[])
18796{
18797 if(lchflags(argv[0], 0) != 0)
18798 return 1;
18799 return 0;
18800}
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018801]
Christian Heimesd0764e22007-12-04 15:00:33 +000018802_ACEOF
18803rm -f conftest$ac_exeext
18804if { (ac_try="$ac_link"
18805case "(($ac_try" in
18806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18807 *) ac_try_echo=$ac_try;;
18808esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018810 (eval "$ac_link") 2>&5
18811 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18814 { (case "(($ac_try" in
18815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18816 *) ac_try_echo=$ac_try;;
18817esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018819 (eval "$ac_try") 2>&5
18820 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018822 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018823 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018824else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018825 echo "$as_me: program exited with status $ac_status" >&5
18826echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018827sed 's/^/| /' conftest.$ac_ext >&5
18828
18829( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018830ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018831fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18833fi
18834
18835
Christian Heimesd0764e22007-12-04 15:00:33 +000018836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018837fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018838{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18839echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000018840if test "$ac_cv_have_lchflags" = cross ; then
18841 { echo "$as_me:$LINENO: checking for lchflags" >&5
18842echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
18843if test "${ac_cv_func_lchflags+set}" = set; then
18844 echo $ECHO_N "(cached) $ECHO_C" >&6
18845else
18846 cat >conftest.$ac_ext <<_ACEOF
18847/* confdefs.h. */
18848_ACEOF
18849cat confdefs.h >>conftest.$ac_ext
18850cat >>conftest.$ac_ext <<_ACEOF
18851/* end confdefs.h. */
18852/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
18853 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18854#define lchflags innocuous_lchflags
18855
18856/* System header to define __stub macros and hopefully few prototypes,
18857 which can conflict with char lchflags (); below.
18858 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18859 <limits.h> exists even on freestanding compilers. */
18860
18861#ifdef __STDC__
18862# include <limits.h>
18863#else
18864# include <assert.h>
18865#endif
18866
18867#undef lchflags
18868
18869/* Override any GCC internal prototype to avoid an error.
18870 Use char because int might match the return type of a GCC
18871 builtin and then its argument prototype would still apply. */
18872#ifdef __cplusplus
18873extern "C"
18874#endif
18875char lchflags ();
18876/* The GNU C library defines this for functions which it implements
18877 to always fail with ENOSYS. Some functions are actually named
18878 something starting with __ and the normal name is an alias. */
18879#if defined __stub_lchflags || defined __stub___lchflags
18880choke me
18881#endif
18882
18883int
18884main ()
18885{
18886return lchflags ();
18887 ;
18888 return 0;
18889}
18890_ACEOF
18891rm -f conftest.$ac_objext conftest$ac_exeext
18892if { (ac_try="$ac_link"
18893case "(($ac_try" in
18894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18895 *) ac_try_echo=$ac_try;;
18896esac
18897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18898 (eval "$ac_link") 2>conftest.er1
18899 ac_status=$?
18900 grep -v '^ *+' conftest.er1 >conftest.err
18901 rm -f conftest.er1
18902 cat conftest.err >&5
18903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18904 (exit $ac_status); } && {
18905 test -z "$ac_c_werror_flag" ||
18906 test ! -s conftest.err
18907 } && test -s conftest$ac_exeext &&
18908 $as_test_x conftest$ac_exeext; then
18909 ac_cv_func_lchflags=yes
18910else
18911 echo "$as_me: failed program was:" >&5
18912sed 's/^/| /' conftest.$ac_ext >&5
18913
18914 ac_cv_func_lchflags=no
18915fi
18916
18917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18918 conftest$ac_exeext conftest.$ac_ext
18919fi
18920{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18921echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
18922if test $ac_cv_func_lchflags = yes; then
18923 ac_cv_have_lchflags="yes"
18924else
18925 ac_cv_have_lchflags="no"
18926fi
18927
18928fi
18929if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018930
18931cat >>confdefs.h <<\_ACEOF
18932#define HAVE_LCHFLAGS 1
18933_ACEOF
18934
18935fi
18936
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018937case $ac_sys_system/$ac_sys_release in
18938Darwin/*)
18939 _CUR_CFLAGS="${CFLAGS}"
18940 _CUR_LDFLAGS="${LDFLAGS}"
18941 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18942 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18943 ;;
18944esac
18945
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018946{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18947echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018948if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018949 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018950else
18951 ac_check_lib_save_LIBS=$LIBS
18952LIBS="-lz $LIBS"
18953cat >conftest.$ac_ext <<_ACEOF
18954/* confdefs.h. */
18955_ACEOF
18956cat confdefs.h >>conftest.$ac_ext
18957cat >>conftest.$ac_ext <<_ACEOF
18958/* end confdefs.h. */
18959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960/* Override any GCC internal prototype to avoid an error.
18961 Use char because int might match the return type of a GCC
18962 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018963#ifdef __cplusplus
18964extern "C"
18965#endif
18966char inflateCopy ();
18967int
18968main ()
18969{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018971 ;
18972 return 0;
18973}
18974_ACEOF
18975rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018976if { (ac_try="$ac_link"
18977case "(($ac_try" in
18978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18979 *) ac_try_echo=$ac_try;;
18980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018982 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018983 ac_status=$?
18984 grep -v '^ *+' conftest.er1 >conftest.err
18985 rm -f conftest.er1
18986 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018988 (exit $ac_status); } && {
18989 test -z "$ac_c_werror_flag" ||
18990 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018991 } && test -s conftest$ac_exeext &&
18992 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018993 ac_cv_lib_z_inflateCopy=yes
18994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018995 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018996sed 's/^/| /' conftest.$ac_ext >&5
18997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018998 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019000
19001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019002 conftest$ac_exeext conftest.$ac_ext
19003LIBS=$ac_check_lib_save_LIBS
19004fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019005{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19006echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19007if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000019008
19009cat >>confdefs.h <<\_ACEOF
19010#define HAVE_ZLIB_COPY 1
19011_ACEOF
19012
19013fi
19014
19015
19016case $ac_sys_system/$ac_sys_release in
19017Darwin/*)
19018 CFLAGS="${_CUR_CFLAGS}"
19019 LDFLAGS="${_CUR_LDFLAGS}"
19020 ;;
19021esac
19022
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019023{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19024echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019026/* confdefs.h. */
19027_ACEOF
19028cat confdefs.h >>conftest.$ac_ext
19029cat >>conftest.$ac_ext <<_ACEOF
19030/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019031
19032#include "confdefs.h"
19033#include <netdb.h>
19034
Martin v. Löwise9416172003-05-03 10:12:45 +000019035int
19036main ()
19037{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019038void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019039 ;
19040 return 0;
19041}
19042_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019043rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019044if { (ac_try="$ac_link"
19045case "(($ac_try" in
19046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19047 *) ac_try_echo=$ac_try;;
19048esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019050 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019052 grep -v '^ *+' conftest.er1 >conftest.err
19053 rm -f conftest.er1
19054 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019056 (exit $ac_status); } && {
19057 test -z "$ac_c_werror_flag" ||
19058 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019059 } && test -s conftest$ac_exeext &&
19060 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019061
19062cat >>confdefs.h <<\_ACEOF
19063#define HAVE_HSTRERROR 1
19064_ACEOF
19065
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019066 { echo "$as_me:$LINENO: result: yes" >&5
19067echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019068else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019069 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019070sed 's/^/| /' conftest.$ac_ext >&5
19071
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019072 { echo "$as_me:$LINENO: result: no" >&5
19073echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019074
19075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019076
19077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019079
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019080{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19081echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019083/* confdefs.h. */
19084_ACEOF
19085cat confdefs.h >>conftest.$ac_ext
19086cat >>conftest.$ac_ext <<_ACEOF
19087/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019088
19089#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019090#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019091#include <sys/socket.h>
19092#include <netinet/in.h>
19093#include <arpa/inet.h>
19094
Martin v. Löwise9416172003-05-03 10:12:45 +000019095int
19096main ()
19097{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019098void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019099 ;
19100 return 0;
19101}
19102_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019103rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104if { (ac_try="$ac_link"
19105case "(($ac_try" in
19106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19107 *) ac_try_echo=$ac_try;;
19108esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019112 grep -v '^ *+' conftest.er1 >conftest.err
19113 rm -f conftest.er1
19114 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019116 (exit $ac_status); } && {
19117 test -z "$ac_c_werror_flag" ||
19118 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019119 } && test -s conftest$ac_exeext &&
19120 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019121
19122cat >>confdefs.h <<\_ACEOF
19123#define HAVE_INET_ATON 1
19124_ACEOF
19125
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019126 { echo "$as_me:$LINENO: result: yes" >&5
19127echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019128else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019130sed 's/^/| /' conftest.$ac_ext >&5
19131
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019132 { echo "$as_me:$LINENO: result: no" >&5
19133echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019134
19135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019136
19137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019140{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19141echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019143/* confdefs.h. */
19144_ACEOF
19145cat confdefs.h >>conftest.$ac_ext
19146cat >>conftest.$ac_ext <<_ACEOF
19147/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019148
19149#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019150#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019151#include <sys/socket.h>
19152#include <netinet/in.h>
19153#include <arpa/inet.h>
19154
Martin v. Löwise9416172003-05-03 10:12:45 +000019155int
19156main ()
19157{
19158void* p = inet_pton
19159 ;
19160 return 0;
19161}
19162_ACEOF
19163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019164if { (ac_try="$ac_compile"
19165case "(($ac_try" in
19166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19167 *) ac_try_echo=$ac_try;;
19168esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019172 grep -v '^ *+' conftest.er1 >conftest.err
19173 rm -f conftest.er1
19174 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019176 (exit $ac_status); } && {
19177 test -z "$ac_c_werror_flag" ||
19178 test ! -s conftest.err
19179 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019180
19181cat >>confdefs.h <<\_ACEOF
19182#define HAVE_INET_PTON 1
19183_ACEOF
19184
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019185 { echo "$as_me:$LINENO: result: yes" >&5
19186echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019188 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019189sed 's/^/| /' conftest.$ac_ext >&5
19190
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019191 { echo "$as_me:$LINENO: result: no" >&5
19192echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019193
19194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019195
19196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019197
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019198# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019199{ echo "$as_me:$LINENO: checking for setgroups" >&5
19200echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019202/* confdefs.h. */
19203_ACEOF
19204cat confdefs.h >>conftest.$ac_ext
19205cat >>conftest.$ac_ext <<_ACEOF
19206/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019207
19208#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019209#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019210#ifdef HAVE_GRP_H
19211#include <grp.h>
19212#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019213
Martin v. Löwisd5843682002-11-21 20:41:28 +000019214int
19215main ()
19216{
19217void* p = setgroups
19218 ;
19219 return 0;
19220}
19221_ACEOF
19222rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019223if { (ac_try="$ac_compile"
19224case "(($ac_try" in
19225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19226 *) ac_try_echo=$ac_try;;
19227esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019231 grep -v '^ *+' conftest.er1 >conftest.err
19232 rm -f conftest.er1
19233 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019235 (exit $ac_status); } && {
19236 test -z "$ac_c_werror_flag" ||
19237 test ! -s conftest.err
19238 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019239
19240cat >>confdefs.h <<\_ACEOF
19241#define HAVE_SETGROUPS 1
19242_ACEOF
19243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019244 { echo "$as_me:$LINENO: result: yes" >&5
19245echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019248sed 's/^/| /' conftest.$ac_ext >&5
19249
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019250 { echo "$as_me:$LINENO: result: no" >&5
19251echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019252
19253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019254
19255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019256
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019257# check for openpty and forkpty
19258
Martin v. Löwis11437992002-04-12 09:54:03 +000019259
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019260for ac_func in openpty
19261do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019262as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19263{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19264echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019265if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019267else
Martin v. Löwis11437992002-04-12 09:54:03 +000019268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019269/* confdefs.h. */
19270_ACEOF
19271cat confdefs.h >>conftest.$ac_ext
19272cat >>conftest.$ac_ext <<_ACEOF
19273/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019274/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19276#define $ac_func innocuous_$ac_func
19277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019278/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019279 which can conflict with char $ac_func (); below.
19280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019281 <limits.h> exists even on freestanding compilers. */
19282
19283#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019284# include <limits.h>
19285#else
19286# include <assert.h>
19287#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019288
19289#undef $ac_func
19290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019291/* Override any GCC internal prototype to avoid an error.
19292 Use char because int might match the return type of a GCC
19293 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019294#ifdef __cplusplus
19295extern "C"
19296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019297char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019298/* The GNU C library defines this for functions which it implements
19299 to always fail with ENOSYS. Some functions are actually named
19300 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019301#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019302choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019303#endif
19304
Skip Montanaro6dead952003-09-25 14:50:04 +000019305int
19306main ()
19307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019308return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019309 ;
19310 return 0;
19311}
19312_ACEOF
19313rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019314if { (ac_try="$ac_link"
19315case "(($ac_try" in
19316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19317 *) ac_try_echo=$ac_try;;
19318esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019320 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019322 grep -v '^ *+' conftest.er1 >conftest.err
19323 rm -f conftest.er1
19324 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019326 (exit $ac_status); } && {
19327 test -z "$ac_c_werror_flag" ||
19328 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019329 } && test -s conftest$ac_exeext &&
19330 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019331 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019332else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019334sed 's/^/| /' conftest.$ac_ext >&5
19335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019336 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019338
19339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019340 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019341fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019342ac_res=`eval echo '${'$as_ac_var'}'`
19343 { echo "$as_me:$LINENO: result: $ac_res" >&5
19344echo "${ECHO_T}$ac_res" >&6; }
19345if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019346 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019347#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019348_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019349
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019350else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019351 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19352echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019353if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019354 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019355else
Martin v. Löwis11437992002-04-12 09:54:03 +000019356 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019357LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019359/* confdefs.h. */
19360_ACEOF
19361cat confdefs.h >>conftest.$ac_ext
19362cat >>conftest.$ac_ext <<_ACEOF
19363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365/* Override any GCC internal prototype to avoid an error.
19366 Use char because int might match the return type of a GCC
19367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019368#ifdef __cplusplus
19369extern "C"
19370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019371char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019372int
19373main ()
19374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019375return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019376 ;
19377 return 0;
19378}
19379_ACEOF
19380rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381if { (ac_try="$ac_link"
19382case "(($ac_try" in
19383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19384 *) ac_try_echo=$ac_try;;
19385esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019387 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019389 grep -v '^ *+' conftest.er1 >conftest.err
19390 rm -f conftest.er1
19391 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019393 (exit $ac_status); } && {
19394 test -z "$ac_c_werror_flag" ||
19395 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019396 } && test -s conftest$ac_exeext &&
19397 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019398 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019401sed 's/^/| /' conftest.$ac_ext >&5
19402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019403 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019405
19406rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019408LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019409fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019410{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19411echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19412if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019413 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019414#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019415_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019416 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019417else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019418 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19419echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019420if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019421 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019422else
19423 ac_check_lib_save_LIBS=$LIBS
19424LIBS="-lbsd $LIBS"
19425cat >conftest.$ac_ext <<_ACEOF
19426/* confdefs.h. */
19427_ACEOF
19428cat confdefs.h >>conftest.$ac_ext
19429cat >>conftest.$ac_ext <<_ACEOF
19430/* end confdefs.h. */
19431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019432/* Override any GCC internal prototype to avoid an error.
19433 Use char because int might match the return type of a GCC
19434 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019435#ifdef __cplusplus
19436extern "C"
19437#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019438char openpty ();
19439int
19440main ()
19441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019442return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019443 ;
19444 return 0;
19445}
19446_ACEOF
19447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019448if { (ac_try="$ac_link"
19449case "(($ac_try" in
19450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19451 *) ac_try_echo=$ac_try;;
19452esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019454 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019455 ac_status=$?
19456 grep -v '^ *+' conftest.er1 >conftest.err
19457 rm -f conftest.er1
19458 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019460 (exit $ac_status); } && {
19461 test -z "$ac_c_werror_flag" ||
19462 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019463 } && test -s conftest$ac_exeext &&
19464 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019465 ac_cv_lib_bsd_openpty=yes
19466else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019467 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019468sed 's/^/| /' conftest.$ac_ext >&5
19469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019470 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019472
19473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019474 conftest$ac_exeext conftest.$ac_ext
19475LIBS=$ac_check_lib_save_LIBS
19476fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019477{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19478echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19479if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019480 cat >>confdefs.h <<\_ACEOF
19481#define HAVE_OPENPTY 1
19482_ACEOF
19483 LIBS="$LIBS -lbsd"
19484fi
19485
19486
19487fi
19488
Fred Drake8cef4cf2000-06-28 16:40:38 +000019489
19490fi
19491done
19492
Martin v. Löwis11437992002-04-12 09:54:03 +000019493
Fred Drake8cef4cf2000-06-28 16:40:38 +000019494for ac_func in forkpty
19495do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19497{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019499if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019500 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019501else
Martin v. Löwis11437992002-04-12 09:54:03 +000019502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019503/* confdefs.h. */
19504_ACEOF
19505cat confdefs.h >>conftest.$ac_ext
19506cat >>conftest.$ac_ext <<_ACEOF
19507/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019508/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19509 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19510#define $ac_func innocuous_$ac_func
19511
Fred Drake8cef4cf2000-06-28 16:40:38 +000019512/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019513 which can conflict with char $ac_func (); below.
19514 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019515 <limits.h> exists even on freestanding compilers. */
19516
19517#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019518# include <limits.h>
19519#else
19520# include <assert.h>
19521#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019522
19523#undef $ac_func
19524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019525/* Override any GCC internal prototype to avoid an error.
19526 Use char because int might match the return type of a GCC
19527 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019528#ifdef __cplusplus
19529extern "C"
19530#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019531char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019532/* The GNU C library defines this for functions which it implements
19533 to always fail with ENOSYS. Some functions are actually named
19534 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019535#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019536choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019537#endif
19538
Skip Montanaro6dead952003-09-25 14:50:04 +000019539int
19540main ()
19541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019542return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019543 ;
19544 return 0;
19545}
19546_ACEOF
19547rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019548if { (ac_try="$ac_link"
19549case "(($ac_try" in
19550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19551 *) ac_try_echo=$ac_try;;
19552esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019556 grep -v '^ *+' conftest.er1 >conftest.err
19557 rm -f conftest.er1
19558 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019560 (exit $ac_status); } && {
19561 test -z "$ac_c_werror_flag" ||
19562 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019563 } && test -s conftest$ac_exeext &&
19564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019565 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019568sed 's/^/| /' conftest.$ac_ext >&5
19569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019572
19573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019575fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019576ac_res=`eval echo '${'$as_ac_var'}'`
19577 { echo "$as_me:$LINENO: result: $ac_res" >&5
19578echo "${ECHO_T}$ac_res" >&6; }
19579if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019580 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019581#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019582_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019583
Fred Drake8cef4cf2000-06-28 16:40:38 +000019584else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019585 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19586echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019587if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019588 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019589else
Martin v. Löwis11437992002-04-12 09:54:03 +000019590 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019591LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019593/* confdefs.h. */
19594_ACEOF
19595cat confdefs.h >>conftest.$ac_ext
19596cat >>conftest.$ac_ext <<_ACEOF
19597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599/* Override any GCC internal prototype to avoid an error.
19600 Use char because int might match the return type of a GCC
19601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019602#ifdef __cplusplus
19603extern "C"
19604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019605char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019606int
19607main ()
19608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019609return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 ;
19611 return 0;
19612}
19613_ACEOF
19614rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615if { (ac_try="$ac_link"
19616case "(($ac_try" in
19617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19618 *) ac_try_echo=$ac_try;;
19619esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019621 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019623 grep -v '^ *+' conftest.er1 >conftest.err
19624 rm -f conftest.er1
19625 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019627 (exit $ac_status); } && {
19628 test -z "$ac_c_werror_flag" ||
19629 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019630 } && test -s conftest$ac_exeext &&
19631 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019633else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019635sed 's/^/| /' conftest.$ac_ext >&5
19636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019639
19640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019642LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019643fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019644{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19645echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19646if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019647 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019648#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019649_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019650 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019651else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019652 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19653echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019654if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019655 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019656else
19657 ac_check_lib_save_LIBS=$LIBS
19658LIBS="-lbsd $LIBS"
19659cat >conftest.$ac_ext <<_ACEOF
19660/* confdefs.h. */
19661_ACEOF
19662cat confdefs.h >>conftest.$ac_ext
19663cat >>conftest.$ac_ext <<_ACEOF
19664/* end confdefs.h. */
19665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019666/* Override any GCC internal prototype to avoid an error.
19667 Use char because int might match the return type of a GCC
19668 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019669#ifdef __cplusplus
19670extern "C"
19671#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019672char forkpty ();
19673int
19674main ()
19675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019676return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019677 ;
19678 return 0;
19679}
19680_ACEOF
19681rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019682if { (ac_try="$ac_link"
19683case "(($ac_try" in
19684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19685 *) ac_try_echo=$ac_try;;
19686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019689 ac_status=$?
19690 grep -v '^ *+' conftest.er1 >conftest.err
19691 rm -f conftest.er1
19692 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019694 (exit $ac_status); } && {
19695 test -z "$ac_c_werror_flag" ||
19696 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019697 } && test -s conftest$ac_exeext &&
19698 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019699 ac_cv_lib_bsd_forkpty=yes
19700else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019701 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019702sed 's/^/| /' conftest.$ac_ext >&5
19703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019704 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706
19707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019708 conftest$ac_exeext conftest.$ac_ext
19709LIBS=$ac_check_lib_save_LIBS
19710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019711{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19712echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19713if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019714 cat >>confdefs.h <<\_ACEOF
19715#define HAVE_FORKPTY 1
19716_ACEOF
19717 LIBS="$LIBS -lbsd"
19718fi
19719
19720
19721fi
19722
Fred Drake8cef4cf2000-06-28 16:40:38 +000019723
19724fi
19725done
19726
Jack Jansendd19cf82001-12-06 22:36:17 +000019727
Christian Heimesb186d002008-03-18 15:15:01 +000019728# Stuff for expat.
19729
19730for ac_func in memmove
19731do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019732as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19733{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19734echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019735if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019736 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019737else
19738 cat >conftest.$ac_ext <<_ACEOF
19739/* confdefs.h. */
19740_ACEOF
19741cat confdefs.h >>conftest.$ac_ext
19742cat >>conftest.$ac_ext <<_ACEOF
19743/* end confdefs.h. */
19744/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19745 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19746#define $ac_func innocuous_$ac_func
19747
19748/* System header to define __stub macros and hopefully few prototypes,
19749 which can conflict with char $ac_func (); below.
19750 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19751 <limits.h> exists even on freestanding compilers. */
19752
19753#ifdef __STDC__
19754# include <limits.h>
19755#else
19756# include <assert.h>
19757#endif
19758
19759#undef $ac_func
19760
19761/* Override any GCC internal prototype to avoid an error.
19762 Use char because int might match the return type of a GCC
19763 builtin and then its argument prototype would still apply. */
19764#ifdef __cplusplus
19765extern "C"
19766#endif
19767char $ac_func ();
19768/* The GNU C library defines this for functions which it implements
19769 to always fail with ENOSYS. Some functions are actually named
19770 something starting with __ and the normal name is an alias. */
19771#if defined __stub_$ac_func || defined __stub___$ac_func
19772choke me
19773#endif
19774
19775int
19776main ()
19777{
19778return $ac_func ();
19779 ;
19780 return 0;
19781}
19782_ACEOF
19783rm -f conftest.$ac_objext conftest$ac_exeext
19784if { (ac_try="$ac_link"
19785case "(($ac_try" in
19786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19787 *) ac_try_echo=$ac_try;;
19788esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019790 (eval "$ac_link") 2>conftest.er1
19791 ac_status=$?
19792 grep -v '^ *+' conftest.er1 >conftest.err
19793 rm -f conftest.er1
19794 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019796 (exit $ac_status); } && {
19797 test -z "$ac_c_werror_flag" ||
19798 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019799 } && test -s conftest$ac_exeext &&
19800 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019801 eval "$as_ac_var=yes"
19802else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019803 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019804sed 's/^/| /' conftest.$ac_ext >&5
19805
19806 eval "$as_ac_var=no"
19807fi
19808
19809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19810 conftest$ac_exeext conftest.$ac_ext
19811fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019812ac_res=`eval echo '${'$as_ac_var'}'`
19813 { echo "$as_me:$LINENO: result: $ac_res" >&5
19814echo "${ECHO_T}$ac_res" >&6; }
19815if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019816 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019817#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019818_ACEOF
19819
19820fi
19821done
19822
19823
Michael W. Hudson54241132001-12-07 15:38:26 +000019824# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019825
19826
19827
19828
19829
19830
Fred Drake8cef4cf2000-06-28 16:40:38 +000019831for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19832do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019833as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19834{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19835echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019836if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019838else
Martin v. Löwis11437992002-04-12 09:54:03 +000019839 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019840/* confdefs.h. */
19841_ACEOF
19842cat confdefs.h >>conftest.$ac_ext
19843cat >>conftest.$ac_ext <<_ACEOF
19844/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019845/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19846 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19847#define $ac_func innocuous_$ac_func
19848
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019849/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019850 which can conflict with char $ac_func (); below.
19851 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019852 <limits.h> exists even on freestanding compilers. */
19853
19854#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019855# include <limits.h>
19856#else
19857# include <assert.h>
19858#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019859
19860#undef $ac_func
19861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862/* Override any GCC internal prototype to avoid an error.
19863 Use char because int might match the return type of a GCC
19864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019865#ifdef __cplusplus
19866extern "C"
19867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019868char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019869/* The GNU C library defines this for functions which it implements
19870 to always fail with ENOSYS. Some functions are actually named
19871 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019872#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019873choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019874#endif
19875
Skip Montanaro6dead952003-09-25 14:50:04 +000019876int
19877main ()
19878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019879return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 ;
19881 return 0;
19882}
19883_ACEOF
19884rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019885if { (ac_try="$ac_link"
19886case "(($ac_try" in
19887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19888 *) ac_try_echo=$ac_try;;
19889esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019891 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019893 grep -v '^ *+' conftest.er1 >conftest.err
19894 rm -f conftest.er1
19895 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019897 (exit $ac_status); } && {
19898 test -z "$ac_c_werror_flag" ||
19899 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019900 } && test -s conftest$ac_exeext &&
19901 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019902 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019903else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019905sed 's/^/| /' conftest.$ac_ext >&5
19906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019907 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909
19910rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019911 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019912fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019913ac_res=`eval echo '${'$as_ac_var'}'`
19914 { echo "$as_me:$LINENO: result: $ac_res" >&5
19915echo "${ECHO_T}$ac_res" >&6; }
19916if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019918#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019919_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019921fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019922done
19923
Michael W. Hudson54241132001-12-07 15:38:26 +000019924
Martin v. Löwis11437992002-04-12 09:54:03 +000019925
19926
19927
Christian Heimesb186d002008-03-18 15:15:01 +000019928for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019929do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019930as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19931{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19932echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019933if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019935else
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019937/* confdefs.h. */
19938_ACEOF
19939cat confdefs.h >>conftest.$ac_ext
19940cat >>conftest.$ac_ext <<_ACEOF
19941/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019942/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19943 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19944#define $ac_func innocuous_$ac_func
19945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019946/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019947 which can conflict with char $ac_func (); below.
19948 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019949 <limits.h> exists even on freestanding compilers. */
19950
19951#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019952# include <limits.h>
19953#else
19954# include <assert.h>
19955#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019956
19957#undef $ac_func
19958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019959/* Override any GCC internal prototype to avoid an error.
19960 Use char because int might match the return type of a GCC
19961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019962#ifdef __cplusplus
19963extern "C"
19964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019965char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019966/* The GNU C library defines this for functions which it implements
19967 to always fail with ENOSYS. Some functions are actually named
19968 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019969#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019970choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019971#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019972
Skip Montanaro6dead952003-09-25 14:50:04 +000019973int
19974main ()
19975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019976return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 ;
19978 return 0;
19979}
19980_ACEOF
19981rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019982if { (ac_try="$ac_link"
19983case "(($ac_try" in
19984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19985 *) ac_try_echo=$ac_try;;
19986esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019988 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019990 grep -v '^ *+' conftest.er1 >conftest.err
19991 rm -f conftest.er1
19992 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019994 (exit $ac_status); } && {
19995 test -z "$ac_c_werror_flag" ||
19996 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019997 } && test -s conftest$ac_exeext &&
19998 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020000else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020002sed 's/^/| /' conftest.$ac_ext >&5
20003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020006
20007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020009fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020010ac_res=`eval echo '${'$as_ac_var'}'`
20011 { echo "$as_me:$LINENO: result: $ac_res" >&5
20012echo "${ECHO_T}$ac_res" >&6; }
20013if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020015#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020016_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020017
Martin v. Löwis1142de32002-03-29 16:28:31 +000020018else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020021 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20022 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020023esac
20024
Martin v. Löwis1142de32002-03-29 16:28:31 +000020025fi
20026done
20027
20028
Martin v. Löwis11437992002-04-12 09:54:03 +000020029
Martin v. Löwis1142de32002-03-29 16:28:31 +000020030for ac_func in getpgrp
20031do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020032as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20033{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20034echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020035if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020036 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020037else
Martin v. Löwis11437992002-04-12 09:54:03 +000020038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020039/* confdefs.h. */
20040_ACEOF
20041cat confdefs.h >>conftest.$ac_ext
20042cat >>conftest.$ac_ext <<_ACEOF
20043/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020044/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20045 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20046#define $ac_func innocuous_$ac_func
20047
Martin v. Löwis1142de32002-03-29 16:28:31 +000020048/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020049 which can conflict with char $ac_func (); below.
20050 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020051 <limits.h> exists even on freestanding compilers. */
20052
20053#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020054# include <limits.h>
20055#else
20056# include <assert.h>
20057#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020058
20059#undef $ac_func
20060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020061/* Override any GCC internal prototype to avoid an error.
20062 Use char because int might match the return type of a GCC
20063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020064#ifdef __cplusplus
20065extern "C"
20066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020067char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020068/* The GNU C library defines this for functions which it implements
20069 to always fail with ENOSYS. Some functions are actually named
20070 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020071#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020072choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020073#endif
20074
Skip Montanaro6dead952003-09-25 14:50:04 +000020075int
20076main ()
20077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020078return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020079 ;
20080 return 0;
20081}
20082_ACEOF
20083rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020084if { (ac_try="$ac_link"
20085case "(($ac_try" in
20086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087 *) ac_try_echo=$ac_try;;
20088esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020092 grep -v '^ *+' conftest.er1 >conftest.err
20093 rm -f conftest.er1
20094 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020096 (exit $ac_status); } && {
20097 test -z "$ac_c_werror_flag" ||
20098 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020099 } && test -s conftest$ac_exeext &&
20100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020104sed 's/^/| /' conftest.$ac_ext >&5
20105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020106 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020108
20109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020110 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020111fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020112ac_res=`eval echo '${'$as_ac_var'}'`
20113 { echo "$as_me:$LINENO: result: $ac_res" >&5
20114echo "${ECHO_T}$ac_res" >&6; }
20115if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020117#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020118_ACEOF
20119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020120/* confdefs.h. */
20121_ACEOF
20122cat confdefs.h >>conftest.$ac_ext
20123cat >>conftest.$ac_ext <<_ACEOF
20124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020125#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020126int
20127main ()
20128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020129getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020130 ;
20131 return 0;
20132}
20133_ACEOF
20134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020135if { (ac_try="$ac_compile"
20136case "(($ac_try" in
20137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20138 *) ac_try_echo=$ac_try;;
20139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020143 grep -v '^ *+' conftest.er1 >conftest.err
20144 rm -f conftest.er1
20145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020147 (exit $ac_status); } && {
20148 test -z "$ac_c_werror_flag" ||
20149 test ! -s conftest.err
20150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020151
20152cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020153#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020154_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020155
Martin v. Löwis11437992002-04-12 09:54:03 +000020156
Guido van Rossumf78abae1997-01-21 22:02:36 +000020157else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020159sed 's/^/| /' conftest.$ac_ext >&5
20160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020161
Guido van Rossum627b2d71993-12-24 10:39:16 +000020162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020163
20164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020165
Guido van Rossum627b2d71993-12-24 10:39:16 +000020166fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020167done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020168
Jack Jansen150753c2003-03-29 22:07:47 +000020169
20170for ac_func in setpgrp
20171do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020172as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20173{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20174echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020176 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020177else
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020179/* confdefs.h. */
20180_ACEOF
20181cat confdefs.h >>conftest.$ac_ext
20182cat >>conftest.$ac_ext <<_ACEOF
20183/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020184/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20186#define $ac_func innocuous_$ac_func
20187
Jack Jansen150753c2003-03-29 22:07:47 +000020188/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020189 which can conflict with char $ac_func (); below.
20190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020191 <limits.h> exists even on freestanding compilers. */
20192
20193#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020194# include <limits.h>
20195#else
20196# include <assert.h>
20197#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020198
20199#undef $ac_func
20200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020201/* Override any GCC internal prototype to avoid an error.
20202 Use char because int might match the return type of a GCC
20203 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020204#ifdef __cplusplus
20205extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020206#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020207char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020208/* The GNU C library defines this for functions which it implements
20209 to always fail with ENOSYS. Some functions are actually named
20210 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020211#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020212choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020213#endif
20214
Skip Montanaro6dead952003-09-25 14:50:04 +000020215int
20216main ()
20217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020218return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 ;
20220 return 0;
20221}
20222_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020223rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224if { (ac_try="$ac_link"
20225case "(($ac_try" in
20226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20227 *) ac_try_echo=$ac_try;;
20228esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020230 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020232 grep -v '^ *+' conftest.er1 >conftest.err
20233 rm -f conftest.er1
20234 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 (exit $ac_status); } && {
20237 test -z "$ac_c_werror_flag" ||
20238 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020239 } && test -s conftest$ac_exeext &&
20240 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020241 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020242else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020244sed 's/^/| /' conftest.$ac_ext >&5
20245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020248
20249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020250 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020251fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020252ac_res=`eval echo '${'$as_ac_var'}'`
20253 { echo "$as_me:$LINENO: result: $ac_res" >&5
20254echo "${ECHO_T}$ac_res" >&6; }
20255if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020256 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020257#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020258_ACEOF
20259 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020260/* confdefs.h. */
20261_ACEOF
20262cat confdefs.h >>conftest.$ac_ext
20263cat >>conftest.$ac_ext <<_ACEOF
20264/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020265#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020266int
20267main ()
20268{
20269setpgrp(0,0);
20270 ;
20271 return 0;
20272}
20273_ACEOF
20274rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020275if { (ac_try="$ac_compile"
20276case "(($ac_try" in
20277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20278 *) ac_try_echo=$ac_try;;
20279esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020281 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020283 grep -v '^ *+' conftest.er1 >conftest.err
20284 rm -f conftest.er1
20285 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020287 (exit $ac_status); } && {
20288 test -z "$ac_c_werror_flag" ||
20289 test ! -s conftest.err
20290 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020291
20292cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020293#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020294_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020295
Jack Jansen150753c2003-03-29 22:07:47 +000020296
20297else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020299sed 's/^/| /' conftest.$ac_ext >&5
20300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020303
20304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020305
20306fi
20307done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020308
Martin v. Löwis11437992002-04-12 09:54:03 +000020309
Thomas Wouters3a584202000-08-05 23:28:51 +000020310for ac_func in gettimeofday
20311do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020312as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20313{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20314echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020315if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020317else
Martin v. Löwis11437992002-04-12 09:54:03 +000020318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020319/* confdefs.h. */
20320_ACEOF
20321cat confdefs.h >>conftest.$ac_ext
20322cat >>conftest.$ac_ext <<_ACEOF
20323/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020324/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20325 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20326#define $ac_func innocuous_$ac_func
20327
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020328/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020329 which can conflict with char $ac_func (); below.
20330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020331 <limits.h> exists even on freestanding compilers. */
20332
20333#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020334# include <limits.h>
20335#else
20336# include <assert.h>
20337#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020338
20339#undef $ac_func
20340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020341/* Override any GCC internal prototype to avoid an error.
20342 Use char because int might match the return type of a GCC
20343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020344#ifdef __cplusplus
20345extern "C"
20346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020347char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020348/* The GNU C library defines this for functions which it implements
20349 to always fail with ENOSYS. Some functions are actually named
20350 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020351#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020352choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020353#endif
20354
Skip Montanaro6dead952003-09-25 14:50:04 +000020355int
20356main ()
20357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020358return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020359 ;
20360 return 0;
20361}
20362_ACEOF
20363rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364if { (ac_try="$ac_link"
20365case "(($ac_try" in
20366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20367 *) ac_try_echo=$ac_try;;
20368esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020372 grep -v '^ *+' conftest.er1 >conftest.err
20373 rm -f conftest.er1
20374 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020376 (exit $ac_status); } && {
20377 test -z "$ac_c_werror_flag" ||
20378 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020379 } && test -s conftest$ac_exeext &&
20380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020384sed 's/^/| /' conftest.$ac_ext >&5
20385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020388
20389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020390 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020391fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020392ac_res=`eval echo '${'$as_ac_var'}'`
20393 { echo "$as_me:$LINENO: result: $ac_res" >&5
20394echo "${ECHO_T}$ac_res" >&6; }
20395if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020396 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020397#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020398_ACEOF
20399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020400/* confdefs.h. */
20401_ACEOF
20402cat confdefs.h >>conftest.$ac_ext
20403cat >>conftest.$ac_ext <<_ACEOF
20404/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020405#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020406int
20407main ()
20408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020409gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020410 ;
20411 return 0;
20412}
20413_ACEOF
20414rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415if { (ac_try="$ac_compile"
20416case "(($ac_try" in
20417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418 *) ac_try_echo=$ac_try;;
20419esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020423 grep -v '^ *+' conftest.er1 >conftest.err
20424 rm -f conftest.er1
20425 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020427 (exit $ac_status); } && {
20428 test -z "$ac_c_werror_flag" ||
20429 test ! -s conftest.err
20430 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020431 :
20432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020434sed 's/^/| /' conftest.$ac_ext >&5
20435
Martin v. Löwis11437992002-04-12 09:54:03 +000020436
20437cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020438#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020439_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020440
Martin v. Löwis11437992002-04-12 09:54:03 +000020441
Guido van Rossum627b2d71993-12-24 10:39:16 +000020442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020443
20444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020445
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020446fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020447done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020448
Michael W. Hudson54241132001-12-07 15:38:26 +000020449
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020450{ echo "$as_me:$LINENO: checking for major" >&5
20451echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020453/* confdefs.h. */
20454_ACEOF
20455cat confdefs.h >>conftest.$ac_ext
20456cat >>conftest.$ac_ext <<_ACEOF
20457/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020458
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020459#if defined(MAJOR_IN_MKDEV)
20460#include <sys/mkdev.h>
20461#elif defined(MAJOR_IN_SYSMACROS)
20462#include <sys/sysmacros.h>
20463#else
20464#include <sys/types.h>
20465#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020466
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020467int
20468main ()
20469{
20470
20471 makedev(major(0),minor(0));
20472
20473 ;
20474 return 0;
20475}
20476_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020477rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020478if { (ac_try="$ac_link"
20479case "(($ac_try" in
20480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20481 *) ac_try_echo=$ac_try;;
20482esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020484 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020486 grep -v '^ *+' conftest.er1 >conftest.err
20487 rm -f conftest.er1
20488 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020490 (exit $ac_status); } && {
20491 test -z "$ac_c_werror_flag" ||
20492 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020493 } && test -s conftest$ac_exeext &&
20494 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020495
20496
20497cat >>confdefs.h <<\_ACEOF
20498#define HAVE_DEVICE_MACROS 1
20499_ACEOF
20500
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020501 { echo "$as_me:$LINENO: result: yes" >&5
20502echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020503
20504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020506sed 's/^/| /' conftest.$ac_ext >&5
20507
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020509 { echo "$as_me:$LINENO: result: no" >&5
20510echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020511
20512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020513
20514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020515 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020516
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020517# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020518# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020519{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20520echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020521cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020522/* confdefs.h. */
20523_ACEOF
20524cat confdefs.h >>conftest.$ac_ext
20525cat >>conftest.$ac_ext <<_ACEOF
20526/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020527
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020528#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020529#include <sys/socket.h>
20530#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020531#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020532
Martin v. Löwis11437992002-04-12 09:54:03 +000020533int
20534main ()
20535{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020536getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 ;
20538 return 0;
20539}
20540_ACEOF
20541rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020542if { (ac_try="$ac_link"
20543case "(($ac_try" in
20544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20545 *) ac_try_echo=$ac_try;;
20546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020550 grep -v '^ *+' conftest.er1 >conftest.err
20551 rm -f conftest.er1
20552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020554 (exit $ac_status); } && {
20555 test -z "$ac_c_werror_flag" ||
20556 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020557 } && test -s conftest$ac_exeext &&
20558 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020559 have_getaddrinfo=yes
20560else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020561 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020562sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020564 have_getaddrinfo=no
20565fi
20566
20567rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20568 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020569{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20570echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020571if test $have_getaddrinfo = yes
20572then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020573 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20574echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020575 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020576 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020577else
20578 if test "$cross_compiling" = yes; then
20579 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020580else
Martin v. Löwis11437992002-04-12 09:54:03 +000020581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020582/* confdefs.h. */
20583_ACEOF
20584cat confdefs.h >>conftest.$ac_ext
20585cat >>conftest.$ac_ext <<_ACEOF
20586/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020587
20588#include <sys/types.h>
20589#include <netdb.h>
20590#include <string.h>
20591#include <sys/socket.h>
20592#include <netinet/in.h>
20593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020594int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020595{
20596 int passive, gaierr, inet4 = 0, inet6 = 0;
20597 struct addrinfo hints, *ai, *aitop;
20598 char straddr[INET6_ADDRSTRLEN], strport[16];
20599
20600 for (passive = 0; passive <= 1; passive++) {
20601 memset(&hints, 0, sizeof(hints));
20602 hints.ai_family = AF_UNSPEC;
20603 hints.ai_flags = passive ? AI_PASSIVE : 0;
20604 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020605 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020606 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20607 (void)gai_strerror(gaierr);
20608 goto bad;
20609 }
20610 for (ai = aitop; ai; ai = ai->ai_next) {
20611 if (ai->ai_addr == NULL ||
20612 ai->ai_addrlen == 0 ||
20613 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20614 straddr, sizeof(straddr), strport, sizeof(strport),
20615 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20616 goto bad;
20617 }
20618 switch (ai->ai_family) {
20619 case AF_INET:
20620 if (strcmp(strport, "54321") != 0) {
20621 goto bad;
20622 }
20623 if (passive) {
20624 if (strcmp(straddr, "0.0.0.0") != 0) {
20625 goto bad;
20626 }
20627 } else {
20628 if (strcmp(straddr, "127.0.0.1") != 0) {
20629 goto bad;
20630 }
20631 }
20632 inet4++;
20633 break;
20634 case AF_INET6:
20635 if (strcmp(strport, "54321") != 0) {
20636 goto bad;
20637 }
20638 if (passive) {
20639 if (strcmp(straddr, "::") != 0) {
20640 goto bad;
20641 }
20642 } else {
20643 if (strcmp(straddr, "::1") != 0) {
20644 goto bad;
20645 }
20646 }
20647 inet6++;
20648 break;
20649 case AF_UNSPEC:
20650 goto bad;
20651 break;
20652 default:
20653 /* another family support? */
20654 break;
20655 }
20656 }
20657 }
20658
20659 if (!(inet4 == 0 || inet4 == 2))
20660 goto bad;
20661 if (!(inet6 == 0 || inet6 == 2))
20662 goto bad;
20663
20664 if (aitop)
20665 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020666 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020667
20668 bad:
20669 if (aitop)
20670 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020671 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020672}
20673
Martin v. Löwis11437992002-04-12 09:54:03 +000020674_ACEOF
20675rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020676if { (ac_try="$ac_link"
20677case "(($ac_try" in
20678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20679 *) ac_try_echo=$ac_try;;
20680esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020683 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020686 { (case "(($ac_try" in
20687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20688 *) ac_try_echo=$ac_try;;
20689esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020691 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020692 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020694 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020695 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020696else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020697 echo "$as_me: program exited with status $ac_status" >&5
20698echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020699sed 's/^/| /' conftest.$ac_ext >&5
20700
Martin v. Löwis11437992002-04-12 09:54:03 +000020701( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020702ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020704rm -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 +000020705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020706
20707
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020708fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020709
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020711
Mark Dickinson2df5d282009-12-31 21:22:50 +000020712if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020713then
20714 if test $ipv6 = yes
20715 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020716 echo 'Fatal: You must get working getaddrinfo() function.'
20717 echo ' or you can specify "--disable-ipv6"'.
20718 exit 1
20719 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020720else
Martin v. Löwis11437992002-04-12 09:54:03 +000020721
20722cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020723#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020724_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020725
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020726fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020727
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020728for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020729do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20731{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020735else
Martin v. Löwis11437992002-04-12 09:54:03 +000020736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020737/* confdefs.h. */
20738_ACEOF
20739cat confdefs.h >>conftest.$ac_ext
20740cat >>conftest.$ac_ext <<_ACEOF
20741/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020742/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20743 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20744#define $ac_func innocuous_$ac_func
20745
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020746/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020747 which can conflict with char $ac_func (); below.
20748 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020749 <limits.h> exists even on freestanding compilers. */
20750
20751#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020752# include <limits.h>
20753#else
20754# include <assert.h>
20755#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020756
20757#undef $ac_func
20758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020759/* Override any GCC internal prototype to avoid an error.
20760 Use char because int might match the return type of a GCC
20761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020762#ifdef __cplusplus
20763extern "C"
20764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020765char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020766/* The GNU C library defines this for functions which it implements
20767 to always fail with ENOSYS. Some functions are actually named
20768 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020769#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020770choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020771#endif
20772
Skip Montanaro6dead952003-09-25 14:50:04 +000020773int
20774main ()
20775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020776return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020777 ;
20778 return 0;
20779}
20780_ACEOF
20781rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020782if { (ac_try="$ac_link"
20783case "(($ac_try" in
20784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20785 *) ac_try_echo=$ac_try;;
20786esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020788 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020790 grep -v '^ *+' conftest.er1 >conftest.err
20791 rm -f conftest.er1
20792 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020794 (exit $ac_status); } && {
20795 test -z "$ac_c_werror_flag" ||
20796 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020797 } && test -s conftest$ac_exeext &&
20798 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020802sed 's/^/| /' conftest.$ac_ext >&5
20803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020806
20807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020808 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020809fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020810ac_res=`eval echo '${'$as_ac_var'}'`
20811 { echo "$as_me:$LINENO: result: $ac_res" >&5
20812echo "${ECHO_T}$ac_res" >&6; }
20813if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020814 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020816_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020817
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020818fi
20819done
20820
Michael W. Hudson54241132001-12-07 15:38:26 +000020821
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020823{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20824echo $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 +000020825if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020827else
Martin v. Löwis11437992002-04-12 09:54:03 +000020828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020829/* confdefs.h. */
20830_ACEOF
20831cat confdefs.h >>conftest.$ac_ext
20832cat >>conftest.$ac_ext <<_ACEOF
20833/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020834#include <sys/types.h>
20835#include <sys/time.h>
20836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020837
Martin v. Löwis11437992002-04-12 09:54:03 +000020838int
20839main ()
20840{
20841if ((struct tm *) 0)
20842return 0;
20843 ;
20844 return 0;
20845}
20846_ACEOF
20847rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848if { (ac_try="$ac_compile"
20849case "(($ac_try" in
20850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20851 *) ac_try_echo=$ac_try;;
20852esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020856 grep -v '^ *+' conftest.er1 >conftest.err
20857 rm -f conftest.er1
20858 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860 (exit $ac_status); } && {
20861 test -z "$ac_c_werror_flag" ||
20862 test ! -s conftest.err
20863 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020864 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020865else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020867sed 's/^/| /' conftest.$ac_ext >&5
20868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871
20872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020873fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020874{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20875echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020876if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020877
20878cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020879#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020881
20882fi
20883
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020884{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20885echo $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 +000020886if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020887 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020888else
Martin v. Löwis11437992002-04-12 09:54:03 +000020889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020890/* confdefs.h. */
20891_ACEOF
20892cat confdefs.h >>conftest.$ac_ext
20893cat >>conftest.$ac_ext <<_ACEOF
20894/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020895#include <sys/types.h>
20896#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020897
Martin v. Löwis11437992002-04-12 09:54:03 +000020898int
20899main ()
20900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020901struct tm tm;
20902 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020903 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020904 ;
20905 return 0;
20906}
20907_ACEOF
20908rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020909if { (ac_try="$ac_compile"
20910case "(($ac_try" in
20911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20912 *) ac_try_echo=$ac_try;;
20913esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020917 grep -v '^ *+' conftest.er1 >conftest.err
20918 rm -f conftest.er1
20919 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921 (exit $ac_status); } && {
20922 test -z "$ac_c_werror_flag" ||
20923 test ! -s conftest.err
20924 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925 ac_cv_struct_tm=time.h
20926else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020928sed 's/^/| /' conftest.$ac_ext >&5
20929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932
20933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020934fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020935{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20936echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020937if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020938
20939cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020940#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020941_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020942
20943fi
20944
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020945{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20946echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020947if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020949else
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020951/* confdefs.h. */
20952_ACEOF
20953cat confdefs.h >>conftest.$ac_ext
20954cat >>conftest.$ac_ext <<_ACEOF
20955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020956#include <sys/types.h>
20957#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020958
20959
Martin v. Löwis11437992002-04-12 09:54:03 +000020960int
20961main ()
20962{
20963static struct tm ac_aggr;
20964if (ac_aggr.tm_zone)
20965return 0;
20966 ;
20967 return 0;
20968}
20969_ACEOF
20970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020971if { (ac_try="$ac_compile"
20972case "(($ac_try" in
20973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20974 *) ac_try_echo=$ac_try;;
20975esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020979 grep -v '^ *+' conftest.er1 >conftest.err
20980 rm -f conftest.er1
20981 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983 (exit $ac_status); } && {
20984 test -z "$ac_c_werror_flag" ||
20985 test ! -s conftest.err
20986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020988else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020990sed 's/^/| /' conftest.$ac_ext >&5
20991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020993/* confdefs.h. */
20994_ACEOF
20995cat confdefs.h >>conftest.$ac_ext
20996cat >>conftest.$ac_ext <<_ACEOF
20997/* end confdefs.h. */
20998#include <sys/types.h>
20999#include <$ac_cv_struct_tm>
21000
21001
21002int
21003main ()
21004{
21005static struct tm ac_aggr;
21006if (sizeof ac_aggr.tm_zone)
21007return 0;
21008 ;
21009 return 0;
21010}
21011_ACEOF
21012rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021013if { (ac_try="$ac_compile"
21014case "(($ac_try" in
21015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21016 *) ac_try_echo=$ac_try;;
21017esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021019 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021021 grep -v '^ *+' conftest.er1 >conftest.err
21022 rm -f conftest.er1
21023 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021025 (exit $ac_status); } && {
21026 test -z "$ac_c_werror_flag" ||
21027 test ! -s conftest.err
21028 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021029 ac_cv_member_struct_tm_tm_zone=yes
21030else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021034 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021036
21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021039
21040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021041fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021042{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21043echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21044if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021045
21046cat >>confdefs.h <<_ACEOF
21047#define HAVE_STRUCT_TM_TM_ZONE 1
21048_ACEOF
21049
21050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021051fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021052
Martin v. Löwis11437992002-04-12 09:54:03 +000021053if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21054
21055cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021056#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021057_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021058
21059else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021060 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21061echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021062if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021063 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021064else
21065 cat >conftest.$ac_ext <<_ACEOF
21066/* confdefs.h. */
21067_ACEOF
21068cat confdefs.h >>conftest.$ac_ext
21069cat >>conftest.$ac_ext <<_ACEOF
21070/* end confdefs.h. */
21071#include <time.h>
21072
21073int
21074main ()
21075{
21076#ifndef tzname
21077 (void) tzname;
21078#endif
21079
21080 ;
21081 return 0;
21082}
21083_ACEOF
21084rm -f conftest.$ac_objext
21085if { (ac_try="$ac_compile"
21086case "(($ac_try" in
21087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21088 *) ac_try_echo=$ac_try;;
21089esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021091 (eval "$ac_compile") 2>conftest.er1
21092 ac_status=$?
21093 grep -v '^ *+' conftest.er1 >conftest.err
21094 rm -f conftest.er1
21095 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021097 (exit $ac_status); } && {
21098 test -z "$ac_c_werror_flag" ||
21099 test ! -s conftest.err
21100 } && test -s conftest.$ac_objext; then
21101 ac_cv_have_decl_tzname=yes
21102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021103 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021104sed 's/^/| /' conftest.$ac_ext >&5
21105
21106 ac_cv_have_decl_tzname=no
21107fi
21108
21109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21110fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021111{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21112echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21113if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114
21115cat >>confdefs.h <<_ACEOF
21116#define HAVE_DECL_TZNAME 1
21117_ACEOF
21118
21119
21120else
21121 cat >>confdefs.h <<_ACEOF
21122#define HAVE_DECL_TZNAME 0
21123_ACEOF
21124
21125
21126fi
21127
21128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021129 { echo "$as_me:$LINENO: checking for tzname" >&5
21130echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021131if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021133else
Martin v. Löwis11437992002-04-12 09:54:03 +000021134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021135/* confdefs.h. */
21136_ACEOF
21137cat confdefs.h >>conftest.$ac_ext
21138cat >>conftest.$ac_ext <<_ACEOF
21139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021140#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141#if !HAVE_DECL_TZNAME
21142extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021144
Martin v. Löwis11437992002-04-12 09:54:03 +000021145int
21146main ()
21147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021148return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021149 ;
21150 return 0;
21151}
21152_ACEOF
21153rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021154if { (ac_try="$ac_link"
21155case "(($ac_try" in
21156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21157 *) ac_try_echo=$ac_try;;
21158esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021162 grep -v '^ *+' conftest.er1 >conftest.err
21163 rm -f conftest.er1
21164 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021166 (exit $ac_status); } && {
21167 test -z "$ac_c_werror_flag" ||
21168 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021169 } && test -s conftest$ac_exeext &&
21170 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021171 ac_cv_var_tzname=yes
21172else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021174sed 's/^/| /' conftest.$ac_ext >&5
21175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021176 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021178
21179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021180 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021181fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021182{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21183echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021184 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021185
21186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021187#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021188_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021190 fi
21191fi
21192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021193{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21194echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021195if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021196 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021197else
21198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021199/* confdefs.h. */
21200_ACEOF
21201cat confdefs.h >>conftest.$ac_ext
21202cat >>conftest.$ac_ext <<_ACEOF
21203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021204$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021205int
21206main ()
21207{
21208static struct stat ac_aggr;
21209if (ac_aggr.st_rdev)
21210return 0;
21211 ;
21212 return 0;
21213}
21214_ACEOF
21215rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216if { (ac_try="$ac_compile"
21217case "(($ac_try" in
21218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21219 *) ac_try_echo=$ac_try;;
21220esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021224 grep -v '^ *+' conftest.er1 >conftest.err
21225 rm -f conftest.er1
21226 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021228 (exit $ac_status); } && {
21229 test -z "$ac_c_werror_flag" ||
21230 test ! -s conftest.err
21231 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021232 ac_cv_member_struct_stat_st_rdev=yes
21233else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021235sed 's/^/| /' conftest.$ac_ext >&5
21236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021237 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021238/* confdefs.h. */
21239_ACEOF
21240cat confdefs.h >>conftest.$ac_ext
21241cat >>conftest.$ac_ext <<_ACEOF
21242/* end confdefs.h. */
21243$ac_includes_default
21244int
21245main ()
21246{
21247static struct stat ac_aggr;
21248if (sizeof ac_aggr.st_rdev)
21249return 0;
21250 ;
21251 return 0;
21252}
21253_ACEOF
21254rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021255if { (ac_try="$ac_compile"
21256case "(($ac_try" in
21257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21258 *) ac_try_echo=$ac_try;;
21259esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021263 grep -v '^ *+' conftest.er1 >conftest.err
21264 rm -f conftest.er1
21265 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267 (exit $ac_status); } && {
21268 test -z "$ac_c_werror_flag" ||
21269 test ! -s conftest.err
21270 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021271 ac_cv_member_struct_stat_st_rdev=yes
21272else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021274sed 's/^/| /' conftest.$ac_ext >&5
21275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021278
21279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021281
21282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021283fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021284{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21285echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21286if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
21288cat >>confdefs.h <<_ACEOF
21289#define HAVE_STRUCT_STAT_ST_RDEV 1
21290_ACEOF
21291
21292
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021293fi
21294
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021295{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21296echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021297if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021298 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021299else
Martin v. Löwis11437992002-04-12 09:54:03 +000021300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021301/* confdefs.h. */
21302_ACEOF
21303cat confdefs.h >>conftest.$ac_ext
21304cat >>conftest.$ac_ext <<_ACEOF
21305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021306$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021307int
21308main ()
21309{
21310static struct stat ac_aggr;
21311if (ac_aggr.st_blksize)
21312return 0;
21313 ;
21314 return 0;
21315}
21316_ACEOF
21317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318if { (ac_try="$ac_compile"
21319case "(($ac_try" in
21320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21321 *) ac_try_echo=$ac_try;;
21322esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021324 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021326 grep -v '^ *+' conftest.er1 >conftest.err
21327 rm -f conftest.er1
21328 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021330 (exit $ac_status); } && {
21331 test -z "$ac_c_werror_flag" ||
21332 test ! -s conftest.err
21333 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021334 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021335else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021336 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021337sed 's/^/| /' conftest.$ac_ext >&5
21338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021340/* confdefs.h. */
21341_ACEOF
21342cat confdefs.h >>conftest.$ac_ext
21343cat >>conftest.$ac_ext <<_ACEOF
21344/* end confdefs.h. */
21345$ac_includes_default
21346int
21347main ()
21348{
21349static struct stat ac_aggr;
21350if (sizeof ac_aggr.st_blksize)
21351return 0;
21352 ;
21353 return 0;
21354}
21355_ACEOF
21356rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021357if { (ac_try="$ac_compile"
21358case "(($ac_try" in
21359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21360 *) ac_try_echo=$ac_try;;
21361esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021363 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021365 grep -v '^ *+' conftest.er1 >conftest.err
21366 rm -f conftest.er1
21367 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369 (exit $ac_status); } && {
21370 test -z "$ac_c_werror_flag" ||
21371 test ! -s conftest.err
21372 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021373 ac_cv_member_struct_stat_st_blksize=yes
21374else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021376sed 's/^/| /' conftest.$ac_ext >&5
21377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021378 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021380
21381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383
21384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021385fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021386{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21387echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21388if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021389
Martin v. Löwis11437992002-04-12 09:54:03 +000021390cat >>confdefs.h <<_ACEOF
21391#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21392_ACEOF
21393
21394
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021395fi
21396
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021397{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21398echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021399if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021400 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021401else
21402 cat >conftest.$ac_ext <<_ACEOF
21403/* confdefs.h. */
21404_ACEOF
21405cat confdefs.h >>conftest.$ac_ext
21406cat >>conftest.$ac_ext <<_ACEOF
21407/* end confdefs.h. */
21408$ac_includes_default
21409int
21410main ()
21411{
21412static struct stat ac_aggr;
21413if (ac_aggr.st_flags)
21414return 0;
21415 ;
21416 return 0;
21417}
21418_ACEOF
21419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420if { (ac_try="$ac_compile"
21421case "(($ac_try" in
21422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21423 *) ac_try_echo=$ac_try;;
21424esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021426 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021427 ac_status=$?
21428 grep -v '^ *+' conftest.er1 >conftest.err
21429 rm -f conftest.er1
21430 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021432 (exit $ac_status); } && {
21433 test -z "$ac_c_werror_flag" ||
21434 test ! -s conftest.err
21435 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021436 ac_cv_member_struct_stat_st_flags=yes
21437else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021438 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021439sed 's/^/| /' conftest.$ac_ext >&5
21440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021441 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021442/* confdefs.h. */
21443_ACEOF
21444cat confdefs.h >>conftest.$ac_ext
21445cat >>conftest.$ac_ext <<_ACEOF
21446/* end confdefs.h. */
21447$ac_includes_default
21448int
21449main ()
21450{
21451static struct stat ac_aggr;
21452if (sizeof ac_aggr.st_flags)
21453return 0;
21454 ;
21455 return 0;
21456}
21457_ACEOF
21458rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021459if { (ac_try="$ac_compile"
21460case "(($ac_try" in
21461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21462 *) ac_try_echo=$ac_try;;
21463esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021465 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021466 ac_status=$?
21467 grep -v '^ *+' conftest.er1 >conftest.err
21468 rm -f conftest.er1
21469 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021471 (exit $ac_status); } && {
21472 test -z "$ac_c_werror_flag" ||
21473 test ! -s conftest.err
21474 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021475 ac_cv_member_struct_stat_st_flags=yes
21476else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021477 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021478sed 's/^/| /' conftest.$ac_ext >&5
21479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021482
21483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021485
21486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021487fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021488{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21489echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21490if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021491
21492cat >>confdefs.h <<_ACEOF
21493#define HAVE_STRUCT_STAT_ST_FLAGS 1
21494_ACEOF
21495
21496
21497fi
21498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021499{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21500echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021501if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021502 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021503else
21504 cat >conftest.$ac_ext <<_ACEOF
21505/* confdefs.h. */
21506_ACEOF
21507cat confdefs.h >>conftest.$ac_ext
21508cat >>conftest.$ac_ext <<_ACEOF
21509/* end confdefs.h. */
21510$ac_includes_default
21511int
21512main ()
21513{
21514static struct stat ac_aggr;
21515if (ac_aggr.st_gen)
21516return 0;
21517 ;
21518 return 0;
21519}
21520_ACEOF
21521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021522if { (ac_try="$ac_compile"
21523case "(($ac_try" in
21524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21525 *) ac_try_echo=$ac_try;;
21526esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021529 ac_status=$?
21530 grep -v '^ *+' conftest.er1 >conftest.err
21531 rm -f conftest.er1
21532 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021534 (exit $ac_status); } && {
21535 test -z "$ac_c_werror_flag" ||
21536 test ! -s conftest.err
21537 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021538 ac_cv_member_struct_stat_st_gen=yes
21539else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021540 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021541sed 's/^/| /' conftest.$ac_ext >&5
21542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021543 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021544/* confdefs.h. */
21545_ACEOF
21546cat confdefs.h >>conftest.$ac_ext
21547cat >>conftest.$ac_ext <<_ACEOF
21548/* end confdefs.h. */
21549$ac_includes_default
21550int
21551main ()
21552{
21553static struct stat ac_aggr;
21554if (sizeof ac_aggr.st_gen)
21555return 0;
21556 ;
21557 return 0;
21558}
21559_ACEOF
21560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021561if { (ac_try="$ac_compile"
21562case "(($ac_try" in
21563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21564 *) ac_try_echo=$ac_try;;
21565esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021568 ac_status=$?
21569 grep -v '^ *+' conftest.er1 >conftest.err
21570 rm -f conftest.er1
21571 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573 (exit $ac_status); } && {
21574 test -z "$ac_c_werror_flag" ||
21575 test ! -s conftest.err
21576 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021577 ac_cv_member_struct_stat_st_gen=yes
21578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021579 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021580sed 's/^/| /' conftest.$ac_ext >&5
21581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021582 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021584
21585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021587
21588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021589fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021590{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21591echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21592if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021593
21594cat >>confdefs.h <<_ACEOF
21595#define HAVE_STRUCT_STAT_ST_GEN 1
21596_ACEOF
21597
21598
21599fi
21600
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021601{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21602echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021603if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021604 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021605else
21606 cat >conftest.$ac_ext <<_ACEOF
21607/* confdefs.h. */
21608_ACEOF
21609cat confdefs.h >>conftest.$ac_ext
21610cat >>conftest.$ac_ext <<_ACEOF
21611/* end confdefs.h. */
21612$ac_includes_default
21613int
21614main ()
21615{
21616static struct stat ac_aggr;
21617if (ac_aggr.st_birthtime)
21618return 0;
21619 ;
21620 return 0;
21621}
21622_ACEOF
21623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624if { (ac_try="$ac_compile"
21625case "(($ac_try" in
21626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21627 *) ac_try_echo=$ac_try;;
21628esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021631 ac_status=$?
21632 grep -v '^ *+' conftest.er1 >conftest.err
21633 rm -f conftest.er1
21634 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021636 (exit $ac_status); } && {
21637 test -z "$ac_c_werror_flag" ||
21638 test ! -s conftest.err
21639 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021640 ac_cv_member_struct_stat_st_birthtime=yes
21641else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021642 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021643sed 's/^/| /' conftest.$ac_ext >&5
21644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021645 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021646/* confdefs.h. */
21647_ACEOF
21648cat confdefs.h >>conftest.$ac_ext
21649cat >>conftest.$ac_ext <<_ACEOF
21650/* end confdefs.h. */
21651$ac_includes_default
21652int
21653main ()
21654{
21655static struct stat ac_aggr;
21656if (sizeof ac_aggr.st_birthtime)
21657return 0;
21658 ;
21659 return 0;
21660}
21661_ACEOF
21662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021663if { (ac_try="$ac_compile"
21664case "(($ac_try" in
21665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21666 *) ac_try_echo=$ac_try;;
21667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021670 ac_status=$?
21671 grep -v '^ *+' conftest.er1 >conftest.err
21672 rm -f conftest.er1
21673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675 (exit $ac_status); } && {
21676 test -z "$ac_c_werror_flag" ||
21677 test ! -s conftest.err
21678 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021679 ac_cv_member_struct_stat_st_birthtime=yes
21680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021681 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021682sed 's/^/| /' conftest.$ac_ext >&5
21683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021684 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021686
21687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021689
21690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021691fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021692{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21693echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21694if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021695
21696cat >>confdefs.h <<_ACEOF
21697#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21698_ACEOF
21699
21700
21701fi
21702
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021703{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21704echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021705if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021707else
Martin v. Löwis11437992002-04-12 09:54:03 +000021708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021709/* confdefs.h. */
21710_ACEOF
21711cat confdefs.h >>conftest.$ac_ext
21712cat >>conftest.$ac_ext <<_ACEOF
21713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021714$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021715int
21716main ()
21717{
21718static struct stat ac_aggr;
21719if (ac_aggr.st_blocks)
21720return 0;
21721 ;
21722 return 0;
21723}
21724_ACEOF
21725rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021726if { (ac_try="$ac_compile"
21727case "(($ac_try" in
21728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21729 *) ac_try_echo=$ac_try;;
21730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021734 grep -v '^ *+' conftest.er1 >conftest.err
21735 rm -f conftest.er1
21736 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738 (exit $ac_status); } && {
21739 test -z "$ac_c_werror_flag" ||
21740 test ! -s conftest.err
21741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021742 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021743else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021745sed 's/^/| /' conftest.$ac_ext >&5
21746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021748/* confdefs.h. */
21749_ACEOF
21750cat confdefs.h >>conftest.$ac_ext
21751cat >>conftest.$ac_ext <<_ACEOF
21752/* end confdefs.h. */
21753$ac_includes_default
21754int
21755main ()
21756{
21757static struct stat ac_aggr;
21758if (sizeof ac_aggr.st_blocks)
21759return 0;
21760 ;
21761 return 0;
21762}
21763_ACEOF
21764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021765if { (ac_try="$ac_compile"
21766case "(($ac_try" in
21767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21768 *) ac_try_echo=$ac_try;;
21769esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021771 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021773 grep -v '^ *+' conftest.er1 >conftest.err
21774 rm -f conftest.er1
21775 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021777 (exit $ac_status); } && {
21778 test -z "$ac_c_werror_flag" ||
21779 test ! -s conftest.err
21780 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021781 ac_cv_member_struct_stat_st_blocks=yes
21782else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021784sed 's/^/| /' conftest.$ac_ext >&5
21785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788
21789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021791
21792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021793fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021794{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21795echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21796if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021797
Martin v. Löwis11437992002-04-12 09:54:03 +000021798cat >>confdefs.h <<_ACEOF
21799#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21800_ACEOF
21801
21802
21803cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021804#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021805_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021806
21807else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021809 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021810 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21811 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021812esac
21813
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021814fi
21815
Michael W. Hudson54241132001-12-07 15:38:26 +000021816
Martin v. Löwis11437992002-04-12 09:54:03 +000021817
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021818{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21819echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021820if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021822else
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021830int
21831main ()
21832{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021833return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ;
21835 return 0;
21836}
21837_ACEOF
21838rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839if { (ac_try="$ac_compile"
21840case "(($ac_try" in
21841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21842 *) ac_try_echo=$ac_try;;
21843esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021847 grep -v '^ *+' conftest.er1 >conftest.err
21848 rm -f conftest.er1
21849 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021851 (exit $ac_status); } && {
21852 test -z "$ac_c_werror_flag" ||
21853 test ! -s conftest.err
21854 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855 ac_cv_header_time_altzone=yes
21856else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021858sed 's/^/| /' conftest.$ac_ext >&5
21859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021861fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21864fi
21865
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021866{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21867echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021868if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021869
21870cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021871#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021872_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021873
21874fi
21875
Guido van Rossumda88dad1995-01-26 00:46:29 +000021876was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021877{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21878echo $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 +000021879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021880/* confdefs.h. */
21881_ACEOF
21882cat confdefs.h >>conftest.$ac_ext
21883cat >>conftest.$ac_ext <<_ACEOF
21884/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021885
21886#include <sys/types.h>
21887#include <sys/select.h>
21888#include <sys/time.h>
21889
Martin v. Löwis11437992002-04-12 09:54:03 +000021890int
21891main ()
21892{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021893;
Martin v. Löwis11437992002-04-12 09:54:03 +000021894 ;
21895 return 0;
21896}
21897_ACEOF
21898rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899if { (ac_try="$ac_compile"
21900case "(($ac_try" in
21901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21902 *) ac_try_echo=$ac_try;;
21903esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021907 grep -v '^ *+' conftest.er1 >conftest.err
21908 rm -f conftest.er1
21909 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911 (exit $ac_status); } && {
21912 test -z "$ac_c_werror_flag" ||
21913 test ! -s conftest.err
21914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021915
21916
21917cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021918#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021919_ACEOF
21920
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021921 was_it_defined=yes
21922
Guido van Rossumf78abae1997-01-21 22:02:36 +000021923else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021925sed 's/^/| /' conftest.$ac_ext >&5
21926
Thomas Wouters477c8d52006-05-27 19:21:47 +000021927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021928fi
21929
21930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021931{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21932echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021933
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021934{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21935echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021936if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021937 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021938else
Martin v. Löwis11437992002-04-12 09:54:03 +000021939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021940/* confdefs.h. */
21941_ACEOF
21942cat confdefs.h >>conftest.$ac_ext
21943cat >>conftest.$ac_ext <<_ACEOF
21944/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021945
21946# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021947int
21948main ()
21949{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021950struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021951 ;
21952 return 0;
21953}
21954_ACEOF
21955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021956if { (ac_try="$ac_compile"
21957case "(($ac_try" in
21958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21959 *) ac_try_echo=$ac_try;;
21960esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021964 grep -v '^ *+' conftest.er1 >conftest.err
21965 rm -f conftest.er1
21966 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021968 (exit $ac_status); } && {
21969 test -z "$ac_c_werror_flag" ||
21970 test ! -s conftest.err
21971 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021972 ac_cv_struct_addrinfo=yes
21973else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021975sed 's/^/| /' conftest.$ac_ext >&5
21976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021977 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21981fi
21982
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021983{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21984echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021985if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021986
21987cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021988#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021989_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021990
21991fi
21992
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021993{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21994echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021995if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021996 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021997else
Martin v. Löwis11437992002-04-12 09:54:03 +000021998 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021999/* confdefs.h. */
22000_ACEOF
22001cat confdefs.h >>conftest.$ac_ext
22002cat >>conftest.$ac_ext <<_ACEOF
22003/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022004
22005# include <sys/types.h>
22006# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022007int
22008main ()
22009{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022010struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022011 ;
22012 return 0;
22013}
22014_ACEOF
22015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022016if { (ac_try="$ac_compile"
22017case "(($ac_try" in
22018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22019 *) ac_try_echo=$ac_try;;
22020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022024 grep -v '^ *+' conftest.er1 >conftest.err
22025 rm -f conftest.er1
22026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028 (exit $ac_status); } && {
22029 test -z "$ac_c_werror_flag" ||
22030 test ! -s conftest.err
22031 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022032 ac_cv_struct_sockaddr_storage=yes
22033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022035sed 's/^/| /' conftest.$ac_ext >&5
22036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022037 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22041fi
22042
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022043{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22044echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022045if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022046
22047cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022048#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022049_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022050
22051fi
22052
Guido van Rossum627b2d71993-12-24 10:39:16 +000022053# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022054
Michael W. Hudson54241132001-12-07 15:38:26 +000022055
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022056{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22057echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022058if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022059 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022060else
Martin v. Löwis11437992002-04-12 09:54:03 +000022061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022062/* confdefs.h. */
22063_ACEOF
22064cat confdefs.h >>conftest.$ac_ext
22065cat >>conftest.$ac_ext <<_ACEOF
22066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022068int
22069main ()
22070{
22071static int test_array [1 - 2 * !(((char) -1) < 0)];
22072test_array [0] = 0
22073
22074 ;
22075 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022076}
Martin v. Löwis11437992002-04-12 09:54:03 +000022077_ACEOF
22078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022079if { (ac_try="$ac_compile"
22080case "(($ac_try" in
22081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22082 *) ac_try_echo=$ac_try;;
22083esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022087 grep -v '^ *+' conftest.er1 >conftest.err
22088 rm -f conftest.er1
22089 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022091 (exit $ac_status); } && {
22092 test -z "$ac_c_werror_flag" ||
22093 test ! -s conftest.err
22094 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022095 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022096else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022098sed 's/^/| /' conftest.$ac_ext >&5
22099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022100 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022102
22103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022104fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022105{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22106echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022107if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022108 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022109#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022110_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022111
22112fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022113
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022114{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22115echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022116if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022117 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022118else
22119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022120/* confdefs.h. */
22121_ACEOF
22122cat confdefs.h >>conftest.$ac_ext
22123cat >>conftest.$ac_ext <<_ACEOF
22124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022125
Martin v. Löwis11437992002-04-12 09:54:03 +000022126int
22127main ()
22128{
22129/* FIXME: Include the comments suggested by Paul. */
22130#ifndef __cplusplus
22131 /* Ultrix mips cc rejects this. */
22132 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022134 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022135 char const *const *pcpcc;
22136 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 /* NEC SVR4.0.2 mips cc rejects this. */
22138 struct point {int x, y;};
22139 static struct point const zero = {0,0};
22140 /* AIX XL C 1.02.0.0 rejects this.
22141 It does not let you subtract one const X* pointer from another in
22142 an arm of an if-expression whose if-part is not a constant
22143 expression */
22144 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022146 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022147 ++pcpcc;
22148 ppc = (char**) pcpcc;
22149 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022150 { /* SCO 3.2v4 cc rejects this. */
22151 char *t;
22152 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022153
Martin v. Löwis11437992002-04-12 09:54:03 +000022154 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022155 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022156 }
22157 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22158 int x[] = {25, 17};
22159 const int *foo = &x[0];
22160 ++foo;
22161 }
22162 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22163 typedef const int *iptr;
22164 iptr p = 0;
22165 ++p;
22166 }
22167 { /* AIX XL C 1.02.0.0 rejects this saying
22168 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22169 struct s { int j; const int *ap[3]; };
22170 struct s *b; b->j = 5;
22171 }
22172 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22173 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022174 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022175 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022176 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022177#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022178
Martin v. Löwis11437992002-04-12 09:54:03 +000022179 ;
22180 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022181}
Martin v. Löwis11437992002-04-12 09:54:03 +000022182_ACEOF
22183rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022184if { (ac_try="$ac_compile"
22185case "(($ac_try" in
22186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22187 *) ac_try_echo=$ac_try;;
22188esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022192 grep -v '^ *+' conftest.er1 >conftest.err
22193 rm -f conftest.er1
22194 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022196 (exit $ac_status); } && {
22197 test -z "$ac_c_werror_flag" ||
22198 test ! -s conftest.err
22199 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022200 ac_cv_c_const=yes
22201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022203sed 's/^/| /' conftest.$ac_ext >&5
22204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022205 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022207
22208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022209fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022210{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22211echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022212if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022213
22214cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022215#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022216_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022217
22218fi
22219
Michael W. Hudson54241132001-12-07 15:38:26 +000022220
Guido van Rossumda88dad1995-01-26 00:46:29 +000022221works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022222{ echo "$as_me:$LINENO: checking for working volatile" >&5
22223echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022225/* confdefs.h. */
22226_ACEOF
22227cat confdefs.h >>conftest.$ac_ext
22228cat >>conftest.$ac_ext <<_ACEOF
22229/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022230
Martin v. Löwis11437992002-04-12 09:54:03 +000022231int
22232main ()
22233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022234volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022235 ;
22236 return 0;
22237}
22238_ACEOF
22239rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022240if { (ac_try="$ac_compile"
22241case "(($ac_try" in
22242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22243 *) ac_try_echo=$ac_try;;
22244esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022246 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022248 grep -v '^ *+' conftest.er1 >conftest.err
22249 rm -f conftest.er1
22250 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022252 (exit $ac_status); } && {
22253 test -z "$ac_c_werror_flag" ||
22254 test ! -s conftest.err
22255 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022256 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022259sed 's/^/| /' conftest.$ac_ext >&5
22260
Martin v. Löwis11437992002-04-12 09:54:03 +000022261
22262cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022263#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022264_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022265
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022266
Guido van Rossum627b2d71993-12-24 10:39:16 +000022267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022268
22269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022270{ echo "$as_me:$LINENO: result: $works" >&5
22271echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022272
Guido van Rossumda88dad1995-01-26 00:46:29 +000022273works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022274{ echo "$as_me:$LINENO: checking for working signed char" >&5
22275echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022276cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022277/* confdefs.h. */
22278_ACEOF
22279cat confdefs.h >>conftest.$ac_ext
22280cat >>conftest.$ac_ext <<_ACEOF
22281/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022282
Martin v. Löwis11437992002-04-12 09:54:03 +000022283int
22284main ()
22285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022286signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022287 ;
22288 return 0;
22289}
22290_ACEOF
22291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022292if { (ac_try="$ac_compile"
22293case "(($ac_try" in
22294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22295 *) ac_try_echo=$ac_try;;
22296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022300 grep -v '^ *+' conftest.er1 >conftest.err
22301 rm -f conftest.er1
22302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022304 (exit $ac_status); } && {
22305 test -z "$ac_c_werror_flag" ||
22306 test ! -s conftest.err
22307 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022308 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022311sed 's/^/| /' conftest.$ac_ext >&5
22312
Martin v. Löwis11437992002-04-12 09:54:03 +000022313
22314cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022315#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022316_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022318
Guido van Rossum7f43da71994-08-01 12:15:30 +000022319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022320
22321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022322{ echo "$as_me:$LINENO: result: $works" >&5
22323echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022324
Guido van Rossumda88dad1995-01-26 00:46:29 +000022325have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022326{ echo "$as_me:$LINENO: checking for prototypes" >&5
22327echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022329/* confdefs.h. */
22330_ACEOF
22331cat confdefs.h >>conftest.$ac_ext
22332cat >>conftest.$ac_ext <<_ACEOF
22333/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022334int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022335int
22336main ()
22337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022338return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 ;
22340 return 0;
22341}
22342_ACEOF
22343rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022344if { (ac_try="$ac_compile"
22345case "(($ac_try" in
22346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22347 *) ac_try_echo=$ac_try;;
22348esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022352 grep -v '^ *+' conftest.er1 >conftest.err
22353 rm -f conftest.er1
22354 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022356 (exit $ac_status); } && {
22357 test -z "$ac_c_werror_flag" ||
22358 test ! -s conftest.err
22359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022360
22361
22362cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022363#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022364_ACEOF
22365
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022366 have_prototypes=yes
22367
Guido van Rossumf78abae1997-01-21 22:02:36 +000022368else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022370sed 's/^/| /' conftest.$ac_ext >&5
22371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022372
Guido van Rossum7f43da71994-08-01 12:15:30 +000022373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022374
22375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022376{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22377echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022378
Guido van Rossumda88dad1995-01-26 00:46:29 +000022379works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022380{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22381echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022382cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022383/* confdefs.h. */
22384_ACEOF
22385cat confdefs.h >>conftest.$ac_ext
22386cat >>conftest.$ac_ext <<_ACEOF
22387/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022388
22389#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022390int foo(int x, ...) {
22391 va_list va;
22392 va_start(va, x);
22393 va_arg(va, int);
22394 va_arg(va, char *);
22395 va_arg(va, double);
22396 return 0;
22397}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022398
Martin v. Löwis11437992002-04-12 09:54:03 +000022399int
22400main ()
22401{
Guido van Rossum90eea071996-08-30 20:58:57 +000022402return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022403 ;
22404 return 0;
22405}
22406_ACEOF
22407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022408if { (ac_try="$ac_compile"
22409case "(($ac_try" in
22410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22411 *) ac_try_echo=$ac_try;;
22412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022416 grep -v '^ *+' conftest.er1 >conftest.err
22417 rm -f conftest.er1
22418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420 (exit $ac_status); } && {
22421 test -z "$ac_c_werror_flag" ||
22422 test ! -s conftest.err
22423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022424
22425
22426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428_ACEOF
22429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022430 works=yes
22431
Guido van Rossumf78abae1997-01-21 22:02:36 +000022432else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022434sed 's/^/| /' conftest.$ac_ext >&5
22435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436
Guido van Rossum627b2d71993-12-24 10:39:16 +000022437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022438
22439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022440{ echo "$as_me:$LINENO: result: $works" >&5
22441echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022442
Martin v. Löwisd6320502004-08-12 13:45:08 +000022443# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022444{ echo "$as_me:$LINENO: checking for socketpair" >&5
22445echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022446cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022447/* confdefs.h. */
22448_ACEOF
22449cat confdefs.h >>conftest.$ac_ext
22450cat >>conftest.$ac_ext <<_ACEOF
22451/* end confdefs.h. */
22452
22453#include <sys/types.h>
22454#include <sys/socket.h>
22455
22456int
22457main ()
22458{
22459void *x=socketpair
22460 ;
22461 return 0;
22462}
22463_ACEOF
22464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022465if { (ac_try="$ac_compile"
22466case "(($ac_try" in
22467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468 *) ac_try_echo=$ac_try;;
22469esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022473 grep -v '^ *+' conftest.er1 >conftest.err
22474 rm -f conftest.er1
22475 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022477 (exit $ac_status); } && {
22478 test -z "$ac_c_werror_flag" ||
22479 test ! -s conftest.err
22480 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022481
22482cat >>confdefs.h <<\_ACEOF
22483#define HAVE_SOCKETPAIR 1
22484_ACEOF
22485
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022486 { echo "$as_me:$LINENO: result: yes" >&5
22487echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022489 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022490sed 's/^/| /' conftest.$ac_ext >&5
22491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022492 { echo "$as_me:$LINENO: result: no" >&5
22493echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022494
22495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022496
22497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022498
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022499# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022500{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22501echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022503/* confdefs.h. */
22504_ACEOF
22505cat confdefs.h >>conftest.$ac_ext
22506cat >>conftest.$ac_ext <<_ACEOF
22507/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022508#include <sys/types.h>
22509#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022510int
22511main ()
22512{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022513struct sockaddr x;
22514x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022515 ;
22516 return 0;
22517}
22518_ACEOF
22519rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022520if { (ac_try="$ac_compile"
22521case "(($ac_try" in
22522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22523 *) ac_try_echo=$ac_try;;
22524esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022526 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022528 grep -v '^ *+' conftest.er1 >conftest.err
22529 rm -f conftest.er1
22530 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022532 (exit $ac_status); } && {
22533 test -z "$ac_c_werror_flag" ||
22534 test ! -s conftest.err
22535 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022536 { echo "$as_me:$LINENO: result: yes" >&5
22537echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022538
22539cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022540#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022541_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022542
22543else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022545sed 's/^/| /' conftest.$ac_ext >&5
22546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022547 { echo "$as_me:$LINENO: result: no" >&5
22548echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022550
22551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022552
Guido van Rossumda88dad1995-01-26 00:46:29 +000022553va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022554{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22555echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022557/* confdefs.h. */
22558_ACEOF
22559cat confdefs.h >>conftest.$ac_ext
22560cat >>conftest.$ac_ext <<_ACEOF
22561/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022562
22563#ifdef HAVE_STDARG_PROTOTYPES
22564#include <stdarg.h>
22565#else
22566#include <varargs.h>
22567#endif
22568
Martin v. Löwis11437992002-04-12 09:54:03 +000022569int
22570main ()
22571{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022572va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022573 ;
22574 return 0;
22575}
22576_ACEOF
22577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022578if { (ac_try="$ac_compile"
22579case "(($ac_try" in
22580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22581 *) ac_try_echo=$ac_try;;
22582esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022586 grep -v '^ *+' conftest.er1 >conftest.err
22587 rm -f conftest.er1
22588 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022590 (exit $ac_status); } && {
22591 test -z "$ac_c_werror_flag" ||
22592 test ! -s conftest.err
22593 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022594 :
22595else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022597sed 's/^/| /' conftest.$ac_ext >&5
22598
Martin v. Löwis11437992002-04-12 09:54:03 +000022599
22600
22601cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022602#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022603_ACEOF
22604
Guido van Rossumda88dad1995-01-26 00:46:29 +000022605 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022608
22609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022610{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22611echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022613# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022614
22615
22616
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022617{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22618echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022619if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022620 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022621else
Martin v. Löwis11437992002-04-12 09:54:03 +000022622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022623/* confdefs.h. */
22624_ACEOF
22625cat confdefs.h >>conftest.$ac_ext
22626cat >>conftest.$ac_ext <<_ACEOF
22627/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022628/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22629 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22630#define gethostbyname_r innocuous_gethostbyname_r
22631
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022632/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022633 which can conflict with char gethostbyname_r (); below.
22634 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022635 <limits.h> exists even on freestanding compilers. */
22636
22637#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022638# include <limits.h>
22639#else
22640# include <assert.h>
22641#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022642
22643#undef gethostbyname_r
22644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022645/* Override any GCC internal prototype to avoid an error.
22646 Use char because int might match the return type of a GCC
22647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022648#ifdef __cplusplus
22649extern "C"
22650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022651char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022652/* The GNU C library defines this for functions which it implements
22653 to always fail with ENOSYS. Some functions are actually named
22654 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022655#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022656choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022657#endif
22658
Skip Montanaro6dead952003-09-25 14:50:04 +000022659int
22660main ()
22661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022662return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022663 ;
22664 return 0;
22665}
22666_ACEOF
22667rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022668if { (ac_try="$ac_link"
22669case "(($ac_try" in
22670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22671 *) ac_try_echo=$ac_try;;
22672esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022674 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022676 grep -v '^ *+' conftest.er1 >conftest.err
22677 rm -f conftest.er1
22678 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022680 (exit $ac_status); } && {
22681 test -z "$ac_c_werror_flag" ||
22682 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022683 } && test -s conftest$ac_exeext &&
22684 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022686else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022688sed 's/^/| /' conftest.$ac_ext >&5
22689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022690 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022692
22693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022694 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022695fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022696{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22697echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22698if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022699
Martin v. Löwis11437992002-04-12 09:54:03 +000022700 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022701#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022702_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022703
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022704 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22705echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022706 OLD_CFLAGS=$CFLAGS
22707 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022709/* confdefs.h. */
22710_ACEOF
22711cat confdefs.h >>conftest.$ac_ext
22712cat >>conftest.$ac_ext <<_ACEOF
22713/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022714
22715# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022716
Martin v. Löwis11437992002-04-12 09:54:03 +000022717int
22718main ()
22719{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022720
22721 char *name;
22722 struct hostent *he, *res;
22723 char buffer[2048];
22724 int buflen = 2048;
22725 int h_errnop;
22726
22727 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022728
22729 ;
22730 return 0;
22731}
22732_ACEOF
22733rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022734if { (ac_try="$ac_compile"
22735case "(($ac_try" in
22736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22737 *) ac_try_echo=$ac_try;;
22738esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022742 grep -v '^ *+' conftest.er1 >conftest.err
22743 rm -f conftest.er1
22744 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022746 (exit $ac_status); } && {
22747 test -z "$ac_c_werror_flag" ||
22748 test ! -s conftest.err
22749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022750
22751 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022752#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022753_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022754
Martin v. Löwis11437992002-04-12 09:54:03 +000022755
22756cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022757#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022758_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022759
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022760 { echo "$as_me:$LINENO: result: yes" >&5
22761echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022763else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022765sed 's/^/| /' conftest.$ac_ext >&5
22766
Martin v. Löwis11437992002-04-12 09:54:03 +000022767
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022768 { echo "$as_me:$LINENO: result: no" >&5
22769echo "${ECHO_T}no" >&6; }
22770 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22771echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022773/* confdefs.h. */
22774_ACEOF
22775cat confdefs.h >>conftest.$ac_ext
22776cat >>conftest.$ac_ext <<_ACEOF
22777/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022778
22779# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022780
Martin v. Löwis11437992002-04-12 09:54:03 +000022781int
22782main ()
22783{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022784
22785 char *name;
22786 struct hostent *he;
22787 char buffer[2048];
22788 int buflen = 2048;
22789 int h_errnop;
22790
22791 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
22793 ;
22794 return 0;
22795}
22796_ACEOF
22797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022798if { (ac_try="$ac_compile"
22799case "(($ac_try" in
22800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22801 *) ac_try_echo=$ac_try;;
22802esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022806 grep -v '^ *+' conftest.er1 >conftest.err
22807 rm -f conftest.er1
22808 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022810 (exit $ac_status); } && {
22811 test -z "$ac_c_werror_flag" ||
22812 test ! -s conftest.err
22813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022814
22815 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022816#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022817_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022818
Martin v. Löwis11437992002-04-12 09:54:03 +000022819
22820cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022821#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022822_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022823
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022824 { echo "$as_me:$LINENO: result: yes" >&5
22825echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022826
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022827else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022829sed 's/^/| /' conftest.$ac_ext >&5
22830
Martin v. Löwis11437992002-04-12 09:54:03 +000022831
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022832 { echo "$as_me:$LINENO: result: no" >&5
22833echo "${ECHO_T}no" >&6; }
22834 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22835echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022837/* confdefs.h. */
22838_ACEOF
22839cat confdefs.h >>conftest.$ac_ext
22840cat >>conftest.$ac_ext <<_ACEOF
22841/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022842
22843# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022844
Martin v. Löwis11437992002-04-12 09:54:03 +000022845int
22846main ()
22847{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022848
22849 char *name;
22850 struct hostent *he;
22851 struct hostent_data data;
22852
22853 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022854
22855 ;
22856 return 0;
22857}
22858_ACEOF
22859rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022860if { (ac_try="$ac_compile"
22861case "(($ac_try" in
22862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22863 *) ac_try_echo=$ac_try;;
22864esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022868 grep -v '^ *+' conftest.er1 >conftest.err
22869 rm -f conftest.er1
22870 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022872 (exit $ac_status); } && {
22873 test -z "$ac_c_werror_flag" ||
22874 test ! -s conftest.err
22875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
22877 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022878#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022879_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022880
Martin v. Löwis11437992002-04-12 09:54:03 +000022881
22882cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022883#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022884_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022886 { echo "$as_me:$LINENO: result: yes" >&5
22887echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022888
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022891sed 's/^/| /' conftest.$ac_ext >&5
22892
Martin v. Löwis11437992002-04-12 09:54:03 +000022893
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022894 { echo "$as_me:$LINENO: result: no" >&5
22895echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022896
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022898
22899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022900
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022902
22903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022904
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022906
22907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022908 CFLAGS=$OLD_CFLAGS
22909
22910else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022911
Martin v. Löwis11437992002-04-12 09:54:03 +000022912
22913for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022914do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22916{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022918if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022920else
Martin v. Löwis11437992002-04-12 09:54:03 +000022921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022922/* confdefs.h. */
22923_ACEOF
22924cat confdefs.h >>conftest.$ac_ext
22925cat >>conftest.$ac_ext <<_ACEOF
22926/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22929#define $ac_func innocuous_$ac_func
22930
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022931/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022932 which can conflict with char $ac_func (); below.
22933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022934 <limits.h> exists even on freestanding compilers. */
22935
22936#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022937# include <limits.h>
22938#else
22939# include <assert.h>
22940#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022941
22942#undef $ac_func
22943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022944/* Override any GCC internal prototype to avoid an error.
22945 Use char because int might match the return type of a GCC
22946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022947#ifdef __cplusplus
22948extern "C"
22949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022950char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022951/* The GNU C library defines this for functions which it implements
22952 to always fail with ENOSYS. Some functions are actually named
22953 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022955choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022956#endif
22957
Skip Montanaro6dead952003-09-25 14:50:04 +000022958int
22959main ()
22960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022961return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022962 ;
22963 return 0;
22964}
22965_ACEOF
22966rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022967if { (ac_try="$ac_link"
22968case "(($ac_try" in
22969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22970 *) ac_try_echo=$ac_try;;
22971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022973 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022975 grep -v '^ *+' conftest.er1 >conftest.err
22976 rm -f conftest.er1
22977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022979 (exit $ac_status); } && {
22980 test -z "$ac_c_werror_flag" ||
22981 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022982 } && test -s conftest$ac_exeext &&
22983 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022984 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022985else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022987sed 's/^/| /' conftest.$ac_ext >&5
22988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022989 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022991
22992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022993 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022994fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022995ac_res=`eval echo '${'$as_ac_var'}'`
22996 { echo "$as_me:$LINENO: result: $ac_res" >&5
22997echo "${ECHO_T}$ac_res" >&6; }
22998if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022999 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023000#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023001_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023002
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023003fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023004done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023005
Michael W. Hudson54241132001-12-07 15:38:26 +000023006
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023007fi
23008
Michael W. Hudson54241132001-12-07 15:38:26 +000023009
23010
23011
23012
23013
23014
Guido van Rossum627b2d71993-12-24 10:39:16 +000023015# checks for system services
23016# (none yet)
23017
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023018# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023019{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23020echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023021if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023022 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023023else
Martin v. Löwis11437992002-04-12 09:54:03 +000023024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023025/* confdefs.h. */
23026_ACEOF
23027cat confdefs.h >>conftest.$ac_ext
23028cat >>conftest.$ac_ext <<_ACEOF
23029/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023030/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23031 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23032#define __fpu_control innocuous___fpu_control
23033
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023034/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023035 which can conflict with char __fpu_control (); below.
23036 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023037 <limits.h> exists even on freestanding compilers. */
23038
23039#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023040# include <limits.h>
23041#else
23042# include <assert.h>
23043#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023044
23045#undef __fpu_control
23046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023047/* Override any GCC internal prototype to avoid an error.
23048 Use char because int might match the return type of a GCC
23049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023050#ifdef __cplusplus
23051extern "C"
23052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023053char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023054/* The GNU C library defines this for functions which it implements
23055 to always fail with ENOSYS. Some functions are actually named
23056 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023057#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023058choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023059#endif
23060
Skip Montanaro6dead952003-09-25 14:50:04 +000023061int
23062main ()
23063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023064return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023065 ;
23066 return 0;
23067}
23068_ACEOF
23069rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023070if { (ac_try="$ac_link"
23071case "(($ac_try" in
23072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23073 *) ac_try_echo=$ac_try;;
23074esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023076 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023078 grep -v '^ *+' conftest.er1 >conftest.err
23079 rm -f conftest.er1
23080 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023082 (exit $ac_status); } && {
23083 test -z "$ac_c_werror_flag" ||
23084 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023085 } && test -s conftest$ac_exeext &&
23086 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023087 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023088else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023090sed 's/^/| /' conftest.$ac_ext >&5
23091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023092 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023094
23095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023096 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023097fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023098{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23099echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23100if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023101 :
23102else
Martin v. Löwis11437992002-04-12 09:54:03 +000023103
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023104{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23105echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023106if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023108else
Martin v. Löwis11437992002-04-12 09:54:03 +000023109 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023110LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023112/* confdefs.h. */
23113_ACEOF
23114cat confdefs.h >>conftest.$ac_ext
23115cat >>conftest.$ac_ext <<_ACEOF
23116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023118/* Override any GCC internal prototype to avoid an error.
23119 Use char because int might match the return type of a GCC
23120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023121#ifdef __cplusplus
23122extern "C"
23123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023124char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023125int
23126main ()
23127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023128return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023129 ;
23130 return 0;
23131}
23132_ACEOF
23133rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023134if { (ac_try="$ac_link"
23135case "(($ac_try" in
23136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23137 *) ac_try_echo=$ac_try;;
23138esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023140 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023142 grep -v '^ *+' conftest.er1 >conftest.err
23143 rm -f conftest.er1
23144 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023146 (exit $ac_status); } && {
23147 test -z "$ac_c_werror_flag" ||
23148 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023149 } && test -s conftest$ac_exeext &&
23150 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023151 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023154sed 's/^/| /' conftest.$ac_ext >&5
23155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023156 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023158
23159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023160 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023161LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023162fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023163{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23164echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23165if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023166 cat >>confdefs.h <<_ACEOF
23167#define HAVE_LIBIEEE 1
23168_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023169
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023170 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023171
Guido van Rossum627b2d71993-12-24 10:39:16 +000023172fi
23173
Michael W. Hudson54241132001-12-07 15:38:26 +000023174
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023175fi
23176
Michael W. Hudson54241132001-12-07 15:38:26 +000023177
Guido van Rossum7f253911997-05-09 02:42:48 +000023178# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023179{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23180echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023183if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023184 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023185if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023186then
23187
23188cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023189#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023190_ACEOF
23191
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023192 { echo "$as_me:$LINENO: result: yes" >&5
23193echo "${ECHO_T}yes" >&6; }
23194else { echo "$as_me:$LINENO: result: no" >&5
23195echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023196fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023197else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023198 { echo "$as_me:$LINENO: result: no" >&5
23199echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023200fi
23201
Guido van Rossum7f253911997-05-09 02:42:48 +000023202
Guido van Rossum7f43da71994-08-01 12:15:30 +000023203# check for --with-libm=...
23204
Guido van Rossum563e7081996-09-10 18:20:48 +000023205case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023206Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023207*) LIBM=-lm
23208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023209{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23210echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023212# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023213if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023214 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023215if test "$withval" = no
23216then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023217 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23218echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023219elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023220then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023221 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23222echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23223else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23224echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023225 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023226fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023228 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23229echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023230fi
23231
Guido van Rossum7f43da71994-08-01 12:15:30 +000023232
23233# check for --with-libc=...
23234
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023235{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23236echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023238# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023239if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023240 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023241if test "$withval" = no
23242then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023243 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23244echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023245elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023246then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023247 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23248echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23249else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23250echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023251 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023252fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023253else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023254 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23255echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023256fi
23257
Guido van Rossum7f43da71994-08-01 12:15:30 +000023258
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023259# **************************************************
23260# * Check for various properties of floating point *
23261# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023262
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023263{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23264echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023265if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023266 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023267else
23268
23269if test "$cross_compiling" = yes; then
23270 ac_cv_little_endian_double=no
23271else
23272 cat >conftest.$ac_ext <<_ACEOF
23273/* confdefs.h. */
23274_ACEOF
23275cat confdefs.h >>conftest.$ac_ext
23276cat >>conftest.$ac_ext <<_ACEOF
23277/* end confdefs.h. */
23278
23279#include <string.h>
23280int main() {
23281 double x = 9006104071832581.0;
23282 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23283 return 0;
23284 else
23285 return 1;
23286}
23287
23288_ACEOF
23289rm -f conftest$ac_exeext
23290if { (ac_try="$ac_link"
23291case "(($ac_try" in
23292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23293 *) ac_try_echo=$ac_try;;
23294esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023296 (eval "$ac_link") 2>&5
23297 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023299 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23300 { (case "(($ac_try" in
23301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23302 *) ac_try_echo=$ac_try;;
23303esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023305 (eval "$ac_try") 2>&5
23306 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023308 (exit $ac_status); }; }; then
23309 ac_cv_little_endian_double=yes
23310else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023311 echo "$as_me: program exited with status $ac_status" >&5
23312echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023313sed 's/^/| /' conftest.$ac_ext >&5
23314
23315( exit $ac_status )
23316ac_cv_little_endian_double=no
23317fi
23318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23319fi
23320
23321
23322fi
23323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023324{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23325echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023326if test "$ac_cv_little_endian_double" = yes
23327then
23328
23329cat >>confdefs.h <<\_ACEOF
23330#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23331_ACEOF
23332
23333fi
23334
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023335{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23336echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023337if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023338 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023339else
23340
23341if test "$cross_compiling" = yes; then
23342 ac_cv_big_endian_double=no
23343else
23344 cat >conftest.$ac_ext <<_ACEOF
23345/* confdefs.h. */
23346_ACEOF
23347cat confdefs.h >>conftest.$ac_ext
23348cat >>conftest.$ac_ext <<_ACEOF
23349/* end confdefs.h. */
23350
23351#include <string.h>
23352int main() {
23353 double x = 9006104071832581.0;
23354 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23355 return 0;
23356 else
23357 return 1;
23358}
23359
23360_ACEOF
23361rm -f conftest$ac_exeext
23362if { (ac_try="$ac_link"
23363case "(($ac_try" in
23364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23365 *) ac_try_echo=$ac_try;;
23366esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023368 (eval "$ac_link") 2>&5
23369 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023371 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23372 { (case "(($ac_try" in
23373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23374 *) ac_try_echo=$ac_try;;
23375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023377 (eval "$ac_try") 2>&5
23378 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023380 (exit $ac_status); }; }; then
23381 ac_cv_big_endian_double=yes
23382else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023383 echo "$as_me: program exited with status $ac_status" >&5
23384echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023385sed 's/^/| /' conftest.$ac_ext >&5
23386
23387( exit $ac_status )
23388ac_cv_big_endian_double=no
23389fi
23390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23391fi
23392
23393
23394fi
23395
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023396{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23397echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023398if test "$ac_cv_big_endian_double" = yes
23399then
23400
23401cat >>confdefs.h <<\_ACEOF
23402#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23403_ACEOF
23404
23405fi
23406
23407# Some ARM platforms use a mixed-endian representation for doubles.
23408# While Python doesn't currently have full support for these platforms
23409# (see e.g., issue 1762561), we can at least make sure that float <-> string
23410# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023411{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23412echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023413if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023414 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023415else
23416
23417if test "$cross_compiling" = yes; then
23418 ac_cv_mixed_endian_double=no
23419else
23420 cat >conftest.$ac_ext <<_ACEOF
23421/* confdefs.h. */
23422_ACEOF
23423cat confdefs.h >>conftest.$ac_ext
23424cat >>conftest.$ac_ext <<_ACEOF
23425/* end confdefs.h. */
23426
23427#include <string.h>
23428int main() {
23429 double x = 9006104071832581.0;
23430 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23431 return 0;
23432 else
23433 return 1;
23434}
23435
23436_ACEOF
23437rm -f conftest$ac_exeext
23438if { (ac_try="$ac_link"
23439case "(($ac_try" in
23440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23441 *) ac_try_echo=$ac_try;;
23442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444 (eval "$ac_link") 2>&5
23445 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23448 { (case "(($ac_try" in
23449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23450 *) ac_try_echo=$ac_try;;
23451esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023453 (eval "$ac_try") 2>&5
23454 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023456 (exit $ac_status); }; }; then
23457 ac_cv_mixed_endian_double=yes
23458else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023459 echo "$as_me: program exited with status $ac_status" >&5
23460echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023461sed 's/^/| /' conftest.$ac_ext >&5
23462
23463( exit $ac_status )
23464ac_cv_mixed_endian_double=no
23465fi
23466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23467fi
23468
23469
23470fi
23471
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023472{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23473echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023474if test "$ac_cv_mixed_endian_double" = yes
23475then
23476
23477cat >>confdefs.h <<\_ACEOF
23478#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23479_ACEOF
23480
23481fi
23482
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023483# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023484# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023485# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023486# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023487# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023488# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023489
23490# This inline assembler syntax may also work for suncc and icc,
23491# so we try it on all platforms.
23492
23493{ 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 +000023494echo $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 +000023495cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023496/* confdefs.h. */
23497_ACEOF
23498cat confdefs.h >>conftest.$ac_ext
23499cat >>conftest.$ac_ext <<_ACEOF
23500/* end confdefs.h. */
23501
23502int
23503main ()
23504{
23505
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023506 unsigned short cw;
23507 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23508 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023509
23510 ;
23511 return 0;
23512}
23513_ACEOF
23514rm -f conftest.$ac_objext
23515if { (ac_try="$ac_compile"
23516case "(($ac_try" in
23517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23518 *) ac_try_echo=$ac_try;;
23519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023521 (eval "$ac_compile") 2>conftest.er1
23522 ac_status=$?
23523 grep -v '^ *+' conftest.er1 >conftest.err
23524 rm -f conftest.er1
23525 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023527 (exit $ac_status); } && {
23528 test -z "$ac_c_werror_flag" ||
23529 test ! -s conftest.err
23530 } && test -s conftest.$ac_objext; then
23531 have_gcc_asm_for_x87=yes
23532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023533 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023534sed 's/^/| /' conftest.$ac_ext >&5
23535
23536 have_gcc_asm_for_x87=no
23537fi
23538
23539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023540{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023541echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023542if test "$have_gcc_asm_for_x87" = yes
23543then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023544
23545cat >>confdefs.h <<\_ACEOF
23546#define HAVE_GCC_ASM_FOR_X87 1
23547_ACEOF
23548
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023549fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023550
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023551# Detect whether system arithmetic is subject to x87-style double
23552# rounding issues. The result of this test has little meaning on non
23553# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23554# mode is round-to-nearest and double rounding issues are present, and
23555# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023556{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23557echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023558# $BASECFLAGS may affect the result
23559ac_save_cc="$CC"
23560CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023561if test "$cross_compiling" = yes; then
23562 ac_cv_x87_double_rounding=no
23563else
23564 cat >conftest.$ac_ext <<_ACEOF
23565/* confdefs.h. */
23566_ACEOF
23567cat confdefs.h >>conftest.$ac_ext
23568cat >>conftest.$ac_ext <<_ACEOF
23569/* end confdefs.h. */
23570
23571#include <stdlib.h>
23572#include <math.h>
23573int main() {
23574 volatile double x, y, z;
23575 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23576 x = 0.99999999999999989; /* 1-2**-53 */
23577 y = 1./x;
23578 if (y != 1.)
23579 exit(0);
23580 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23581 x = 1e16;
23582 y = 2.99999;
23583 z = x + y;
23584 if (z != 1e16+4.)
23585 exit(0);
23586 /* both tests show evidence of double rounding */
23587 exit(1);
23588}
23589
23590_ACEOF
23591rm -f conftest$ac_exeext
23592if { (ac_try="$ac_link"
23593case "(($ac_try" in
23594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23595 *) ac_try_echo=$ac_try;;
23596esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023598 (eval "$ac_link") 2>&5
23599 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23602 { (case "(($ac_try" in
23603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23604 *) ac_try_echo=$ac_try;;
23605esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023607 (eval "$ac_try") 2>&5
23608 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023610 (exit $ac_status); }; }; then
23611 ac_cv_x87_double_rounding=no
23612else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023613 echo "$as_me: program exited with status $ac_status" >&5
23614echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023615sed 's/^/| /' conftest.$ac_ext >&5
23616
23617( exit $ac_status )
23618ac_cv_x87_double_rounding=yes
23619fi
23620rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23621fi
23622
23623
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023624CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023625{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23626echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023627if test "$ac_cv_x87_double_rounding" = yes
23628then
23629
23630cat >>confdefs.h <<\_ACEOF
23631#define X87_DOUBLE_ROUNDING 1
23632_ACEOF
23633
23634fi
23635
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023636# ************************************
23637# * Check for mathematical functions *
23638# ************************************
23639
23640LIBS_SAVE=$LIBS
23641LIBS="$LIBS $LIBM"
23642
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023643# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23644# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023645{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23646echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023647if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023648 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023649else
23650
23651if test "$cross_compiling" = yes; then
23652 ac_cv_tanh_preserves_zero_sign=no
23653else
23654 cat >conftest.$ac_ext <<_ACEOF
23655/* confdefs.h. */
23656_ACEOF
23657cat confdefs.h >>conftest.$ac_ext
23658cat >>conftest.$ac_ext <<_ACEOF
23659/* end confdefs.h. */
23660
23661#include <math.h>
23662#include <stdlib.h>
23663int main() {
23664 /* return 0 if either negative zeros don't exist
23665 on this platform or if negative zeros exist
23666 and tanh(-0.) == -0. */
23667 if (atan2(0., -1.) == atan2(-0., -1.) ||
23668 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23669 else exit(1);
23670}
23671
23672_ACEOF
23673rm -f conftest$ac_exeext
23674if { (ac_try="$ac_link"
23675case "(($ac_try" in
23676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23677 *) ac_try_echo=$ac_try;;
23678esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023680 (eval "$ac_link") 2>&5
23681 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23684 { (case "(($ac_try" in
23685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23686 *) ac_try_echo=$ac_try;;
23687esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023689 (eval "$ac_try") 2>&5
23690 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023692 (exit $ac_status); }; }; then
23693 ac_cv_tanh_preserves_zero_sign=yes
23694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023695 echo "$as_me: program exited with status $ac_status" >&5
23696echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023697sed 's/^/| /' conftest.$ac_ext >&5
23698
23699( exit $ac_status )
23700ac_cv_tanh_preserves_zero_sign=no
23701fi
23702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23703fi
23704
23705
23706fi
23707
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023708{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23709echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023710if test "$ac_cv_tanh_preserves_zero_sign" = yes
23711then
23712
23713cat >>confdefs.h <<\_ACEOF
23714#define TANH_PRESERVES_ZERO_SIGN 1
23715_ACEOF
23716
23717fi
23718
23719
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023720
Michael W. Hudson54241132001-12-07 15:38:26 +000023721
Christian Heimes99170a52007-12-19 02:07:34 +000023722
23723
23724
23725
23726
Mark Dickinsonf2537862009-04-18 13:58:18 +000023727
Mark Dickinson9c113362009-09-05 10:36:23 +000023728for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23729do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023730as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23731{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23732echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023733if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023734 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023735else
23736 cat >conftest.$ac_ext <<_ACEOF
23737/* confdefs.h. */
23738_ACEOF
23739cat confdefs.h >>conftest.$ac_ext
23740cat >>conftest.$ac_ext <<_ACEOF
23741/* end confdefs.h. */
23742/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23743 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23744#define $ac_func innocuous_$ac_func
23745
23746/* System header to define __stub macros and hopefully few prototypes,
23747 which can conflict with char $ac_func (); below.
23748 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23749 <limits.h> exists even on freestanding compilers. */
23750
23751#ifdef __STDC__
23752# include <limits.h>
23753#else
23754# include <assert.h>
23755#endif
23756
23757#undef $ac_func
23758
23759/* Override any GCC internal prototype to avoid an error.
23760 Use char because int might match the return type of a GCC
23761 builtin and then its argument prototype would still apply. */
23762#ifdef __cplusplus
23763extern "C"
23764#endif
23765char $ac_func ();
23766/* The GNU C library defines this for functions which it implements
23767 to always fail with ENOSYS. Some functions are actually named
23768 something starting with __ and the normal name is an alias. */
23769#if defined __stub_$ac_func || defined __stub___$ac_func
23770choke me
23771#endif
23772
23773int
23774main ()
23775{
23776return $ac_func ();
23777 ;
23778 return 0;
23779}
23780_ACEOF
23781rm -f conftest.$ac_objext conftest$ac_exeext
23782if { (ac_try="$ac_link"
23783case "(($ac_try" in
23784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23785 *) ac_try_echo=$ac_try;;
23786esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023788 (eval "$ac_link") 2>conftest.er1
23789 ac_status=$?
23790 grep -v '^ *+' conftest.er1 >conftest.err
23791 rm -f conftest.er1
23792 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023794 (exit $ac_status); } && {
23795 test -z "$ac_c_werror_flag" ||
23796 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023797 } && test -s conftest$ac_exeext &&
23798 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023799 eval "$as_ac_var=yes"
23800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023801 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023802sed 's/^/| /' conftest.$ac_ext >&5
23803
23804 eval "$as_ac_var=no"
23805fi
23806
23807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23808 conftest$ac_exeext conftest.$ac_ext
23809fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023810ac_res=`eval echo '${'$as_ac_var'}'`
23811 { echo "$as_me:$LINENO: result: $ac_res" >&5
23812echo "${ECHO_T}$ac_res" >&6; }
23813if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023814 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023815#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023816_ACEOF
23817
23818fi
23819done
23820
23821
23822
23823
23824
23825
23826for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023827do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023828as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23829{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23830echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023831if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023832 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023833else
23834 cat >conftest.$ac_ext <<_ACEOF
23835/* confdefs.h. */
23836_ACEOF
23837cat confdefs.h >>conftest.$ac_ext
23838cat >>conftest.$ac_ext <<_ACEOF
23839/* end confdefs.h. */
23840/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23841 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23842#define $ac_func innocuous_$ac_func
23843
23844/* System header to define __stub macros and hopefully few prototypes,
23845 which can conflict with char $ac_func (); below.
23846 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23847 <limits.h> exists even on freestanding compilers. */
23848
23849#ifdef __STDC__
23850# include <limits.h>
23851#else
23852# include <assert.h>
23853#endif
23854
23855#undef $ac_func
23856
23857/* Override any GCC internal prototype to avoid an error.
23858 Use char because int might match the return type of a GCC
23859 builtin and then its argument prototype would still apply. */
23860#ifdef __cplusplus
23861extern "C"
23862#endif
23863char $ac_func ();
23864/* The GNU C library defines this for functions which it implements
23865 to always fail with ENOSYS. Some functions are actually named
23866 something starting with __ and the normal name is an alias. */
23867#if defined __stub_$ac_func || defined __stub___$ac_func
23868choke me
23869#endif
23870
23871int
23872main ()
23873{
23874return $ac_func ();
23875 ;
23876 return 0;
23877}
23878_ACEOF
23879rm -f conftest.$ac_objext conftest$ac_exeext
23880if { (ac_try="$ac_link"
23881case "(($ac_try" in
23882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23883 *) ac_try_echo=$ac_try;;
23884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023886 (eval "$ac_link") 2>conftest.er1
23887 ac_status=$?
23888 grep -v '^ *+' conftest.er1 >conftest.err
23889 rm -f conftest.er1
23890 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023892 (exit $ac_status); } && {
23893 test -z "$ac_c_werror_flag" ||
23894 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023895 } && test -s conftest$ac_exeext &&
23896 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023897 eval "$as_ac_var=yes"
23898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023899 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023900sed 's/^/| /' conftest.$ac_ext >&5
23901
23902 eval "$as_ac_var=no"
23903fi
23904
23905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23906 conftest$ac_exeext conftest.$ac_ext
23907fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023908ac_res=`eval echo '${'$as_ac_var'}'`
23909 { echo "$as_me:$LINENO: result: $ac_res" >&5
23910echo "${ECHO_T}$ac_res" >&6; }
23911if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023912 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023914_ACEOF
23915
23916fi
23917done
23918
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023919{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23920echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023921if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023922 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023923else
23924 cat >conftest.$ac_ext <<_ACEOF
23925/* confdefs.h. */
23926_ACEOF
23927cat confdefs.h >>conftest.$ac_ext
23928cat >>conftest.$ac_ext <<_ACEOF
23929/* end confdefs.h. */
23930#include <math.h>
23931
23932int
23933main ()
23934{
23935#ifndef isinf
23936 (void) isinf;
23937#endif
23938
23939 ;
23940 return 0;
23941}
23942_ACEOF
23943rm -f conftest.$ac_objext
23944if { (ac_try="$ac_compile"
23945case "(($ac_try" in
23946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23947 *) ac_try_echo=$ac_try;;
23948esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023950 (eval "$ac_compile") 2>conftest.er1
23951 ac_status=$?
23952 grep -v '^ *+' conftest.er1 >conftest.err
23953 rm -f conftest.er1
23954 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023956 (exit $ac_status); } && {
23957 test -z "$ac_c_werror_flag" ||
23958 test ! -s conftest.err
23959 } && test -s conftest.$ac_objext; then
23960 ac_cv_have_decl_isinf=yes
23961else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023962 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023963sed 's/^/| /' conftest.$ac_ext >&5
23964
23965 ac_cv_have_decl_isinf=no
23966fi
23967
23968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23969fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023970{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23971echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23972if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023973
23974cat >>confdefs.h <<_ACEOF
23975#define HAVE_DECL_ISINF 1
23976_ACEOF
23977
23978
23979else
23980 cat >>confdefs.h <<_ACEOF
23981#define HAVE_DECL_ISINF 0
23982_ACEOF
23983
23984
23985fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023986{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23987echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023988if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023989 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023990else
23991 cat >conftest.$ac_ext <<_ACEOF
23992/* confdefs.h. */
23993_ACEOF
23994cat confdefs.h >>conftest.$ac_ext
23995cat >>conftest.$ac_ext <<_ACEOF
23996/* end confdefs.h. */
23997#include <math.h>
23998
23999int
24000main ()
24001{
24002#ifndef isnan
24003 (void) isnan;
24004#endif
24005
24006 ;
24007 return 0;
24008}
24009_ACEOF
24010rm -f conftest.$ac_objext
24011if { (ac_try="$ac_compile"
24012case "(($ac_try" in
24013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24014 *) ac_try_echo=$ac_try;;
24015esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024017 (eval "$ac_compile") 2>conftest.er1
24018 ac_status=$?
24019 grep -v '^ *+' conftest.er1 >conftest.err
24020 rm -f conftest.er1
24021 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024023 (exit $ac_status); } && {
24024 test -z "$ac_c_werror_flag" ||
24025 test ! -s conftest.err
24026 } && test -s conftest.$ac_objext; then
24027 ac_cv_have_decl_isnan=yes
24028else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024029 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024030sed 's/^/| /' conftest.$ac_ext >&5
24031
24032 ac_cv_have_decl_isnan=no
24033fi
24034
24035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24036fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024037{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24038echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24039if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024040
24041cat >>confdefs.h <<_ACEOF
24042#define HAVE_DECL_ISNAN 1
24043_ACEOF
24044
24045
24046else
24047 cat >>confdefs.h <<_ACEOF
24048#define HAVE_DECL_ISNAN 0
24049_ACEOF
24050
24051
24052fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024053{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24054echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024055if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024056 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024057else
24058 cat >conftest.$ac_ext <<_ACEOF
24059/* confdefs.h. */
24060_ACEOF
24061cat confdefs.h >>conftest.$ac_ext
24062cat >>conftest.$ac_ext <<_ACEOF
24063/* end confdefs.h. */
24064#include <math.h>
24065
24066int
24067main ()
24068{
24069#ifndef isfinite
24070 (void) isfinite;
24071#endif
24072
24073 ;
24074 return 0;
24075}
24076_ACEOF
24077rm -f conftest.$ac_objext
24078if { (ac_try="$ac_compile"
24079case "(($ac_try" in
24080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24081 *) ac_try_echo=$ac_try;;
24082esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024084 (eval "$ac_compile") 2>conftest.er1
24085 ac_status=$?
24086 grep -v '^ *+' conftest.er1 >conftest.err
24087 rm -f conftest.er1
24088 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024090 (exit $ac_status); } && {
24091 test -z "$ac_c_werror_flag" ||
24092 test ! -s conftest.err
24093 } && test -s conftest.$ac_objext; then
24094 ac_cv_have_decl_isfinite=yes
24095else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024096 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024097sed 's/^/| /' conftest.$ac_ext >&5
24098
24099 ac_cv_have_decl_isfinite=no
24100fi
24101
24102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24103fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024104{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24105echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24106if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024107
24108cat >>confdefs.h <<_ACEOF
24109#define HAVE_DECL_ISFINITE 1
24110_ACEOF
24111
24112
24113else
24114 cat >>confdefs.h <<_ACEOF
24115#define HAVE_DECL_ISFINITE 0
24116_ACEOF
24117
24118
24119fi
24120
24121
Christian Heimes99170a52007-12-19 02:07:34 +000024122
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024123LIBS=$LIBS_SAVE
24124
Mark Dickinsona614f042009-11-28 12:48:43 +000024125# For multiprocessing module, check that sem_open
24126# actually works. For FreeBSD versions <= 7.2,
24127# the kernel module that provides POSIX semaphores
24128# isn't loaded by default, so an attempt to call
24129# sem_open results in a 'Signal 12' error.
24130{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24131echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24132if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24133 echo $ECHO_N "(cached) $ECHO_C" >&6
24134else
24135 if test "$cross_compiling" = yes; then
24136 ac_cv_posix_semaphores_enabled=yes
24137else
24138 cat >conftest.$ac_ext <<_ACEOF
24139/* confdefs.h. */
24140_ACEOF
24141cat confdefs.h >>conftest.$ac_ext
24142cat >>conftest.$ac_ext <<_ACEOF
24143/* end confdefs.h. */
24144
24145#include <unistd.h>
24146#include <fcntl.h>
24147#include <stdio.h>
24148#include <semaphore.h>
24149#include <sys/stat.h>
24150
24151int main(void) {
24152 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24153 if (a == SEM_FAILED) {
24154 perror("sem_open");
24155 return 1;
24156 }
24157 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024158 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000024159 return 0;
24160}
24161
24162_ACEOF
24163rm -f conftest$ac_exeext
24164if { (ac_try="$ac_link"
24165case "(($ac_try" in
24166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24167 *) ac_try_echo=$ac_try;;
24168esac
24169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24170 (eval "$ac_link") 2>&5
24171 ac_status=$?
24172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24174 { (case "(($ac_try" in
24175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24176 *) ac_try_echo=$ac_try;;
24177esac
24178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24179 (eval "$ac_try") 2>&5
24180 ac_status=$?
24181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24182 (exit $ac_status); }; }; then
24183 ac_cv_posix_semaphores_enabled=yes
24184else
24185 echo "$as_me: program exited with status $ac_status" >&5
24186echo "$as_me: failed program was:" >&5
24187sed 's/^/| /' conftest.$ac_ext >&5
24188
24189( exit $ac_status )
24190ac_cv_posix_semaphores_enabled=no
24191fi
24192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24193fi
24194
24195
24196
24197fi
24198
24199{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24200echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24201if test $ac_cv_posix_semaphores_enabled = no
24202then
24203
24204cat >>confdefs.h <<\_ACEOF
24205#define POSIX_SEMAPHORES_NOT_ENABLED 1
24206_ACEOF
24207
24208fi
24209
Mark Dickinson10683072009-04-18 21:18:19 +000024210# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024211{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24212echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024213if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024214 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024215else
24216 if test "$cross_compiling" = yes; then
24217 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024218else
24219 cat >conftest.$ac_ext <<_ACEOF
24220/* confdefs.h. */
24221_ACEOF
24222cat confdefs.h >>conftest.$ac_ext
24223cat >>conftest.$ac_ext <<_ACEOF
24224/* end confdefs.h. */
24225
24226#include <unistd.h>
24227#include <fcntl.h>
24228#include <stdio.h>
24229#include <semaphore.h>
24230#include <sys/stat.h>
24231
24232int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000024233 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000024234 int count;
24235 int res;
24236 if(a==SEM_FAILED){
24237 perror("sem_open");
24238 return 1;
24239
24240 }
24241 res = sem_getvalue(a, &count);
24242 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000024243 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000024244 return res==-1 ? 1 : 0;
24245}
24246
Mark Dickinson10683072009-04-18 21:18:19 +000024247_ACEOF
24248rm -f conftest$ac_exeext
24249if { (ac_try="$ac_link"
24250case "(($ac_try" in
24251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24252 *) ac_try_echo=$ac_try;;
24253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024255 (eval "$ac_link") 2>&5
24256 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24259 { (case "(($ac_try" in
24260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24261 *) ac_try_echo=$ac_try;;
24262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024264 (eval "$ac_try") 2>&5
24265 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024267 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024268 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024269else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024270 echo "$as_me: program exited with status $ac_status" >&5
24271echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024272sed 's/^/| /' conftest.$ac_ext >&5
24273
24274( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024275ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024276fi
24277rm -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 +000024278fi
24279
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024280
24281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024282fi
24283
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024284{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24285echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024286if test $ac_cv_broken_sem_getvalue = yes
24287then
24288
24289cat >>confdefs.h <<\_ACEOF
24290#define HAVE_BROKEN_SEM_GETVALUE 1
24291_ACEOF
24292
24293fi
24294
Mark Dickinsonbd792642009-03-18 20:06:12 +000024295# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024296{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24297echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024298# Check whether --enable-big-digits was given.
24299if test "${enable_big_digits+set}" = set; then
24300 enableval=$enable_big_digits; case $enable_big_digits in
24301yes)
24302 enable_big_digits=30 ;;
24303no)
24304 enable_big_digits=15 ;;
2430515|30)
24306 ;;
24307*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024308 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24309echo "$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 +000024310 { (exit 1); exit 1; }; } ;;
24311esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024312{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24313echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024314
24315cat >>confdefs.h <<_ACEOF
24316#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24317_ACEOF
24318
24319
24320else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024321 { echo "$as_me:$LINENO: result: no value specified" >&5
24322echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024323fi
24324
24325
Guido van Rossumef2255b2000-03-10 22:30:29 +000024326# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024327if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24329echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024330if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024331 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024332fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024333{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24334echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024335else
Martin v. Löwis11437992002-04-12 09:54:03 +000024336 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024337{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24338echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024339cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024340/* confdefs.h. */
24341_ACEOF
24342cat confdefs.h >>conftest.$ac_ext
24343cat >>conftest.$ac_ext <<_ACEOF
24344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024345$ac_includes_default
24346#include <wchar.h>
24347_ACEOF
24348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024349if { (ac_try="$ac_compile"
24350case "(($ac_try" in
24351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24352 *) ac_try_echo=$ac_try;;
24353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024357 grep -v '^ *+' conftest.er1 >conftest.err
24358 rm -f conftest.er1
24359 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024361 (exit $ac_status); } && {
24362 test -z "$ac_c_werror_flag" ||
24363 test ! -s conftest.err
24364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024365 ac_header_compiler=yes
24366else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024368sed 's/^/| /' conftest.$ac_ext >&5
24369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024370 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372
24373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024374{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24375echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024376
24377# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024378{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24379echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024381/* confdefs.h. */
24382_ACEOF
24383cat confdefs.h >>conftest.$ac_ext
24384cat >>conftest.$ac_ext <<_ACEOF
24385/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024386#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024388if { (ac_try="$ac_cpp conftest.$ac_ext"
24389case "(($ac_try" in
24390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24391 *) ac_try_echo=$ac_try;;
24392esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024394 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024395 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024396 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024397 rm -f conftest.er1
24398 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024400 (exit $ac_status); } >/dev/null && {
24401 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24402 test ! -s conftest.err
24403 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 ac_header_preproc=yes
24405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024407sed 's/^/| /' conftest.$ac_ext >&5
24408
Martin v. Löwis11437992002-04-12 09:54:03 +000024409 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024411
Martin v. Löwis11437992002-04-12 09:54:03 +000024412rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024413{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24414echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024415
24416# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024417case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24418 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024419 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24420echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24421 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24422echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024423 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024424 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024425 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024426 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24427echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24428 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24429echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24430 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24431echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24432 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24433echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24434 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24435echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24436 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24437echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024438 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024439## -------------------------------------- ##
24440## Report this to http://bugs.python.org/ ##
24441## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024442_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024443 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024444 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024446{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24447echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024448if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024449 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024450else
24451 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024453{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24454echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024455
24456fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024457if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024458
24459
24460cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024461#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024462_ACEOF
24463
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024464 wchar_h="yes"
24465
Guido van Rossumef2255b2000-03-10 22:30:29 +000024466else
Martin v. Löwis11437992002-04-12 09:54:03 +000024467 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024468
24469fi
24470
Michael W. Hudson54241132001-12-07 15:38:26 +000024471
Martin v. Löwis11437992002-04-12 09:54:03 +000024472
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024473# determine wchar_t size
24474if test "$wchar_h" = yes
24475then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024476 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24477echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24478if test "${ac_cv_type_wchar_t+set}" = set; then
24479 echo $ECHO_N "(cached) $ECHO_C" >&6
24480else
24481 cat >conftest.$ac_ext <<_ACEOF
24482/* confdefs.h. */
24483_ACEOF
24484cat confdefs.h >>conftest.$ac_ext
24485cat >>conftest.$ac_ext <<_ACEOF
24486/* end confdefs.h. */
24487#include <wchar.h>
24488
24489typedef wchar_t ac__type_new_;
24490int
24491main ()
24492{
24493if ((ac__type_new_ *) 0)
24494 return 0;
24495if (sizeof (ac__type_new_))
24496 return 0;
24497 ;
24498 return 0;
24499}
24500_ACEOF
24501rm -f conftest.$ac_objext
24502if { (ac_try="$ac_compile"
24503case "(($ac_try" in
24504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24505 *) ac_try_echo=$ac_try;;
24506esac
24507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24508 (eval "$ac_compile") 2>conftest.er1
24509 ac_status=$?
24510 grep -v '^ *+' conftest.er1 >conftest.err
24511 rm -f conftest.er1
24512 cat conftest.err >&5
24513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24514 (exit $ac_status); } && {
24515 test -z "$ac_c_werror_flag" ||
24516 test ! -s conftest.err
24517 } && test -s conftest.$ac_objext; then
24518 ac_cv_type_wchar_t=yes
24519else
24520 echo "$as_me: failed program was:" >&5
24521sed 's/^/| /' conftest.$ac_ext >&5
24522
24523 ac_cv_type_wchar_t=no
24524fi
24525
24526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24527fi
24528{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24529echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24530
24531# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24534# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024535{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24536echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024537if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024538 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024539else
Martin v. Löwis11437992002-04-12 09:54:03 +000024540 if test "$cross_compiling" = yes; then
24541 # Depending upon the size, compute the lo and hi bounds.
24542cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024543/* confdefs.h. */
24544_ACEOF
24545cat confdefs.h >>conftest.$ac_ext
24546cat >>conftest.$ac_ext <<_ACEOF
24547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024548#include <wchar.h>
24549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024550 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024551int
24552main ()
24553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024555test_array [0] = 0
24556
24557 ;
24558 return 0;
24559}
24560_ACEOF
24561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024562if { (ac_try="$ac_compile"
24563case "(($ac_try" in
24564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24565 *) ac_try_echo=$ac_try;;
24566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024570 grep -v '^ *+' conftest.er1 >conftest.err
24571 rm -f conftest.er1
24572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024574 (exit $ac_status); } && {
24575 test -z "$ac_c_werror_flag" ||
24576 test ! -s conftest.err
24577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024578 ac_lo=0 ac_mid=0
24579 while :; do
24580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024581/* confdefs.h. */
24582_ACEOF
24583cat confdefs.h >>conftest.$ac_ext
24584cat >>conftest.$ac_ext <<_ACEOF
24585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024586#include <wchar.h>
24587
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024588 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024589int
24590main ()
24591{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024592static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024593test_array [0] = 0
24594
24595 ;
24596 return 0;
24597}
24598_ACEOF
24599rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024600if { (ac_try="$ac_compile"
24601case "(($ac_try" in
24602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24603 *) ac_try_echo=$ac_try;;
24604esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024608 grep -v '^ *+' conftest.er1 >conftest.err
24609 rm -f conftest.er1
24610 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024612 (exit $ac_status); } && {
24613 test -z "$ac_c_werror_flag" ||
24614 test ! -s conftest.err
24615 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024616 ac_hi=$ac_mid; break
24617else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024619sed 's/^/| /' conftest.$ac_ext >&5
24620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621 ac_lo=`expr $ac_mid + 1`
24622 if test $ac_lo -le $ac_mid; then
24623 ac_lo= ac_hi=
24624 break
24625 fi
24626 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628
24629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024630 done
24631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024633sed 's/^/| /' conftest.$ac_ext >&5
24634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024636/* confdefs.h. */
24637_ACEOF
24638cat confdefs.h >>conftest.$ac_ext
24639cat >>conftest.$ac_ext <<_ACEOF
24640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024641#include <wchar.h>
24642
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024643 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024644int
24645main ()
24646{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024647static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024648test_array [0] = 0
24649
24650 ;
24651 return 0;
24652}
24653_ACEOF
24654rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024655if { (ac_try="$ac_compile"
24656case "(($ac_try" in
24657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24658 *) ac_try_echo=$ac_try;;
24659esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024663 grep -v '^ *+' conftest.er1 >conftest.err
24664 rm -f conftest.er1
24665 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667 (exit $ac_status); } && {
24668 test -z "$ac_c_werror_flag" ||
24669 test ! -s conftest.err
24670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024671 ac_hi=-1 ac_mid=-1
24672 while :; do
24673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024674/* confdefs.h. */
24675_ACEOF
24676cat confdefs.h >>conftest.$ac_ext
24677cat >>conftest.$ac_ext <<_ACEOF
24678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024679#include <wchar.h>
24680
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024681 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024682int
24683main ()
24684{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024685static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024686test_array [0] = 0
24687
24688 ;
24689 return 0;
24690}
24691_ACEOF
24692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024693if { (ac_try="$ac_compile"
24694case "(($ac_try" in
24695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24696 *) ac_try_echo=$ac_try;;
24697esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024701 grep -v '^ *+' conftest.er1 >conftest.err
24702 rm -f conftest.er1
24703 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024705 (exit $ac_status); } && {
24706 test -z "$ac_c_werror_flag" ||
24707 test ! -s conftest.err
24708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024709 ac_lo=$ac_mid; break
24710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024712sed 's/^/| /' conftest.$ac_ext >&5
24713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024714 ac_hi=`expr '(' $ac_mid ')' - 1`
24715 if test $ac_mid -le $ac_hi; then
24716 ac_lo= ac_hi=
24717 break
24718 fi
24719 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024721
24722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024723 done
24724else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024726sed 's/^/| /' conftest.$ac_ext >&5
24727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024728 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024730
24731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024733
24734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024735# Binary search between lo and hi bounds.
24736while test "x$ac_lo" != "x$ac_hi"; do
24737 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024739/* confdefs.h. */
24740_ACEOF
24741cat confdefs.h >>conftest.$ac_ext
24742cat >>conftest.$ac_ext <<_ACEOF
24743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024744#include <wchar.h>
24745
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024746 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024747int
24748main ()
24749{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024751test_array [0] = 0
24752
24753 ;
24754 return 0;
24755}
24756_ACEOF
24757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024758if { (ac_try="$ac_compile"
24759case "(($ac_try" in
24760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24761 *) ac_try_echo=$ac_try;;
24762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024766 grep -v '^ *+' conftest.er1 >conftest.err
24767 rm -f conftest.er1
24768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024770 (exit $ac_status); } && {
24771 test -z "$ac_c_werror_flag" ||
24772 test ! -s conftest.err
24773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024774 ac_hi=$ac_mid
24775else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024777sed 's/^/| /' conftest.$ac_ext >&5
24778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024779 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781
24782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024783done
24784case $ac_lo in
24785?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024786'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024787 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024788See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024789echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024790See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024791 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024792 else
24793 ac_cv_sizeof_wchar_t=0
24794 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024795esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024796else
Martin v. Löwis11437992002-04-12 09:54:03 +000024797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024798/* confdefs.h. */
24799_ACEOF
24800cat confdefs.h >>conftest.$ac_ext
24801cat >>conftest.$ac_ext <<_ACEOF
24802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024803#include <wchar.h>
24804
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024805 typedef wchar_t ac__type_sizeof_;
24806static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24807static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024808#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024809#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024810int
24811main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024812{
Martin v. Löwis11437992002-04-12 09:54:03 +000024813
24814 FILE *f = fopen ("conftest.val", "w");
24815 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024816 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024817 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024823 }
24824 else
24825 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024826 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024827 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024828 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024829 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024830 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024831 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024832
24833 ;
24834 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024835}
Martin v. Löwis11437992002-04-12 09:54:03 +000024836_ACEOF
24837rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024838if { (ac_try="$ac_link"
24839case "(($ac_try" in
24840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24841 *) ac_try_echo=$ac_try;;
24842esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024845 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024848 { (case "(($ac_try" in
24849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24850 *) ac_try_echo=$ac_try;;
24851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024853 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024856 (exit $ac_status); }; }; then
24857 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024858else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024859 echo "$as_me: program exited with status $ac_status" >&5
24860echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024861sed 's/^/| /' conftest.$ac_ext >&5
24862
Martin v. Löwis11437992002-04-12 09:54:03 +000024863( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024865 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024866See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024867echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024868See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024869 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024870 else
24871 ac_cv_sizeof_wchar_t=0
24872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024874rm -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 +000024875fi
24876rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024877fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024878{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24879echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024880
24881
24882
Martin v. Löwis11437992002-04-12 09:54:03 +000024883cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024884#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024885_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024886
Michael W. Hudson54241132001-12-07 15:38:26 +000024887
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024888fi
24889
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024890{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24891echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024892have_ucs4_tcl=no
24893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024894/* confdefs.h. */
24895_ACEOF
24896cat confdefs.h >>conftest.$ac_ext
24897cat >>conftest.$ac_ext <<_ACEOF
24898/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024899
24900#include <tcl.h>
24901#if TCL_UTF_MAX != 6
24902# error "NOT UCS4_TCL"
24903#endif
24904int
24905main ()
24906{
24907
24908 ;
24909 return 0;
24910}
24911_ACEOF
24912rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024913if { (ac_try="$ac_compile"
24914case "(($ac_try" in
24915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24916 *) ac_try_echo=$ac_try;;
24917esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024921 grep -v '^ *+' conftest.er1 >conftest.err
24922 rm -f conftest.er1
24923 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024925 (exit $ac_status); } && {
24926 test -z "$ac_c_werror_flag" ||
24927 test ! -s conftest.err
24928 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024929
24930
24931cat >>confdefs.h <<\_ACEOF
24932#define HAVE_UCS4_TCL 1
24933_ACEOF
24934
24935 have_ucs4_tcl=yes
24936
24937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024939sed 's/^/| /' conftest.$ac_ext >&5
24940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024943
24944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024945{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24946echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024947
Skip Montanaro6dead952003-09-25 14:50:04 +000024948# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024949if test "$wchar_h" = yes
24950then
24951 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024952 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24953echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024954 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024955 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024956else
24957
24958 if test "$cross_compiling" = yes; then
24959 ac_cv_wchar_t_signed=yes
24960else
24961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024962/* confdefs.h. */
24963_ACEOF
24964cat confdefs.h >>conftest.$ac_ext
24965cat >>conftest.$ac_ext <<_ACEOF
24966/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024967
24968 #include <wchar.h>
24969 int main()
24970 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024971 /* Success: exit code 0 */
24972 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024973 }
24974
24975_ACEOF
24976rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024977if { (ac_try="$ac_link"
24978case "(($ac_try" in
24979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24980 *) ac_try_echo=$ac_try;;
24981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024983 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024984 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024987 { (case "(($ac_try" in
24988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24989 *) ac_try_echo=$ac_try;;
24990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024992 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024993 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024995 (exit $ac_status); }; }; then
24996 ac_cv_wchar_t_signed=yes
24997else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024998 echo "$as_me: program exited with status $ac_status" >&5
24999echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025000sed 's/^/| /' conftest.$ac_ext >&5
25001
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025002( exit $ac_status )
25003ac_cv_wchar_t_signed=no
25004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005rm -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 +000025006fi
25007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025008
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025009fi
25010
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025011 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25012echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025013fi
25014
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025015{ echo "$as_me:$LINENO: checking what type to use for str" >&5
25016echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000025017
25018# Check whether --with-wide-unicode was given.
25019if test "${with_wide_unicode+set}" = set; then
25020 withval=$with_wide_unicode;
25021if test "$withval" != no
25022then unicode_size="4"
25023else unicode_size="2"
25024fi
25025
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025026else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025027
Georg Brandl52d168a2008-01-07 18:10:24 +000025028case "$have_ucs4_tcl" in
25029 yes) unicode_size="4" ;;
25030 *) unicode_size="2" ;;
25031esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025032
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025033fi
25034
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025035
25036
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025037
Georg Brandl52d168a2008-01-07 18:10:24 +000025038case "$unicode_size" in
25039 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025040#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025041_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000025042 ;;
25043 *) cat >>confdefs.h <<\_ACEOF
25044#define Py_UNICODE_SIZE 2
25045_ACEOF
25046 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025047esac
25048
Michael W. Hudson54241132001-12-07 15:38:26 +000025049
Martin v. Löwis11437992002-04-12 09:54:03 +000025050
25051
Georg Brandl52d168a2008-01-07 18:10:24 +000025052# wchar_t is only usable if it maps to an unsigned type
25053if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025054 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000025055then
25056 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025057
Martin v. Löwis11437992002-04-12 09:54:03 +000025058cat >>confdefs.h <<\_ACEOF
25059#define HAVE_USABLE_WCHAR_T 1
25060_ACEOF
25061
Georg Brandl52d168a2008-01-07 18:10:24 +000025062 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025063#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025064_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025065
Georg Brandl52d168a2008-01-07 18:10:24 +000025066elif test "$ac_cv_sizeof_short" = "$unicode_size"
25067then
25068 PY_UNICODE_TYPE="unsigned short"
25069 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025070#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025071_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025072
Georg Brandl52d168a2008-01-07 18:10:24 +000025073elif test "$ac_cv_sizeof_long" = "$unicode_size"
25074then
25075 PY_UNICODE_TYPE="unsigned long"
25076 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025077#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025078_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025079
Georg Brandl52d168a2008-01-07 18:10:24 +000025080else
25081 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025082fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025083{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25084echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025085
25086# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025087{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25088echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025089if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025090 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025091else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025092 # See if sys/param.h defines the BYTE_ORDER macro.
25093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025094/* confdefs.h. */
25095_ACEOF
25096cat confdefs.h >>conftest.$ac_ext
25097cat >>conftest.$ac_ext <<_ACEOF
25098/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025099#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025100#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025101
Martin v. Löwis11437992002-04-12 09:54:03 +000025102int
25103main ()
25104{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025105#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25106 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25107 bogus endian macros
25108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025109
25110 ;
25111 return 0;
25112}
25113_ACEOF
25114rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025115if { (ac_try="$ac_compile"
25116case "(($ac_try" in
25117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25118 *) ac_try_echo=$ac_try;;
25119esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025123 grep -v '^ *+' conftest.er1 >conftest.err
25124 rm -f conftest.er1
25125 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025127 (exit $ac_status); } && {
25128 test -z "$ac_c_werror_flag" ||
25129 test ! -s conftest.err
25130 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025131 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025133/* confdefs.h. */
25134_ACEOF
25135cat confdefs.h >>conftest.$ac_ext
25136cat >>conftest.$ac_ext <<_ACEOF
25137/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025138#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025139#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025140
Martin v. Löwis11437992002-04-12 09:54:03 +000025141int
25142main ()
25143{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025144#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025145 not big endian
25146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025147
25148 ;
25149 return 0;
25150}
25151_ACEOF
25152rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025153if { (ac_try="$ac_compile"
25154case "(($ac_try" in
25155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25156 *) ac_try_echo=$ac_try;;
25157esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025161 grep -v '^ *+' conftest.er1 >conftest.err
25162 rm -f conftest.er1
25163 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025165 (exit $ac_status); } && {
25166 test -z "$ac_c_werror_flag" ||
25167 test ! -s conftest.err
25168 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025169 ac_cv_c_bigendian=yes
25170else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025172sed 's/^/| /' conftest.$ac_ext >&5
25173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025174 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025176
25177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025178else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025180sed 's/^/| /' conftest.$ac_ext >&5
25181
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025182 # It does not; compile a test program.
25183if test "$cross_compiling" = yes; then
25184 # try to guess the endianness by grepping values into an object file
25185 ac_cv_c_bigendian=unknown
25186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025187/* confdefs.h. */
25188_ACEOF
25189cat confdefs.h >>conftest.$ac_ext
25190cat >>conftest.$ac_ext <<_ACEOF
25191/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025192short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25193short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25194void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25195short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25196short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25197void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025198int
25199main ()
25200{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025201 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025202 ;
25203 return 0;
25204}
25205_ACEOF
25206rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025207if { (ac_try="$ac_compile"
25208case "(($ac_try" in
25209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25210 *) ac_try_echo=$ac_try;;
25211esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025215 grep -v '^ *+' conftest.er1 >conftest.err
25216 rm -f conftest.er1
25217 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025219 (exit $ac_status); } && {
25220 test -z "$ac_c_werror_flag" ||
25221 test ! -s conftest.err
25222 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025223 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025225fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025226if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25227 if test "$ac_cv_c_bigendian" = unknown; then
25228 ac_cv_c_bigendian=no
25229 else
25230 # finding both strings is unlikely to happen, but who knows?
25231 ac_cv_c_bigendian=unknown
25232 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025233fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025234else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025236sed 's/^/| /' conftest.$ac_ext >&5
25237
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025238
Martin v. Löwis11437992002-04-12 09:54:03 +000025239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025240
25241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025242else
25243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025244/* confdefs.h. */
25245_ACEOF
25246cat confdefs.h >>conftest.$ac_ext
25247cat >>conftest.$ac_ext <<_ACEOF
25248/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025249$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025250int
25251main ()
25252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025254 /* Are we little or big endian? From Harbison&Steele. */
25255 union
25256 {
25257 long int l;
25258 char c[sizeof (long int)];
25259 } u;
25260 u.l = 1;
25261 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025262
25263 ;
25264 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025265}
Martin v. Löwis11437992002-04-12 09:54:03 +000025266_ACEOF
25267rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025268if { (ac_try="$ac_link"
25269case "(($ac_try" in
25270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25271 *) ac_try_echo=$ac_try;;
25272esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025274 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025275 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025277 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025278 { (case "(($ac_try" in
25279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25280 *) ac_try_echo=$ac_try;;
25281esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025284 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025286 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025287 ac_cv_c_bigendian=no
25288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025289 echo "$as_me: program exited with status $ac_status" >&5
25290echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025291sed 's/^/| /' conftest.$ac_ext >&5
25292
Martin v. Löwis11437992002-04-12 09:54:03 +000025293( exit $ac_status )
25294ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025296rm -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 +000025297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025298
25299
Martin v. Löwis11437992002-04-12 09:54:03 +000025300fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025301
25302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25303fi
25304{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25305echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25306case $ac_cv_c_bigendian in
25307 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025308
25309cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025310#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025311_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025312 ;;
25313 no)
25314 ;;
25315 *)
25316 { { echo "$as_me:$LINENO: error: unknown endianness
25317presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25318echo "$as_me: error: unknown endianness
25319presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025320 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025321esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025322
Michael W. Hudson54241132001-12-07 15:38:26 +000025323
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025324# Check whether right shifting a negative integer extends the sign bit
25325# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025326{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25327echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025328if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025329 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025330else
Martin v. Löwis11437992002-04-12 09:54:03 +000025331
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025332if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025333 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025334else
Martin v. Löwis11437992002-04-12 09:54:03 +000025335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025336/* confdefs.h. */
25337_ACEOF
25338cat confdefs.h >>conftest.$ac_ext
25339cat >>conftest.$ac_ext <<_ACEOF
25340/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025341
25342int main()
25343{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025344 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025345}
25346
Martin v. Löwis11437992002-04-12 09:54:03 +000025347_ACEOF
25348rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025349if { (ac_try="$ac_link"
25350case "(($ac_try" in
25351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25352 *) ac_try_echo=$ac_try;;
25353esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025355 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025356 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025358 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025359 { (case "(($ac_try" in
25360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25361 *) ac_try_echo=$ac_try;;
25362esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025364 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025365 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025367 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025368 ac_cv_rshift_extends_sign=yes
25369else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025370 echo "$as_me: program exited with status $ac_status" >&5
25371echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025372sed 's/^/| /' conftest.$ac_ext >&5
25373
Martin v. Löwis11437992002-04-12 09:54:03 +000025374( exit $ac_status )
25375ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377rm -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 +000025378fi
25379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025380
25381fi
25382
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025383{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25384echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025385if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025386then
Martin v. Löwis11437992002-04-12 09:54:03 +000025387
25388cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025389#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025390_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025391
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025392fi
25393
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025394# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025395{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25396echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025397if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025399else
Martin v. Löwis11437992002-04-12 09:54:03 +000025400
25401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025402/* confdefs.h. */
25403_ACEOF
25404cat confdefs.h >>conftest.$ac_ext
25405cat >>conftest.$ac_ext <<_ACEOF
25406/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025407#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025408int
25409main ()
25410{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025411
25412 FILE *f = fopen("/dev/null", "r");
25413 flockfile(f);
25414 getc_unlocked(f);
25415 funlockfile(f);
25416
Martin v. Löwis11437992002-04-12 09:54:03 +000025417 ;
25418 return 0;
25419}
25420_ACEOF
25421rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025422if { (ac_try="$ac_link"
25423case "(($ac_try" in
25424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25425 *) ac_try_echo=$ac_try;;
25426esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025428 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025430 grep -v '^ *+' conftest.er1 >conftest.err
25431 rm -f conftest.er1
25432 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025434 (exit $ac_status); } && {
25435 test -z "$ac_c_werror_flag" ||
25436 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025437 } && test -s conftest$ac_exeext &&
25438 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025439 ac_cv_have_getc_unlocked=yes
25440else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025442sed 's/^/| /' conftest.$ac_ext >&5
25443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025444 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025446
25447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025448 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025449fi
25450
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025451{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25452echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025453if test "$ac_cv_have_getc_unlocked" = yes
25454then
Martin v. Löwis11437992002-04-12 09:54:03 +000025455
25456cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025457#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025458_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025459
25460fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025461
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025462# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025463# save the value of LIBS so we don't actually link Python with readline
25464LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025465
Gregory P. Smith18820942008-09-07 06:24:49 +000025466# On some systems we need to link readline to a termcap compatible
25467# library. NOTE: Keep the precedence of listed libraries synchronised
25468# with setup.py.
25469py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025470{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25471echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025472for py_libtermcap in "" ncursesw ncurses curses termcap; do
25473 if test -z "$py_libtermcap"; then
25474 READLINE_LIBS="-lreadline"
25475 else
25476 READLINE_LIBS="-lreadline -l$py_libtermcap"
25477 fi
25478 LIBS="$READLINE_LIBS $LIBS_no_readline"
25479 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025480/* confdefs.h. */
25481_ACEOF
25482cat confdefs.h >>conftest.$ac_ext
25483cat >>conftest.$ac_ext <<_ACEOF
25484/* end confdefs.h. */
25485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025486/* Override any GCC internal prototype to avoid an error.
25487 Use char because int might match the return type of a GCC
25488 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025489#ifdef __cplusplus
25490extern "C"
25491#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025492char readline ();
25493int
25494main ()
25495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025496return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025497 ;
25498 return 0;
25499}
25500_ACEOF
25501rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025502if { (ac_try="$ac_link"
25503case "(($ac_try" in
25504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25505 *) ac_try_echo=$ac_try;;
25506esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025508 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025509 ac_status=$?
25510 grep -v '^ *+' conftest.er1 >conftest.err
25511 rm -f conftest.er1
25512 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025514 (exit $ac_status); } && {
25515 test -z "$ac_c_werror_flag" ||
25516 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025517 } && test -s conftest$ac_exeext &&
25518 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025519 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025520else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025521 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025522sed 's/^/| /' conftest.$ac_ext >&5
25523
Gregory P. Smith18820942008-09-07 06:24:49 +000025524
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025526
25527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025528 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025529 if test $py_cv_lib_readline = yes; then
25530 break
25531 fi
25532done
25533# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25534#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025535if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025536 { echo "$as_me:$LINENO: result: none" >&5
25537echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025538else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025539 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25540echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025541
25542cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025543#define HAVE_LIBREADLINE 1
25544_ACEOF
25545
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025546fi
25547
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025548# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025549{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25550echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025551if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025552 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025553else
25554 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025555LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025556cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025557/* confdefs.h. */
25558_ACEOF
25559cat confdefs.h >>conftest.$ac_ext
25560cat >>conftest.$ac_ext <<_ACEOF
25561/* end confdefs.h. */
25562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025563/* Override any GCC internal prototype to avoid an error.
25564 Use char because int might match the return type of a GCC
25565 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025566#ifdef __cplusplus
25567extern "C"
25568#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025569char rl_callback_handler_install ();
25570int
25571main ()
25572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025573return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025574 ;
25575 return 0;
25576}
25577_ACEOF
25578rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025579if { (ac_try="$ac_link"
25580case "(($ac_try" in
25581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25582 *) ac_try_echo=$ac_try;;
25583esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025585 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025587 grep -v '^ *+' conftest.er1 >conftest.err
25588 rm -f conftest.er1
25589 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025591 (exit $ac_status); } && {
25592 test -z "$ac_c_werror_flag" ||
25593 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025594 } && test -s conftest$ac_exeext &&
25595 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025596 ac_cv_lib_readline_rl_callback_handler_install=yes
25597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025598 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025599sed 's/^/| /' conftest.$ac_ext >&5
25600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025601 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025603
25604rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025605 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025606LIBS=$ac_check_lib_save_LIBS
25607fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025608{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25609echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25610if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025611
25612cat >>confdefs.h <<\_ACEOF
25613#define HAVE_RL_CALLBACK 1
25614_ACEOF
25615
25616fi
25617
25618
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025619# check for readline 2.2
25620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025621/* confdefs.h. */
25622_ACEOF
25623cat confdefs.h >>conftest.$ac_ext
25624cat >>conftest.$ac_ext <<_ACEOF
25625/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025626#include <readline/readline.h>
25627_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025628if { (ac_try="$ac_cpp conftest.$ac_ext"
25629case "(($ac_try" in
25630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25631 *) ac_try_echo=$ac_try;;
25632esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025635 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025636 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025637 rm -f conftest.er1
25638 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025640 (exit $ac_status); } >/dev/null && {
25641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25642 test ! -s conftest.err
25643 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025644 have_readline=yes
25645else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025647sed 's/^/| /' conftest.$ac_ext >&5
25648
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025649 have_readline=no
25650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025651
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025652rm -f conftest.err conftest.$ac_ext
25653if test $have_readline = yes
25654then
25655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025656/* confdefs.h. */
25657_ACEOF
25658cat confdefs.h >>conftest.$ac_ext
25659cat >>conftest.$ac_ext <<_ACEOF
25660/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025661#include <readline/readline.h>
25662
25663_ACEOF
25664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025665 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025666
25667cat >>confdefs.h <<\_ACEOF
25668#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25669_ACEOF
25670
25671fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025672rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025673
Antoine Pitroud5131772009-10-26 19:22:14 +000025674 cat >conftest.$ac_ext <<_ACEOF
25675/* confdefs.h. */
25676_ACEOF
25677cat confdefs.h >>conftest.$ac_ext
25678cat >>conftest.$ac_ext <<_ACEOF
25679/* end confdefs.h. */
25680#include <readline/readline.h>
25681
25682_ACEOF
25683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25684 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25685
25686cat >>confdefs.h <<\_ACEOF
25687#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25688_ACEOF
25689
25690fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025691rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025692
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025693fi
25694
Martin v. Löwis0daad592001-09-30 21:09:59 +000025695# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025696{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25697echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025698if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025699 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025700else
Martin v. Löwis11437992002-04-12 09:54:03 +000025701 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025702LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025703cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025704/* confdefs.h. */
25705_ACEOF
25706cat confdefs.h >>conftest.$ac_ext
25707cat >>conftest.$ac_ext <<_ACEOF
25708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025710/* Override any GCC internal prototype to avoid an error.
25711 Use char because int might match the return type of a GCC
25712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025713#ifdef __cplusplus
25714extern "C"
25715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025716char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025717int
25718main ()
25719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025720return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025721 ;
25722 return 0;
25723}
25724_ACEOF
25725rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025726if { (ac_try="$ac_link"
25727case "(($ac_try" in
25728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25729 *) ac_try_echo=$ac_try;;
25730esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025732 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025734 grep -v '^ *+' conftest.er1 >conftest.err
25735 rm -f conftest.er1
25736 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025738 (exit $ac_status); } && {
25739 test -z "$ac_c_werror_flag" ||
25740 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025741 } && test -s conftest$ac_exeext &&
25742 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025743 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025746sed 's/^/| /' conftest.$ac_ext >&5
25747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025748 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025750
25751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025753LIBS=$ac_check_lib_save_LIBS
25754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025755{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25756echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25757if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025758
Martin v. Löwis11437992002-04-12 09:54:03 +000025759cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025760#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025761_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025762
Martin v. Löwis0daad592001-09-30 21:09:59 +000025763fi
25764
Michael W. Hudson54241132001-12-07 15:38:26 +000025765
Thomas Wouters89d996e2007-09-08 17:39:28 +000025766# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025767{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25768echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025769if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025770 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025771else
25772 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025773LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025774cat >conftest.$ac_ext <<_ACEOF
25775/* confdefs.h. */
25776_ACEOF
25777cat confdefs.h >>conftest.$ac_ext
25778cat >>conftest.$ac_ext <<_ACEOF
25779/* end confdefs.h. */
25780
25781/* Override any GCC internal prototype to avoid an error.
25782 Use char because int might match the return type of a GCC
25783 builtin and then its argument prototype would still apply. */
25784#ifdef __cplusplus
25785extern "C"
25786#endif
25787char rl_completion_display_matches_hook ();
25788int
25789main ()
25790{
25791return rl_completion_display_matches_hook ();
25792 ;
25793 return 0;
25794}
25795_ACEOF
25796rm -f conftest.$ac_objext conftest$ac_exeext
25797if { (ac_try="$ac_link"
25798case "(($ac_try" in
25799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25800 *) ac_try_echo=$ac_try;;
25801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025803 (eval "$ac_link") 2>conftest.er1
25804 ac_status=$?
25805 grep -v '^ *+' conftest.er1 >conftest.err
25806 rm -f conftest.er1
25807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025809 (exit $ac_status); } && {
25810 test -z "$ac_c_werror_flag" ||
25811 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025812 } && test -s conftest$ac_exeext &&
25813 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025814 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025816 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025817sed 's/^/| /' conftest.$ac_ext >&5
25818
25819 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25820fi
25821
25822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25823 conftest$ac_exeext conftest.$ac_ext
25824LIBS=$ac_check_lib_save_LIBS
25825fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025826{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25827echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25828if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025829
25830cat >>confdefs.h <<\_ACEOF
25831#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25832_ACEOF
25833
25834fi
25835
25836
Martin v. Löwis0daad592001-09-30 21:09:59 +000025837# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025838{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25839echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025840if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025842else
Martin v. Löwis11437992002-04-12 09:54:03 +000025843 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025844LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025846/* confdefs.h. */
25847_ACEOF
25848cat confdefs.h >>conftest.$ac_ext
25849cat >>conftest.$ac_ext <<_ACEOF
25850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025852/* Override any GCC internal prototype to avoid an error.
25853 Use char because int might match the return type of a GCC
25854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025855#ifdef __cplusplus
25856extern "C"
25857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025858char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025859int
25860main ()
25861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025862return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025863 ;
25864 return 0;
25865}
25866_ACEOF
25867rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025868if { (ac_try="$ac_link"
25869case "(($ac_try" in
25870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25871 *) ac_try_echo=$ac_try;;
25872esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025874 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025876 grep -v '^ *+' conftest.er1 >conftest.err
25877 rm -f conftest.er1
25878 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025880 (exit $ac_status); } && {
25881 test -z "$ac_c_werror_flag" ||
25882 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025883 } && test -s conftest$ac_exeext &&
25884 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025885 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025886else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025888sed 's/^/| /' conftest.$ac_ext >&5
25889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025890 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025892
25893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025894 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025895LIBS=$ac_check_lib_save_LIBS
25896fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025897{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25898echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25899if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025900
Martin v. Löwis11437992002-04-12 09:54:03 +000025901cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025902#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025903_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025904
Guido van Rossum353ae582001-07-10 16:45:32 +000025905fi
25906
Jack Jansendd19cf82001-12-06 22:36:17 +000025907
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025908# also in readline 4.2
25909cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025910/* confdefs.h. */
25911_ACEOF
25912cat confdefs.h >>conftest.$ac_ext
25913cat >>conftest.$ac_ext <<_ACEOF
25914/* end confdefs.h. */
25915#include <readline/readline.h>
25916_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025917if { (ac_try="$ac_cpp conftest.$ac_ext"
25918case "(($ac_try" in
25919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25920 *) ac_try_echo=$ac_try;;
25921esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025923 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025924 ac_status=$?
25925 grep -v '^ *+' conftest.er1 >conftest.err
25926 rm -f conftest.er1
25927 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025929 (exit $ac_status); } >/dev/null && {
25930 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25931 test ! -s conftest.err
25932 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025933 have_readline=yes
25934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025935 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025936sed 's/^/| /' conftest.$ac_ext >&5
25937
25938 have_readline=no
25939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025940
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025941rm -f conftest.err conftest.$ac_ext
25942if test $have_readline = yes
25943then
25944 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025945/* confdefs.h. */
25946_ACEOF
25947cat confdefs.h >>conftest.$ac_ext
25948cat >>conftest.$ac_ext <<_ACEOF
25949/* end confdefs.h. */
25950#include <readline/readline.h>
25951
25952_ACEOF
25953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25954 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25955
25956cat >>confdefs.h <<\_ACEOF
25957#define HAVE_RL_CATCH_SIGNAL 1
25958_ACEOF
25959
25960fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000025961rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025962
25963fi
25964
Martin v. Löwis82bca632006-02-10 20:49:30 +000025965# End of readline checks: restore LIBS
25966LIBS=$LIBS_no_readline
25967
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025968{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25969echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025970if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025971 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025972else
Martin v. Löwis11437992002-04-12 09:54:03 +000025973
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025974if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025975 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025976else
Martin v. Löwis11437992002-04-12 09:54:03 +000025977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025978/* confdefs.h. */
25979_ACEOF
25980cat confdefs.h >>conftest.$ac_ext
25981cat >>conftest.$ac_ext <<_ACEOF
25982/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025983
25984int main()
25985{
25986 int val1 = nice(1);
25987 if (val1 != -1 && val1 == nice(2))
25988 exit(0);
25989 exit(1);
25990}
25991
Martin v. Löwis11437992002-04-12 09:54:03 +000025992_ACEOF
25993rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025994if { (ac_try="$ac_link"
25995case "(($ac_try" in
25996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25997 *) ac_try_echo=$ac_try;;
25998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026001 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026004 { (case "(($ac_try" in
26005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26006 *) ac_try_echo=$ac_try;;
26007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026009 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026010 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026012 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026013 ac_cv_broken_nice=yes
26014else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026015 echo "$as_me: program exited with status $ac_status" >&5
26016echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026017sed 's/^/| /' conftest.$ac_ext >&5
26018
Martin v. Löwis11437992002-04-12 09:54:03 +000026019( exit $ac_status )
26020ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026022rm -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 +000026023fi
26024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026025
26026fi
26027
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026028{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26029echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026030if test "$ac_cv_broken_nice" = yes
26031then
Martin v. Löwis11437992002-04-12 09:54:03 +000026032
26033cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026034#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026035_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026036
26037fi
26038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026039{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26040echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026041if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026042 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026043else
26044 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026045 ac_cv_broken_poll=no
26046else
26047 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026048/* confdefs.h. */
26049_ACEOF
26050cat confdefs.h >>conftest.$ac_ext
26051cat >>conftest.$ac_ext <<_ACEOF
26052/* end confdefs.h. */
26053
26054#include <poll.h>
26055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026056int main()
26057{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026058 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026059 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026060
26061 close (42);
26062
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026063 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026064 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026065 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026066 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026067 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026068 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026069 return 1;
26070}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026071
26072_ACEOF
26073rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026074if { (ac_try="$ac_link"
26075case "(($ac_try" in
26076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26077 *) ac_try_echo=$ac_try;;
26078esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026080 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026081 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026083 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026084 { (case "(($ac_try" in
26085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26086 *) ac_try_echo=$ac_try;;
26087esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026089 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026090 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026092 (exit $ac_status); }; }; then
26093 ac_cv_broken_poll=yes
26094else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026095 echo "$as_me: program exited with status $ac_status" >&5
26096echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026097sed 's/^/| /' conftest.$ac_ext >&5
26098
26099( exit $ac_status )
26100ac_cv_broken_poll=no
26101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026102rm -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 +000026103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026104
26105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026106fi
26107
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026108{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26109echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026110if test "$ac_cv_broken_poll" = yes
26111then
26112
26113cat >>confdefs.h <<\_ACEOF
26114#define HAVE_BROKEN_POLL 1
26115_ACEOF
26116
26117fi
26118
Brett Cannon43802422005-02-10 20:48:03 +000026119# 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 +000026120# (which is not required by ISO C or UNIX spec) and/or if we support
26121# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026122{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26123echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026124if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026125 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026126else
26127 cat >conftest.$ac_ext <<_ACEOF
26128/* confdefs.h. */
26129_ACEOF
26130cat confdefs.h >>conftest.$ac_ext
26131cat >>conftest.$ac_ext <<_ACEOF
26132/* end confdefs.h. */
26133#include <sys/types.h>
26134#include <$ac_cv_struct_tm>
26135
26136
26137int
26138main ()
26139{
26140static struct tm ac_aggr;
26141if (ac_aggr.tm_zone)
26142return 0;
26143 ;
26144 return 0;
26145}
26146_ACEOF
26147rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026148if { (ac_try="$ac_compile"
26149case "(($ac_try" in
26150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26151 *) ac_try_echo=$ac_try;;
26152esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026154 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026155 ac_status=$?
26156 grep -v '^ *+' conftest.er1 >conftest.err
26157 rm -f conftest.er1
26158 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026160 (exit $ac_status); } && {
26161 test -z "$ac_c_werror_flag" ||
26162 test ! -s conftest.err
26163 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026164 ac_cv_member_struct_tm_tm_zone=yes
26165else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026166 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026167sed 's/^/| /' conftest.$ac_ext >&5
26168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026169 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026170/* confdefs.h. */
26171_ACEOF
26172cat confdefs.h >>conftest.$ac_ext
26173cat >>conftest.$ac_ext <<_ACEOF
26174/* end confdefs.h. */
26175#include <sys/types.h>
26176#include <$ac_cv_struct_tm>
26177
26178
26179int
26180main ()
26181{
26182static struct tm ac_aggr;
26183if (sizeof ac_aggr.tm_zone)
26184return 0;
26185 ;
26186 return 0;
26187}
26188_ACEOF
26189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026190if { (ac_try="$ac_compile"
26191case "(($ac_try" in
26192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26193 *) ac_try_echo=$ac_try;;
26194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026196 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026197 ac_status=$?
26198 grep -v '^ *+' conftest.er1 >conftest.err
26199 rm -f conftest.er1
26200 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026202 (exit $ac_status); } && {
26203 test -z "$ac_c_werror_flag" ||
26204 test ! -s conftest.err
26205 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026206 ac_cv_member_struct_tm_tm_zone=yes
26207else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026208 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026209sed 's/^/| /' conftest.$ac_ext >&5
26210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026213
26214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026216
26217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026218fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026219{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26220echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26221if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026222
26223cat >>confdefs.h <<_ACEOF
26224#define HAVE_STRUCT_TM_TM_ZONE 1
26225_ACEOF
26226
26227
26228fi
26229
26230if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26231
26232cat >>confdefs.h <<\_ACEOF
26233#define HAVE_TM_ZONE 1
26234_ACEOF
26235
26236else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026237 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26238echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026239if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026240 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026241else
26242 cat >conftest.$ac_ext <<_ACEOF
26243/* confdefs.h. */
26244_ACEOF
26245cat confdefs.h >>conftest.$ac_ext
26246cat >>conftest.$ac_ext <<_ACEOF
26247/* end confdefs.h. */
26248#include <time.h>
26249
26250int
26251main ()
26252{
26253#ifndef tzname
26254 (void) tzname;
26255#endif
26256
26257 ;
26258 return 0;
26259}
26260_ACEOF
26261rm -f conftest.$ac_objext
26262if { (ac_try="$ac_compile"
26263case "(($ac_try" in
26264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26265 *) ac_try_echo=$ac_try;;
26266esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026268 (eval "$ac_compile") 2>conftest.er1
26269 ac_status=$?
26270 grep -v '^ *+' conftest.er1 >conftest.err
26271 rm -f conftest.er1
26272 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026274 (exit $ac_status); } && {
26275 test -z "$ac_c_werror_flag" ||
26276 test ! -s conftest.err
26277 } && test -s conftest.$ac_objext; then
26278 ac_cv_have_decl_tzname=yes
26279else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026280 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281sed 's/^/| /' conftest.$ac_ext >&5
26282
26283 ac_cv_have_decl_tzname=no
26284fi
26285
26286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26287fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026288{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26289echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26290if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291
26292cat >>confdefs.h <<_ACEOF
26293#define HAVE_DECL_TZNAME 1
26294_ACEOF
26295
26296
26297else
26298 cat >>confdefs.h <<_ACEOF
26299#define HAVE_DECL_TZNAME 0
26300_ACEOF
26301
26302
26303fi
26304
26305
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026306 { echo "$as_me:$LINENO: checking for tzname" >&5
26307echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026308if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026309 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026310else
26311 cat >conftest.$ac_ext <<_ACEOF
26312/* confdefs.h. */
26313_ACEOF
26314cat confdefs.h >>conftest.$ac_ext
26315cat >>conftest.$ac_ext <<_ACEOF
26316/* end confdefs.h. */
26317#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026318#if !HAVE_DECL_TZNAME
26319extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026320#endif
26321
26322int
26323main ()
26324{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026326 ;
26327 return 0;
26328}
26329_ACEOF
26330rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026331if { (ac_try="$ac_link"
26332case "(($ac_try" in
26333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26334 *) ac_try_echo=$ac_try;;
26335esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026337 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026338 ac_status=$?
26339 grep -v '^ *+' conftest.er1 >conftest.err
26340 rm -f conftest.er1
26341 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026343 (exit $ac_status); } && {
26344 test -z "$ac_c_werror_flag" ||
26345 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026346 } && test -s conftest$ac_exeext &&
26347 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026348 ac_cv_var_tzname=yes
26349else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026350 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026351sed 's/^/| /' conftest.$ac_ext >&5
26352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026353 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355
26356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026357 conftest$ac_exeext conftest.$ac_ext
26358fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026359{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26360echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026361 if test $ac_cv_var_tzname = yes; then
26362
26363cat >>confdefs.h <<\_ACEOF
26364#define HAVE_TZNAME 1
26365_ACEOF
26366
26367 fi
26368fi
26369
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026370
Martin v. Löwis1d459062005-03-14 21:23:33 +000026371# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026372{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26373echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026374if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026375 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026376else
26377
26378if test "$cross_compiling" = yes; then
26379 ac_cv_working_tzset=no
26380else
26381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026382/* confdefs.h. */
26383_ACEOF
26384cat confdefs.h >>conftest.$ac_ext
26385cat >>conftest.$ac_ext <<_ACEOF
26386/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026387
26388#include <stdlib.h>
26389#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026390#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026391
26392#if HAVE_TZNAME
26393extern char *tzname[];
26394#endif
26395
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026396int main()
26397{
Brett Cannon18367812003-09-19 00:59:16 +000026398 /* Note that we need to ensure that not only does tzset(3)
26399 do 'something' with localtime, but it works as documented
26400 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026401 This includes making sure that tzname is set properly if
26402 tm->tm_zone does not exist since it is the alternative way
26403 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026404
26405 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026406 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026407 */
26408
Martin v. Löwis1d459062005-03-14 21:23:33 +000026409 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026410 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26411
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026412 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026413 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026414 if (localtime(&groundhogday)->tm_hour != 0)
26415 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026416#if HAVE_TZNAME
26417 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26418 if (strcmp(tzname[0], "UTC") ||
26419 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26420 exit(1);
26421#endif
Brett Cannon18367812003-09-19 00:59:16 +000026422
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026423 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026424 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026425 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026426 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026427#if HAVE_TZNAME
26428 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26429 exit(1);
26430#endif
Brett Cannon18367812003-09-19 00:59:16 +000026431
26432 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26433 tzset();
26434 if (localtime(&groundhogday)->tm_hour != 11)
26435 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026436#if HAVE_TZNAME
26437 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26438 exit(1);
26439#endif
26440
26441#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026442 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26443 exit(1);
26444 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26445 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026446#endif
Brett Cannon18367812003-09-19 00:59:16 +000026447
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026448 exit(0);
26449}
26450
26451_ACEOF
26452rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026453if { (ac_try="$ac_link"
26454case "(($ac_try" in
26455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26456 *) ac_try_echo=$ac_try;;
26457esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026459 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026460 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026462 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026463 { (case "(($ac_try" in
26464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26465 *) ac_try_echo=$ac_try;;
26466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026468 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026469 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026471 (exit $ac_status); }; }; then
26472 ac_cv_working_tzset=yes
26473else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026474 echo "$as_me: program exited with status $ac_status" >&5
26475echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026476sed 's/^/| /' conftest.$ac_ext >&5
26477
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026478( exit $ac_status )
26479ac_cv_working_tzset=no
26480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026481rm -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 +000026482fi
26483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026484
26485fi
26486
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026487{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26488echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026489if test "$ac_cv_working_tzset" = yes
26490then
26491
26492cat >>confdefs.h <<\_ACEOF
26493#define HAVE_WORKING_TZSET 1
26494_ACEOF
26495
26496fi
26497
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026498# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026499{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26500echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026501if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026502 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026503else
26504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026505/* confdefs.h. */
26506_ACEOF
26507cat confdefs.h >>conftest.$ac_ext
26508cat >>conftest.$ac_ext <<_ACEOF
26509/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026510#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026511int
26512main ()
26513{
26514
26515struct stat st;
26516st.st_mtim.tv_nsec = 1;
26517
26518 ;
26519 return 0;
26520}
26521_ACEOF
26522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026523if { (ac_try="$ac_compile"
26524case "(($ac_try" in
26525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26526 *) ac_try_echo=$ac_try;;
26527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026531 grep -v '^ *+' conftest.er1 >conftest.err
26532 rm -f conftest.er1
26533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026535 (exit $ac_status); } && {
26536 test -z "$ac_c_werror_flag" ||
26537 test ! -s conftest.err
26538 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026539 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026542sed 's/^/| /' conftest.$ac_ext >&5
26543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026544 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026545fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26548fi
26549
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026550{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26551echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026552if test "$ac_cv_stat_tv_nsec" = yes
26553then
26554
26555cat >>confdefs.h <<\_ACEOF
26556#define HAVE_STAT_TV_NSEC 1
26557_ACEOF
26558
26559fi
26560
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026561# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026562{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26563echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026564if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026565 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026566else
26567 cat >conftest.$ac_ext <<_ACEOF
26568/* confdefs.h. */
26569_ACEOF
26570cat confdefs.h >>conftest.$ac_ext
26571cat >>conftest.$ac_ext <<_ACEOF
26572/* end confdefs.h. */
26573#include <sys/stat.h>
26574int
26575main ()
26576{
26577
26578struct stat st;
26579st.st_mtimespec.tv_nsec = 1;
26580
26581 ;
26582 return 0;
26583}
26584_ACEOF
26585rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026586if { (ac_try="$ac_compile"
26587case "(($ac_try" in
26588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26589 *) ac_try_echo=$ac_try;;
26590esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026593 ac_status=$?
26594 grep -v '^ *+' conftest.er1 >conftest.err
26595 rm -f conftest.er1
26596 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026598 (exit $ac_status); } && {
26599 test -z "$ac_c_werror_flag" ||
26600 test ! -s conftest.err
26601 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026602 ac_cv_stat_tv_nsec2=yes
26603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026604 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026605sed 's/^/| /' conftest.$ac_ext >&5
26606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026607 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026608fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26611fi
26612
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026613{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26614echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026615if test "$ac_cv_stat_tv_nsec2" = yes
26616then
26617
26618cat >>confdefs.h <<\_ACEOF
26619#define HAVE_STAT_TV_NSEC2 1
26620_ACEOF
26621
26622fi
26623
Jack Jansen666b1e72001-10-31 12:11:48 +000026624# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026625{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26626echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026627if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026628 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026629else
Martin v. Löwis11437992002-04-12 09:54:03 +000026630 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026631/* confdefs.h. */
26632_ACEOF
26633cat confdefs.h >>conftest.$ac_ext
26634cat >>conftest.$ac_ext <<_ACEOF
26635/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026636#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026637int
26638main ()
26639{
Jack Jansen666b1e72001-10-31 12:11:48 +000026640
26641 int rtn;
26642 rtn = mvwdelch(0,0,0);
26643
Martin v. Löwis11437992002-04-12 09:54:03 +000026644 ;
26645 return 0;
26646}
26647_ACEOF
26648rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026649if { (ac_try="$ac_compile"
26650case "(($ac_try" in
26651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26652 *) ac_try_echo=$ac_try;;
26653esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026657 grep -v '^ *+' conftest.er1 >conftest.err
26658 rm -f conftest.er1
26659 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026661 (exit $ac_status); } && {
26662 test -z "$ac_c_werror_flag" ||
26663 test ! -s conftest.err
26664 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026665 ac_cv_mvwdelch_is_expression=yes
26666else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026668sed 's/^/| /' conftest.$ac_ext >&5
26669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026670 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026671fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26674fi
26675
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026676{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26677echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026678
26679if test "$ac_cv_mvwdelch_is_expression" = yes
26680then
Martin v. Löwis11437992002-04-12 09:54:03 +000026681
26682cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026683#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026684_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026685
26686fi
26687
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026688{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26689echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026690if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026691 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026692else
Martin v. Löwis11437992002-04-12 09:54:03 +000026693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026694/* confdefs.h. */
26695_ACEOF
26696cat confdefs.h >>conftest.$ac_ext
26697cat >>conftest.$ac_ext <<_ACEOF
26698/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026699#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026700int
26701main ()
26702{
Jack Jansen666b1e72001-10-31 12:11:48 +000026703
26704 WINDOW *w;
26705 w->_flags = 0;
26706
Martin v. Löwis11437992002-04-12 09:54:03 +000026707 ;
26708 return 0;
26709}
26710_ACEOF
26711rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026712if { (ac_try="$ac_compile"
26713case "(($ac_try" in
26714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26715 *) ac_try_echo=$ac_try;;
26716esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026718 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026720 grep -v '^ *+' conftest.er1 >conftest.err
26721 rm -f conftest.er1
26722 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026724 (exit $ac_status); } && {
26725 test -z "$ac_c_werror_flag" ||
26726 test ! -s conftest.err
26727 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026728 ac_cv_window_has_flags=yes
26729else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026731sed 's/^/| /' conftest.$ac_ext >&5
26732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026733 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026734fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26737fi
26738
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026739{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26740echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026741
Jack Jansen666b1e72001-10-31 12:11:48 +000026742
26743if test "$ac_cv_window_has_flags" = yes
26744then
Martin v. Löwis11437992002-04-12 09:54:03 +000026745
26746cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026747#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026748_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026749
26750fi
26751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026752{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26753echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026754cat >conftest.$ac_ext <<_ACEOF
26755/* confdefs.h. */
26756_ACEOF
26757cat confdefs.h >>conftest.$ac_ext
26758cat >>conftest.$ac_ext <<_ACEOF
26759/* end confdefs.h. */
26760#include <curses.h>
26761int
26762main ()
26763{
26764void *x=is_term_resized
26765 ;
26766 return 0;
26767}
26768_ACEOF
26769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026770if { (ac_try="$ac_compile"
26771case "(($ac_try" in
26772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26773 *) ac_try_echo=$ac_try;;
26774esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026776 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026777 ac_status=$?
26778 grep -v '^ *+' conftest.er1 >conftest.err
26779 rm -f conftest.er1
26780 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782 (exit $ac_status); } && {
26783 test -z "$ac_c_werror_flag" ||
26784 test ! -s conftest.err
26785 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026786
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026787cat >>confdefs.h <<\_ACEOF
26788#define HAVE_CURSES_IS_TERM_RESIZED 1
26789_ACEOF
26790
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026791 { echo "$as_me:$LINENO: result: yes" >&5
26792echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026793else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026794 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026795sed 's/^/| /' conftest.$ac_ext >&5
26796
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026797 { echo "$as_me:$LINENO: result: no" >&5
26798echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026799
26800fi
26801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26803
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026804{ echo "$as_me:$LINENO: checking for resize_term" >&5
26805echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026806cat >conftest.$ac_ext <<_ACEOF
26807/* confdefs.h. */
26808_ACEOF
26809cat confdefs.h >>conftest.$ac_ext
26810cat >>conftest.$ac_ext <<_ACEOF
26811/* end confdefs.h. */
26812#include <curses.h>
26813int
26814main ()
26815{
26816void *x=resize_term
26817 ;
26818 return 0;
26819}
26820_ACEOF
26821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822if { (ac_try="$ac_compile"
26823case "(($ac_try" in
26824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26825 *) ac_try_echo=$ac_try;;
26826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026828 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026829 ac_status=$?
26830 grep -v '^ *+' conftest.er1 >conftest.err
26831 rm -f conftest.er1
26832 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834 (exit $ac_status); } && {
26835 test -z "$ac_c_werror_flag" ||
26836 test ! -s conftest.err
26837 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026838
26839cat >>confdefs.h <<\_ACEOF
26840#define HAVE_CURSES_RESIZE_TERM 1
26841_ACEOF
26842
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026843 { echo "$as_me:$LINENO: result: yes" >&5
26844echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026846 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026847sed 's/^/| /' conftest.$ac_ext >&5
26848
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026849 { echo "$as_me:$LINENO: result: no" >&5
26850echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026851
26852fi
26853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26855
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026856{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26857echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026858cat >conftest.$ac_ext <<_ACEOF
26859/* confdefs.h. */
26860_ACEOF
26861cat confdefs.h >>conftest.$ac_ext
26862cat >>conftest.$ac_ext <<_ACEOF
26863/* end confdefs.h. */
26864#include <curses.h>
26865int
26866main ()
26867{
26868void *x=resizeterm
26869 ;
26870 return 0;
26871}
26872_ACEOF
26873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026874if { (ac_try="$ac_compile"
26875case "(($ac_try" in
26876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26877 *) ac_try_echo=$ac_try;;
26878esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026880 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026881 ac_status=$?
26882 grep -v '^ *+' conftest.er1 >conftest.err
26883 rm -f conftest.er1
26884 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026886 (exit $ac_status); } && {
26887 test -z "$ac_c_werror_flag" ||
26888 test ! -s conftest.err
26889 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026890
26891cat >>confdefs.h <<\_ACEOF
26892#define HAVE_CURSES_RESIZETERM 1
26893_ACEOF
26894
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026895 { echo "$as_me:$LINENO: result: yes" >&5
26896echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026897else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026898 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026899sed 's/^/| /' conftest.$ac_ext >&5
26900
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026901 { echo "$as_me:$LINENO: result: no" >&5
26902echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026903
26904fi
26905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26907
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026908{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26909echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026910
26911if test -r /dev/ptmx
26912then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026913 { echo "$as_me:$LINENO: result: yes" >&5
26914echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026915
26916cat >>confdefs.h <<\_ACEOF
26917#define HAVE_DEV_PTMX 1
26918_ACEOF
26919
Thomas Wouters89f507f2006-12-13 04:49:30 +000026920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026921 { echo "$as_me:$LINENO: result: no" >&5
26922echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026923fi
26924
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026925{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26926echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026927
26928if test -r /dev/ptc
26929then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026930 { echo "$as_me:$LINENO: result: yes" >&5
26931echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026932
26933cat >>confdefs.h <<\_ACEOF
26934#define HAVE_DEV_PTC 1
26935_ACEOF
26936
Thomas Wouters89f507f2006-12-13 04:49:30 +000026937else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026938 { echo "$as_me:$LINENO: result: no" >&5
26939echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026940fi
26941
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026942if test "$have_long_long" = yes
26943then
26944 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26945echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26946 if test "${ac_cv_have_long_long_format+set}" = set; then
26947 echo $ECHO_N "(cached) $ECHO_C" >&6
26948else
26949 if test "$cross_compiling" = yes; then
26950 ac_cv_have_long_long_format=no
26951else
26952 cat >conftest.$ac_ext <<_ACEOF
26953/* confdefs.h. */
26954_ACEOF
26955cat confdefs.h >>conftest.$ac_ext
26956cat >>conftest.$ac_ext <<_ACEOF
26957/* end confdefs.h. */
26958
26959 #include <stdio.h>
26960 #include <stddef.h>
26961 #include <string.h>
26962
26963 #ifdef HAVE_SYS_TYPES_H
26964 #include <sys/types.h>
26965 #endif
26966
26967 int main()
26968 {
26969 char buffer[256];
26970
26971 if (sprintf(buffer, "%lld", (long long)123) < 0)
26972 return 1;
26973 if (strcmp(buffer, "123"))
26974 return 1;
26975
26976 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26977 return 1;
26978 if (strcmp(buffer, "-123"))
26979 return 1;
26980
26981 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26982 return 1;
26983 if (strcmp(buffer, "123"))
26984 return 1;
26985
26986 return 0;
26987 }
26988
26989_ACEOF
26990rm -f conftest$ac_exeext
26991if { (ac_try="$ac_link"
26992case "(($ac_try" in
26993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26994 *) ac_try_echo=$ac_try;;
26995esac
26996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26997 (eval "$ac_link") 2>&5
26998 ac_status=$?
26999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27001 { (case "(($ac_try" in
27002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27003 *) ac_try_echo=$ac_try;;
27004esac
27005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27006 (eval "$ac_try") 2>&5
27007 ac_status=$?
27008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27009 (exit $ac_status); }; }; then
27010 ac_cv_have_long_long_format=yes
27011else
27012 echo "$as_me: program exited with status $ac_status" >&5
27013echo "$as_me: failed program was:" >&5
27014sed 's/^/| /' conftest.$ac_ext >&5
27015
27016( exit $ac_status )
27017ac_cv_have_long_long_format=no
27018fi
27019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27020fi
27021
27022
27023
27024fi
27025
27026 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27027echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27028fi
27029
Mark Dickinson89d7d412009-12-31 20:50:59 +000027030if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027031then
27032
27033cat >>confdefs.h <<\_ACEOF
27034#define PY_FORMAT_LONG_LONG "ll"
27035_ACEOF
27036
27037fi
27038
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000027039if test $ac_sys_system = Darwin
27040then
27041 LIBS="$LIBS -framework CoreFoundation"
27042fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000027043
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027044{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27045echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027046if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027047 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027048else
27049 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027050 ac_cv_have_size_t_format="cross -- assuming yes"
27051
Thomas Wouters477c8d52006-05-27 19:21:47 +000027052else
27053 cat >conftest.$ac_ext <<_ACEOF
27054/* confdefs.h. */
27055_ACEOF
27056cat confdefs.h >>conftest.$ac_ext
27057cat >>conftest.$ac_ext <<_ACEOF
27058/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027059
Thomas Wouters477c8d52006-05-27 19:21:47 +000027060#include <stdio.h>
27061#include <stddef.h>
27062#include <string.h>
27063
Christian Heimes2c181612007-12-17 20:04:13 +000027064#ifdef HAVE_SYS_TYPES_H
27065#include <sys/types.h>
27066#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027067
27068#ifdef HAVE_SSIZE_T
27069typedef ssize_t Py_ssize_t;
27070#elif SIZEOF_VOID_P == SIZEOF_LONG
27071typedef long Py_ssize_t;
27072#else
27073typedef int Py_ssize_t;
27074#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027075
Christian Heimes2c181612007-12-17 20:04:13 +000027076int main()
27077{
27078 char buffer[256];
27079
Thomas Wouters477c8d52006-05-27 19:21:47 +000027080 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27081 return 1;
27082
Thomas Wouters89f507f2006-12-13 04:49:30 +000027083 if (strcmp(buffer, "123"))
27084 return 1;
27085
27086 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27087 return 1;
27088
27089 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027090 return 1;
27091
27092 return 0;
27093}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027094
Thomas Wouters477c8d52006-05-27 19:21:47 +000027095_ACEOF
27096rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027097if { (ac_try="$ac_link"
27098case "(($ac_try" in
27099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27100 *) ac_try_echo=$ac_try;;
27101esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027103 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027104 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027106 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027107 { (case "(($ac_try" in
27108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27109 *) ac_try_echo=$ac_try;;
27110esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027112 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027113 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027115 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027116 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027117else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027118 echo "$as_me: program exited with status $ac_status" >&5
27119echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027120sed 's/^/| /' conftest.$ac_ext >&5
27121
27122( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027123ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027124fi
27125rm -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 +000027126fi
27127
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027129fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027130{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27131echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000027132if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027133
27134cat >>confdefs.h <<\_ACEOF
27135#define PY_FORMAT_SIZE_T "z"
27136_ACEOF
27137
27138fi
27139
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027140{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27141echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027142if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027143 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027144else
Martin v. Löwis11437992002-04-12 09:54:03 +000027145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027146/* confdefs.h. */
27147_ACEOF
27148cat confdefs.h >>conftest.$ac_ext
27149cat >>conftest.$ac_ext <<_ACEOF
27150/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027151
27152#ifdef HAVE_SYS_TYPES_H
27153#include <sys/types.h>
27154#endif
27155#ifdef HAVE_SYS_SOCKET_H
27156#include <sys/socket.h>
27157#endif
27158
27159
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027160typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027161int
27162main ()
27163{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027164if ((ac__type_new_ *) 0)
27165 return 0;
27166if (sizeof (ac__type_new_))
27167 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027168 ;
27169 return 0;
27170}
27171_ACEOF
27172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027173if { (ac_try="$ac_compile"
27174case "(($ac_try" in
27175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27176 *) ac_try_echo=$ac_try;;
27177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027181 grep -v '^ *+' conftest.er1 >conftest.err
27182 rm -f conftest.er1
27183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027185 (exit $ac_status); } && {
27186 test -z "$ac_c_werror_flag" ||
27187 test ! -s conftest.err
27188 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027189 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027190else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027191 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027192sed 's/^/| /' conftest.$ac_ext >&5
27193
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027194 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027196
27197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027198fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027199{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27200echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27201if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027202 :
27203else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027204
Martin v. Löwis01c04012002-11-11 14:58:44 +000027205cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027206#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027207_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027208
27209fi
27210
Michael W. Hudson54241132001-12-07 15:38:26 +000027211
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027212{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27213echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027214if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027215 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027216else
27217 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027218 ac_cv_broken_mbstowcs=no
27219else
27220 cat >conftest.$ac_ext <<_ACEOF
27221/* confdefs.h. */
27222_ACEOF
27223cat confdefs.h >>conftest.$ac_ext
27224cat >>conftest.$ac_ext <<_ACEOF
27225/* end confdefs.h. */
27226
27227#include<stdlib.h>
27228int main() {
27229 size_t len = -1;
27230 const char *str = "text";
27231 len = mbstowcs(NULL, str, 0);
27232 return (len != 4);
27233}
27234
27235_ACEOF
27236rm -f conftest$ac_exeext
27237if { (ac_try="$ac_link"
27238case "(($ac_try" in
27239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27240 *) ac_try_echo=$ac_try;;
27241esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027243 (eval "$ac_link") 2>&5
27244 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027246 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27247 { (case "(($ac_try" in
27248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27249 *) ac_try_echo=$ac_try;;
27250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027252 (eval "$ac_try") 2>&5
27253 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027255 (exit $ac_status); }; }; then
27256 ac_cv_broken_mbstowcs=no
27257else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027258 echo "$as_me: program exited with status $ac_status" >&5
27259echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027260sed 's/^/| /' conftest.$ac_ext >&5
27261
27262( exit $ac_status )
27263ac_cv_broken_mbstowcs=yes
27264fi
27265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27266fi
27267
27268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027269fi
27270
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027271{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27272echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027273if test "$ac_cv_broken_mbstowcs" = yes
27274then
27275
27276cat >>confdefs.h <<\_ACEOF
27277#define HAVE_BROKEN_MBSTOWCS 1
27278_ACEOF
27279
27280fi
27281
Antoine Pitroub52ec782009-01-25 16:34:23 +000027282# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027283{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27284echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027285
27286# Check whether --with-computed-gotos was given.
27287if test "${with_computed_gotos+set}" = set; then
27288 withval=$with_computed_gotos;
27289if test "$withval" != no
27290then
27291
27292cat >>confdefs.h <<\_ACEOF
27293#define USE_COMPUTED_GOTOS 1
27294_ACEOF
27295
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027296 { echo "$as_me:$LINENO: result: yes" >&5
27297echo "${ECHO_T}yes" >&6; }
27298else { echo "$as_me:$LINENO: result: no" >&5
27299echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027300fi
27301else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027302 { echo "$as_me:$LINENO: result: no" >&5
27303echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027304fi
27305
27306
27307
Michael W. Hudson54241132001-12-07 15:38:26 +000027308
27309
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027310for h in `(cd $srcdir;echo Python/thread_*.h)`
27311do
27312 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27313done
27314
Michael W. Hudson54241132001-12-07 15:38:26 +000027315
Neal Norwitzd24499d2005-12-18 21:36:39 +000027316SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027317{ echo "$as_me:$LINENO: checking for build directories" >&5
27318echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027319for dir in $SRCDIRS; do
27320 if test ! -d $dir; then
27321 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027322 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027323done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027324{ echo "$as_me:$LINENO: result: done" >&5
27325echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027326
Guido van Rossum627b2d71993-12-24 10:39:16 +000027327# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027328ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027329
Martin v. Löwis11437992002-04-12 09:54:03 +000027330cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027331# This file is a shell script that caches the results of configure
27332# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027333# scripts and configure runs, see configure's option --config-cache.
27334# It is not useful on other systems. If it contains results you don't
27335# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027336#
Martin v. Löwis11437992002-04-12 09:54:03 +000027337# config.status only pays attention to the cache file if you give it
27338# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027339#
Skip Montanaro6dead952003-09-25 14:50:04 +000027340# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027341# loading this file, other *unset* `ac_cv_foo' will be assigned the
27342# following values.
27343
27344_ACEOF
27345
Guido van Rossumf78abae1997-01-21 22:02:36 +000027346# The following way of writing the cache mishandles newlines in values,
27347# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027348# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027349# Ultrix sh set writes to stderr and can't be redirected directly,
27350# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027351(
27352 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27353 eval ac_val=\$$ac_var
27354 case $ac_val in #(
27355 *${as_nl}*)
27356 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027357 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27358echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027359 esac
27360 case $ac_var in #(
27361 _ | IFS | as_nl) ;; #(
27362 *) $as_unset $ac_var ;;
27363 esac ;;
27364 esac
27365 done
27366
Martin v. Löwis11437992002-04-12 09:54:03 +000027367 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027368 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27369 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027370 # `set' does not quote correctly, so add quotes (double-quote
27371 # substitution turns \\\\ into \\, and sed turns \\ into \).
27372 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027373 "s/'/'\\\\''/g;
27374 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027375 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027376 *)
27377 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027379 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027380 esac |
27381 sort
27382) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027383 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027384 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027385 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027386 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027387 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27388 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027389 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27390 :end' >>confcache
27391if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27392 if test -w "$cache_file"; then
27393 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027394 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27395echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027396 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027397 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027398 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27399echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027400 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027401fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027402rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027403
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027404test "x$prefix" = xNONE && prefix=$ac_default_prefix
27405# Let make expand exec_prefix.
27406test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027408DEFS=-DHAVE_CONFIG_H
27409
Skip Montanaro6dead952003-09-25 14:50:04 +000027410ac_libobjs=
27411ac_ltlibobjs=
27412for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27413 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027414 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027415 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027416 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27417 # will be set to the directory where LIBOBJS objects are built.
27418 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27419 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027420done
27421LIBOBJS=$ac_libobjs
27422
27423LTLIBOBJS=$ac_ltlibobjs
27424
27425
Martin v. Löwis11437992002-04-12 09:54:03 +000027426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027427: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027428ac_clean_files_save=$ac_clean_files
27429ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027430{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27431echo "$as_me: creating $CONFIG_STATUS" >&6;}
27432cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027433#! $SHELL
27434# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027435# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027436# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027437# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027438
Martin v. Löwis11437992002-04-12 09:54:03 +000027439debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027440ac_cs_recheck=false
27441ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027442SHELL=\${CONFIG_SHELL-$SHELL}
27443_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027444
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027445cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027446## --------------------- ##
27447## M4sh Initialization. ##
27448## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027450# Be more Bourne compatible
27451DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027452if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27453 emulate sh
27454 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027456 # is contrary to our usage. Disable this feature.
27457 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027458 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027459else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027460 case `(set -o) 2>/dev/null` in
27461 *posix*) set -o posix ;;
27462esac
27463
Michael W. Hudson54241132001-12-07 15:38:26 +000027464fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027465
27466
Michael W. Hudson54241132001-12-07 15:38:26 +000027467
Michael W. Hudson54241132001-12-07 15:38:26 +000027468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027469# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027470# Avoid depending upon Character Ranges.
27471as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27472as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27473as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27474as_cr_digits='0123456789'
27475as_cr_alnum=$as_cr_Letters$as_cr_digits
27476
27477# The user is always right.
27478if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027479 echo "#! /bin/sh" >conf$$.sh
27480 echo "exit 0" >>conf$$.sh
27481 chmod +x conf$$.sh
27482 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27483 PATH_SEPARATOR=';'
27484 else
27485 PATH_SEPARATOR=:
27486 fi
27487 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027488fi
27489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027490# Support unset when possible.
27491if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27492 as_unset=unset
27493else
27494 as_unset=false
27495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027497
27498# IFS
27499# We need space, tab and new line, in precisely that order. Quoting is
27500# there to prevent editors from complaining about space-tab.
27501# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27502# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027503as_nl='
27504'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027505IFS=" "" $as_nl"
27506
27507# Find who we are. Look in the path if we contain no directory separator.
27508case $0 in
27509 *[\\/]* ) as_myself=$0 ;;
27510 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027511for as_dir in $PATH
27512do
27513 IFS=$as_save_IFS
27514 test -z "$as_dir" && as_dir=.
27515 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27516done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027517IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027519 ;;
27520esac
27521# We did not find ourselves, most probably we were run as `sh COMMAND'
27522# in which case we are not to be found in the path.
27523if test "x$as_myself" = x; then
27524 as_myself=$0
27525fi
27526if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027527 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027528 { (exit 1); exit 1; }
27529fi
27530
27531# Work around bugs in pre-3.0 UWIN ksh.
27532for as_var in ENV MAIL MAILPATH
27533do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27534done
27535PS1='$ '
27536PS2='> '
27537PS4='+ '
27538
27539# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027540for as_var in \
27541 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27542 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27543 LC_TELEPHONE LC_TIME
27544do
27545 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27546 eval $as_var=C; export $as_var
27547 else
27548 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27549 fi
27550done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027551
27552# Required to use basename.
27553if expr a : '\(a\)' >/dev/null 2>&1 &&
27554 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27555 as_expr=expr
27556else
27557 as_expr=false
27558fi
27559
27560if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27561 as_basename=basename
27562else
27563 as_basename=false
27564fi
27565
27566
27567# Name of the executable.
27568as_me=`$as_basename -- "$0" ||
27569$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27570 X"$0" : 'X\(//\)$' \| \
27571 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027572echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027573 sed '/^.*\/\([^/][^/]*\)\/*$/{
27574 s//\1/
27575 q
27576 }
27577 /^X\/\(\/\/\)$/{
27578 s//\1/
27579 q
27580 }
27581 /^X\/\(\/\).*/{
27582 s//\1/
27583 q
27584 }
27585 s/.*/./; q'`
27586
27587# CDPATH.
27588$as_unset CDPATH
27589
27590
27591
Martin v. Löwis11437992002-04-12 09:54:03 +000027592 as_lineno_1=$LINENO
27593 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027594 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027595 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027596
Martin v. Löwis11437992002-04-12 09:54:03 +000027597 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27598 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027599 # line-number line after each line using $LINENO; the second 'sed'
27600 # does the real work. The second script uses 'N' to pair each
27601 # line-number line with the line containing $LINENO, and appends
27602 # trailing '-' during substitution so that $LINENO is not a special
27603 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027604 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027605 # scripts with optimization help from Paolo Bonzini. Blame Lee
27606 # E. McMahon (1931-1989) for sed's syntax. :-)
27607 sed -n '
27608 p
27609 /[$]LINENO/=
27610 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027611 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027612 s/[$]LINENO.*/&-/
27613 t lineno
27614 b
27615 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027616 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027617 :loop
27618 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027619 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027620 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027621 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027622 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027623 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027624 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027625
Martin v. Löwis11437992002-04-12 09:54:03 +000027626 # Don't try to exec as it changes $[0], causing all sort of problems
27627 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027628 # original and so on. Autoconf is especially sensitive to this).
27629 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027630 # Exit status is that of the last command.
27631 exit
27632}
27633
27634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027635if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27636 as_dirname=dirname
27637else
27638 as_dirname=false
27639fi
27640
27641ECHO_C= ECHO_N= ECHO_T=
27642case `echo -n x` in
27643-n*)
27644 case `echo 'x\c'` in
27645 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27646 *) ECHO_C='\c';;
27647 esac;;
27648*)
27649 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027652if expr a : '\(a\)' >/dev/null 2>&1 &&
27653 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027654 as_expr=expr
27655else
27656 as_expr=false
27657fi
27658
27659rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027660if test -d conf$$.dir; then
27661 rm -f conf$$.dir/conf$$.file
27662else
27663 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027664 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027665fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027666echo >conf$$.file
27667if ln -s conf$$.file conf$$ 2>/dev/null; then
27668 as_ln_s='ln -s'
27669 # ... but there are two gotchas:
27670 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27671 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27672 # In both cases, we have to default to `cp -p'.
27673 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027674 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027675elif ln conf$$.file conf$$ 2>/dev/null; then
27676 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027677else
27678 as_ln_s='cp -p'
27679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027680rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27681rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027682
Skip Montanaro6dead952003-09-25 14:50:04 +000027683if mkdir -p . 2>/dev/null; then
27684 as_mkdir_p=:
27685else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027686 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027687 as_mkdir_p=false
27688fi
27689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027690if test -x / >/dev/null 2>&1; then
27691 as_test_x='test -x'
27692else
27693 if ls -dL / >/dev/null 2>&1; then
27694 as_ls_L_option=L
27695 else
27696 as_ls_L_option=
27697 fi
27698 as_test_x='
27699 eval sh -c '\''
27700 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027701 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027702 else
27703 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027704 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027705 esac;
27706 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27707 ???[sx]*):;;*)false;;esac;fi
27708 '\'' sh
27709 '
27710fi
27711as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027712
27713# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027714as_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 +000027715
27716# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027717as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027718
27719
Martin v. Löwis11437992002-04-12 09:54:03 +000027720exec 6>&1
27721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027722# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027723# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027724# values after options handling.
27725ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027726This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027727generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027728
27729 CONFIG_FILES = $CONFIG_FILES
27730 CONFIG_HEADERS = $CONFIG_HEADERS
27731 CONFIG_LINKS = $CONFIG_LINKS
27732 CONFIG_COMMANDS = $CONFIG_COMMANDS
27733 $ $0 $@
27734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027735on `(hostname || uname -n) 2>/dev/null | sed 1q`
27736"
27737
Martin v. Löwis11437992002-04-12 09:54:03 +000027738_ACEOF
27739
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027740cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027741# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027742config_files="$ac_config_files"
27743config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027745_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027747cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027748ac_cs_usage="\
27749\`$as_me' instantiates files from templates according to the
27750current configuration.
27751
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027752Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027753
27754 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027755 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027756 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027757 -d, --debug don't remove temporary files
27758 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027759 --file=FILE[:TEMPLATE]
27760 instantiate the configuration file FILE
27761 --header=FILE[:TEMPLATE]
27762 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027763
27764Configuration files:
27765$config_files
27766
27767Configuration headers:
27768$config_headers
27769
27770Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027772_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027773cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027774ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027775python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027776configured by $0, generated by GNU Autoconf 2.61,
27777 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027778
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027779Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027780This config.status script is free software; the Free Software Foundation
27781gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027782
27783ac_pwd='$ac_pwd'
27784srcdir='$srcdir'
27785INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027786_ACEOF
27787
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027788cat >>$CONFIG_STATUS <<\_ACEOF
27789# If no file are specified by the user, then we need to provide default
27790# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027791ac_need_defaults=:
27792while test $# != 0
27793do
27794 case $1 in
27795 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027796 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27797 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027798 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027799 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027800 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027801 ac_option=$1
27802 ac_optarg=$2
27803 ac_shift=shift
27804 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027805 esac
27806
Skip Montanaro6dead952003-09-25 14:50:04 +000027807 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027808 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027809 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27810 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027811 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027812 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027813 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027814 debug=: ;;
27815 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027816 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027817 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027818 ac_need_defaults=false;;
27819 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027820 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027821 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027822 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027823 --he | --h)
27824 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027825 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027826Try \`$0 --help' for more information." >&2
27827 { (exit 1); exit 1; }; };;
27828 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027829 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027830 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27831 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27832 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027833
27834 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027835 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027836Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027837 { (exit 1); exit 1; }; } ;;
27838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027839 *) ac_config_targets="$ac_config_targets $1"
27840 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027841
27842 esac
27843 shift
27844done
27845
Skip Montanaro6dead952003-09-25 14:50:04 +000027846ac_configure_extra_args=
27847
27848if $ac_cs_silent; then
27849 exec 6>/dev/null
27850 ac_configure_extra_args="$ac_configure_extra_args --silent"
27851fi
27852
27853_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027854cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027855if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027856 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27857 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027859 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027860fi
27861
Martin v. Löwis11437992002-04-12 09:54:03 +000027862_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027863cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027864exec 5>>config.log
27865{
27866 echo
27867 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27868## Running $as_me. ##
27869_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027870 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027873_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027874cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027876
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027877cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027878
27879# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027880for ac_config_target in $ac_config_targets
27881do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027882 case $ac_config_target in
27883 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27884 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27885 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027886 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27887 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027888 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27889 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027890 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027891
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027892 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27893echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027894 { (exit 1); exit 1; }; };;
27895 esac
27896done
27897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027898
Martin v. Löwis11437992002-04-12 09:54:03 +000027899# If the user did not use the arguments to specify the items to instantiate,
27900# then the envvar interface is used. Set only those that are not.
27901# We use the long form for the default assignment because of an extremely
27902# bizarre bug on SunOS 4.1.3.
27903if $ac_need_defaults; then
27904 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27905 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27906fi
27907
Skip Montanaro6dead952003-09-25 14:50:04 +000027908# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027910# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027911# Hook for its removal unless debugging.
27912# Note that there is a small window in which the directory will not be cleaned:
27913# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027914$debug ||
27915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027916 tmp=
27917 trap 'exit_status=$?
27918 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27919' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027920 trap '{ (exit 1); exit 1; }' 1 2 13 15
27921}
Martin v. Löwis11437992002-04-12 09:54:03 +000027922# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027923
Martin v. Löwis11437992002-04-12 09:54:03 +000027924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027925 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027926 test -n "$tmp" && test -d "$tmp"
27927} ||
27928{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027929 tmp=./conf$$-$RANDOM
27930 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027931} ||
27932{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027933 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027934 { (exit 1); exit 1; }
27935}
27936
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027937#
27938# Set up the sed scripts for CONFIG_FILES section.
27939#
27940
27941# No need to generate the scripts if there are no CONFIG_FILES.
27942# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027943if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027944
27945_ACEOF
27946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027947
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027949ac_delim='%!_!# '
27950for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027951 cat >conf$$subs.sed <<_ACEOF
27952SHELL!$SHELL$ac_delim
27953PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27954PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27955PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27956PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27957PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27958PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27959exec_prefix!$exec_prefix$ac_delim
27960prefix!$prefix$ac_delim
27961program_transform_name!$program_transform_name$ac_delim
27962bindir!$bindir$ac_delim
27963sbindir!$sbindir$ac_delim
27964libexecdir!$libexecdir$ac_delim
27965datarootdir!$datarootdir$ac_delim
27966datadir!$datadir$ac_delim
27967sysconfdir!$sysconfdir$ac_delim
27968sharedstatedir!$sharedstatedir$ac_delim
27969localstatedir!$localstatedir$ac_delim
27970includedir!$includedir$ac_delim
27971oldincludedir!$oldincludedir$ac_delim
27972docdir!$docdir$ac_delim
27973infodir!$infodir$ac_delim
27974htmldir!$htmldir$ac_delim
27975dvidir!$dvidir$ac_delim
27976pdfdir!$pdfdir$ac_delim
27977psdir!$psdir$ac_delim
27978libdir!$libdir$ac_delim
27979localedir!$localedir$ac_delim
27980mandir!$mandir$ac_delim
27981DEFS!$DEFS$ac_delim
27982ECHO_C!$ECHO_C$ac_delim
27983ECHO_N!$ECHO_N$ac_delim
27984ECHO_T!$ECHO_T$ac_delim
27985LIBS!$LIBS$ac_delim
27986build_alias!$build_alias$ac_delim
27987host_alias!$host_alias$ac_delim
27988target_alias!$target_alias$ac_delim
27989VERSION!$VERSION$ac_delim
27990SOVERSION!$SOVERSION$ac_delim
27991CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27992UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27993ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027994LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027995PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27996PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27997PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27998PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27999PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28000FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28001FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28002FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28003FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28004FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
28005MACHDEP!$MACHDEP$ac_delim
28006SGI_ABI!$SGI_ABI$ac_delim
28007CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28008EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28009CC!$CC$ac_delim
28010CFLAGS!$CFLAGS$ac_delim
28011LDFLAGS!$LDFLAGS$ac_delim
28012CPPFLAGS!$CPPFLAGS$ac_delim
28013ac_ct_CC!$ac_ct_CC$ac_delim
28014EXEEXT!$EXEEXT$ac_delim
28015OBJEXT!$OBJEXT$ac_delim
28016CXX!$CXX$ac_delim
28017MAINCC!$MAINCC$ac_delim
28018CPP!$CPP$ac_delim
28019GREP!$GREP$ac_delim
28020EGREP!$EGREP$ac_delim
28021BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28022LIBRARY!$LIBRARY$ac_delim
28023LDLIBRARY!$LDLIBRARY$ac_delim
28024DLLLIBRARY!$DLLLIBRARY$ac_delim
28025BLDLIBRARY!$BLDLIBRARY$ac_delim
28026LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28027INSTSONAME!$INSTSONAME$ac_delim
28028RUNSHARED!$RUNSHARED$ac_delim
28029LINKCC!$LINKCC$ac_delim
28030GNULD!$GNULD$ac_delim
28031RANLIB!$RANLIB$ac_delim
28032AR!$AR$ac_delim
28033ARFLAGS!$ARFLAGS$ac_delim
28034SVNVERSION!$SVNVERSION$ac_delim
28035INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28036INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28037INSTALL_DATA!$INSTALL_DATA$ac_delim
28038LN!$LN$ac_delim
28039OPT!$OPT$ac_delim
28040BASECFLAGS!$BASECFLAGS$ac_delim
28041UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28042OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28043LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28044SO!$SO$ac_delim
28045LDSHARED!$LDSHARED$ac_delim
28046BLDSHARED!$BLDSHARED$ac_delim
28047CCSHARED!$CCSHARED$ac_delim
28048LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028049_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028050
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028051 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028052 break
28053 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028054 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28055echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028056 { (exit 1); exit 1; }; }
28057 else
28058 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028059 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028060done
28061
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028062ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28063if test -n "$ac_eof"; then
28064 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28065 ac_eof=`expr $ac_eof + 1`
28066fi
28067
28068cat >>$CONFIG_STATUS <<_ACEOF
28069cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28070/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028071_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028072sed '
28073s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28074s/^/s,@/; s/!/@,|#_!!_#|/
28075:n
28076t n
28077s/'"$ac_delim"'$/,g/; t
28078s/$/\\/; p
28079N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28080' >>$CONFIG_STATUS <conf$$subs.sed
28081rm -f conf$$subs.sed
28082cat >>$CONFIG_STATUS <<_ACEOF
28083CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028084_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028085
28086
28087ac_delim='%!_!# '
28088for ac_last_try in false false false false false :; do
28089 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000028090CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028091SHLIBS!$SHLIBS$ac_delim
Benjamin Petersond78735d2010-01-01 16:04:23 +000028092PKG_CONFIG!$PKG_CONFIG$ac_delim
28093LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028094USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28095SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28096USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28097LDLAST!$LDLAST$ac_delim
28098THREADOBJ!$THREADOBJ$ac_delim
28099DLINCLDIR!$DLINCLDIR$ac_delim
28100DYNLOADFILE!$DYNLOADFILE$ac_delim
28101MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28102TRUE!$TRUE$ac_delim
28103LIBOBJS!$LIBOBJS$ac_delim
28104HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28105HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28106HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28107HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28108HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28109LIBM!$LIBM$ac_delim
28110LIBC!$LIBC$ac_delim
28111THREADHEADERS!$THREADHEADERS$ac_delim
28112SRCDIRS!$SRCDIRS$ac_delim
28113LTLIBOBJS!$LTLIBOBJS$ac_delim
28114_ACEOF
28115
Benjamin Petersond78735d2010-01-01 16:04:23 +000028116 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028117 break
28118 elif $ac_last_try; then
28119 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28120echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028121 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028122 else
28123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28124 fi
28125done
28126
28127ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28128if test -n "$ac_eof"; then
28129 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28130 ac_eof=`expr $ac_eof + 1`
28131fi
28132
28133cat >>$CONFIG_STATUS <<_ACEOF
28134cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28135/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028136_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028137sed '
28138s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28139s/^/s,@/; s/!/@,|#_!!_#|/
28140:n
28141t n
28142s/'"$ac_delim"'$/,g/; t
28143s/$/\\/; p
28144N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28145' >>$CONFIG_STATUS <conf$$subs.sed
28146rm -f conf$$subs.sed
28147cat >>$CONFIG_STATUS <<_ACEOF
28148:end
28149s/|#_!!_#|//g
28150CEOF$ac_eof
28151_ACEOF
28152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028153
28154# VPATH may cause trouble with some makes, so we remove $(srcdir),
28155# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28156# trailing colons and then remove the whole line if VPATH becomes empty
28157# (actually we leave an empty line to preserve line numbers).
28158if test "x$srcdir" = x.; then
28159 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28160s/:*\$(srcdir):*/:/
28161s/:*\${srcdir}:*/:/
28162s/:*@srcdir@:*/:/
28163s/^\([^=]*=[ ]*\):*/\1/
28164s/:*$//
28165s/^[^=]*=[ ]*$//
28166}'
28167fi
28168
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028169cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028170fi # test -n "$CONFIG_FILES"
28171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028173for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028174do
28175 case $ac_tag in
28176 :[FHLC]) ac_mode=$ac_tag; continue;;
28177 esac
28178 case $ac_mode$ac_tag in
28179 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028180 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28181echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028182 { (exit 1); exit 1; }; };;
28183 :[FH]-) ac_tag=-:-;;
28184 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28185 esac
28186 ac_save_IFS=$IFS
28187 IFS=:
28188 set x $ac_tag
28189 IFS=$ac_save_IFS
28190 shift
28191 ac_file=$1
28192 shift
28193
28194 case $ac_mode in
28195 :L) ac_source=$1;;
28196 :[FH])
28197 ac_file_inputs=
28198 for ac_f
28199 do
28200 case $ac_f in
28201 -) ac_f="$tmp/stdin";;
28202 *) # Look for the file first in the build tree, then in the source tree
28203 # (if the path is not absolute). The absolute path cannot be DOS-style,
28204 # because $ac_f cannot contain `:'.
28205 test -f "$ac_f" ||
28206 case $ac_f in
28207 [\\/$]*) false;;
28208 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28209 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028210 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28211echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028212 { (exit 1); exit 1; }; };;
28213 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028214 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028215 done
28216
28217 # Let's still pretend it is `configure' which instantiates (i.e., don't
28218 # use $as_me), people would be surprised to read:
28219 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028220 configure_input="Generated from "`IFS=:
28221 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028222 if test x"$ac_file" != x-; then
28223 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028224 { echo "$as_me:$LINENO: creating $ac_file" >&5
28225echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028226 fi
28227
28228 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028229 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028230 esac
28231 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028232 esac
28233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028234 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028235$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028236 X"$ac_file" : 'X\(//\)[^/]' \| \
28237 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028238 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028239echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028240 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28241 s//\1/
28242 q
28243 }
28244 /^X\(\/\/\)[^/].*/{
28245 s//\1/
28246 q
28247 }
28248 /^X\(\/\/\)$/{
28249 s//\1/
28250 q
28251 }
28252 /^X\(\/\).*/{
28253 s//\1/
28254 q
28255 }
28256 s/.*/./; q'`
28257 { as_dir="$ac_dir"
28258 case $as_dir in #(
28259 -*) as_dir=./$as_dir;;
28260 esac
28261 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028262 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028263 while :; do
28264 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028265 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028266 *) as_qdir=$as_dir;;
28267 esac
28268 as_dirs="'$as_qdir' $as_dirs"
28269 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028270$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028271 X"$as_dir" : 'X\(//\)[^/]' \| \
28272 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028273 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028274echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028275 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28276 s//\1/
28277 q
28278 }
28279 /^X\(\/\/\)[^/].*/{
28280 s//\1/
28281 q
28282 }
28283 /^X\(\/\/\)$/{
28284 s//\1/
28285 q
28286 }
28287 /^X\(\/\).*/{
28288 s//\1/
28289 q
28290 }
28291 s/.*/./; q'`
28292 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028293 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028294 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028295 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28296echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028297 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028298 ac_builddir=.
28299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028300case "$ac_dir" in
28301.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28302*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028303 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028304 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028305 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028306 case $ac_top_builddir_sub in
28307 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28308 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28309 esac ;;
28310esac
28311ac_abs_top_builddir=$ac_pwd
28312ac_abs_builddir=$ac_pwd$ac_dir_suffix
28313# for backward compatibility:
28314ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028315
28316case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028317 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028318 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028319 ac_top_srcdir=$ac_top_builddir_sub
28320 ac_abs_top_srcdir=$ac_pwd ;;
28321 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028322 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028323 ac_top_srcdir=$srcdir
28324 ac_abs_top_srcdir=$srcdir ;;
28325 *) # Relative name.
28326 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28327 ac_top_srcdir=$ac_top_build_prefix$srcdir
28328 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028329esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028330ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028331
Martin v. Löwis11437992002-04-12 09:54:03 +000028332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028333 case $ac_mode in
28334 :F)
28335 #
28336 # CONFIG_FILE
28337 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028338
28339 case $INSTALL in
28340 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028341 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028342 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028344
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028345cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028346# If the template does not know about datarootdir, expand it.
28347# FIXME: This hack should be removed a few years after 2.60.
28348ac_datarootdir_hack=; ac_datarootdir_seen=
28349
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028350case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028351 p
28352 q
28353}
28354/@datadir@/p
28355/@docdir@/p
28356/@infodir@/p
28357/@localedir@/p
28358/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028359' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028360*datarootdir*) ac_datarootdir_seen=yes;;
28361*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028362 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28363echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028364_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028365cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028366 ac_datarootdir_hack='
28367 s&@datadir@&$datadir&g
28368 s&@docdir@&$docdir&g
28369 s&@infodir@&$infodir&g
28370 s&@localedir@&$localedir&g
28371 s&@mandir@&$mandir&g
28372 s&\\\${datarootdir}&$datarootdir&g' ;;
28373esac
28374_ACEOF
28375
28376# Neutralize VPATH when `$srcdir' = `.'.
28377# Shell code in configure.ac might set extrasub.
28378# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028379cat >>$CONFIG_STATUS <<_ACEOF
28380 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028381$extrasub
28382_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028383cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028384:t
28385/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028386s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028387s&@top_builddir@&$ac_top_builddir_sub&;t t
28388s&@srcdir@&$ac_srcdir&;t t
28389s&@abs_srcdir@&$ac_abs_srcdir&;t t
28390s&@top_srcdir@&$ac_top_srcdir&;t t
28391s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28392s&@builddir@&$ac_builddir&;t t
28393s&@abs_builddir@&$ac_abs_builddir&;t t
28394s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28395s&@INSTALL@&$ac_INSTALL&;t t
28396$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028397" $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 +000028398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028399test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28400 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28401 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028402 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028403which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028404echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028405which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028407 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028408 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028409 -) cat "$tmp/out"; rm -f "$tmp/out";;
28410 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28411 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028412 ;;
28413 :H)
28414 #
28415 # CONFIG_HEADER
28416 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028417_ACEOF
28418
28419# Transform confdefs.h into a sed script `conftest.defines', that
28420# substitutes the proper values into config.h.in to produce config.h.
28421rm -f conftest.defines conftest.tail
28422# First, append a space to every undef/define line, to ease matching.
28423echo 's/$/ /' >conftest.defines
28424# Then, protect against being on the right side of a sed subst, or in
28425# an unquoted here document, in config.status. If some macros were
28426# called several times there might be several #defines for the same
28427# symbol, which is useless. But do not sort them, since the last
28428# AC_DEFINE must be honored.
28429ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28430# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28431# NAME is the cpp macro being defined, VALUE is the value it is being given.
28432# PARAMS is the parameter list in the macro definition--in most cases, it's
28433# just an empty string.
28434ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28435ac_dB='\\)[ (].*,\\1define\\2'
28436ac_dC=' '
28437ac_dD=' ,'
28438
28439uniq confdefs.h |
28440 sed -n '
28441 t rset
28442 :rset
28443 s/^[ ]*#[ ]*define[ ][ ]*//
28444 t ok
28445 d
28446 :ok
28447 s/[\\&,]/\\&/g
28448 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28449 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28450 ' >>conftest.defines
28451
28452# Remove the space that was appended to ease matching.
28453# Then replace #undef with comments. This is necessary, for
28454# example, in the case of _POSIX_SOURCE, which is predefined and required
28455# on some systems where configure will not decide to define it.
28456# (The regexp can be short, since the line contains either #define or #undef.)
28457echo 's/ $//
28458s,^[ #]*u.*,/* & */,' >>conftest.defines
28459
28460# Break up conftest.defines:
28461ac_max_sed_lines=50
28462
28463# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28464# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28465# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28466# et cetera.
28467ac_in='$ac_file_inputs'
28468ac_out='"$tmp/out1"'
28469ac_nxt='"$tmp/out2"'
28470
28471while :
28472do
28473 # Write a here document:
28474 cat >>$CONFIG_STATUS <<_ACEOF
28475 # First, check the format of the line:
28476 cat >"\$tmp/defines.sed" <<\\CEOF
28477/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28478/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28479b
28480:def
28481_ACEOF
28482 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28483 echo 'CEOF
28484 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28485 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28486 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28487 grep . conftest.tail >/dev/null || break
28488 rm -f conftest.defines
28489 mv conftest.tail conftest.defines
28490done
28491rm -f conftest.defines conftest.tail
28492
28493echo "ac_result=$ac_in" >>$CONFIG_STATUS
28494cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028495 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028496 echo "/* $configure_input */" >"$tmp/config.h"
28497 cat "$ac_result" >>"$tmp/config.h"
28498 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28499 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28500echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028501 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028502 rm -f $ac_file
28503 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028504 fi
28505 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028506 echo "/* $configure_input */"
28507 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028508 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028509 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028510 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028512
28513 esac
28514
28515done # for ac_tag
28516
Guido van Rossum627b2d71993-12-24 10:39:16 +000028517
Martin v. Löwis11437992002-04-12 09:54:03 +000028518{ (exit 0); exit 0; }
28519_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028520chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028521ac_clean_files=$ac_clean_files_save
28522
28523
28524# configure is writing to config.log, and then calls config.status.
28525# config.status does its own redirection, appending to config.log.
28526# Unfortunately, on DOS this fails, as config.log is still kept open
28527# by configure, so config.status won't be able to write to it; its
28528# output is simply discarded. So we exec the FD to /dev/null,
28529# effectively closing config.log, so it can be properly (re)opened and
28530# appended to by config.status. When coming back to configure, we
28531# need to make the FD available again.
28532if test "$no_create" != yes; then
28533 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028534 ac_config_status_args=
28535 test "$silent" = yes &&
28536 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028537 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028538 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028539 exec 5>>config.log
28540 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28541 # would make configure fail if this is the last instruction.
28542 $ac_cs_success || { (exit 1); exit 1; }
28543fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028544
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028545
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028546echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028547if test ! -f Modules/Setup
28548then
28549 cp $srcdir/Modules/Setup.dist Modules/Setup
28550fi
28551
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028552echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028553if test ! -f Modules/Setup.local
28554then
28555 echo "# Edit this file for local setup changes" >Modules/Setup.local
28556fi
28557
28558echo "creating Makefile"
28559$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28560 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028561 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028562mv config.c Modules