blob: 1468ea7cd5a2b27bcfcd92e02ca5931e0bce9dd2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson2df5d282009-12-31 21:22:50 +00002# From configure.in Revision: 77190 .
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
718USE_SIGNAL_MODULE
719SIGNAL_OBJS
720USE_THREAD_MODULE
721LDLAST
722THREADOBJ
723DLINCLDIR
724DYNLOADFILE
725MACHDEP_OBJS
726TRUE
727LIBOBJS
728HAVE_GETHOSTBYNAME_R_6_ARG
729HAVE_GETHOSTBYNAME_R_5_ARG
730HAVE_GETHOSTBYNAME_R_3_ARG
731HAVE_GETHOSTBYNAME_R
732HAVE_GETHOSTBYNAME
733LIBM
734LIBC
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000855 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1079 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001129 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001133# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001159 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 +00001160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001175 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001178 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001185 # Try the directory containing this script, then the parent directory.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001186 ac_confdir=`$as_dirname -- "$0" ||
1187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
1190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1191echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001224 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001250\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
1287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001311 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001318 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-ipv6 Enable ipv6 (with ipv4) support
1325 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001326 --enable-big-digits[=BITS]
1327 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001328
1329Optional Packages:
1330 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1331 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001332 --with-universal-archs=ARCH
1333 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001334 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001335 --with-framework-name=FRAMEWORK
1336 specify an alternate name of the framework built
1337 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001339 --with-cxx-main=<compiler>
1340 compile main() and link python executable with C++
1341 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-suffix=.exe set executable suffix
1343 --with-pydebug build with Py_DEBUG defined
1344 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001345 --with-system-expat build pyexpat module using an installed expat
1346 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001347 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001348 --with-dbmliborder=db1:db2:...
1349 order to check db backends for dbm. Valid value is a
1350 colon separated string with the backend names
1351 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001352 --with-signal-module disable/enable signal module
1353 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1354 --with(out)-threads[=DIRECTORY]
1355 disable/enable thread support
1356 --with(out)-thread[=DIRECTORY]
1357 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001359 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001361 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001363 --with-fpectl enable SIGFPE catching
1364 --with-libm=STRING math library
1365 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001366 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001367 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1368 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandle2e15612009-05-20 18:25:10 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001398 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001444python configure 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001458It was created by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 *\'*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$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 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# 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 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001598 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001600 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001694# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001695if test -n "$CONFIG_SITE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001696 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697elif test "x$prefix" != xNONE; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001703shift
1704for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$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 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Benjamin Petersond23f8222009-04-05 19:13:16 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001832VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001887# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001888if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001889 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001904
Thomas Wouters477c8d52006-05-27 19:21:47 +00001905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001911
1912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001913
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001914
1915
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001917
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001918{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1919echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001920
1921# Check whether --with-universal-archs was given.
1922if test "${with_universal_archs+set}" = set; then
1923 withval=$with_universal_archs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001924 { echo "$as_me:$LINENO: result: $withval" >&5
1925echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001926 UNIVERSAL_ARCHS="$withval"
1927
1928else
1929
Ronald Oussoren74f29b42009-09-20 20:09:26 +00001930 { echo "$as_me:$LINENO: result: 32-bit" >&5
1931echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001932
1933fi
1934
1935
1936
1937
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001938
1939# Check whether --with-framework-name was given.
1940if test "${with_framework_name+set}" = set; then
1941 withval=$with_framework_name;
1942 PYTHONFRAMEWORK=${withval}
1943 PYTHONFRAMEWORKDIR=${withval}.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1945
1946else
1947
1948 PYTHONFRAMEWORK=Python
1949 PYTHONFRAMEWORKDIR=Python.framework
1950 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1951
1952fi
1953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001954# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001955if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001956 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001957 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001959 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001960 esac
1961 case $enableval in
1962 no)
1963 PYTHONFRAMEWORK=
1964 PYTHONFRAMEWORKDIR=no-framework
1965 PYTHONFRAMEWORKPREFIX=
1966 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001967 FRAMEWORKINSTALLFIRST=
1968 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001969 FRAMEWORKALTINSTALLFIRST=
1970 FRAMEWORKALTINSTALLLAST=
1971 if test "x${prefix}" = "xNONE"; then
1972 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1973 else
1974 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1975 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001977 ;;
1978 *)
1979 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001981 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001982 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00001983 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
1984 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001986 if test "x${prefix}" = "xNONE" ; then
1987 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1988 else
1989 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1990 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001991 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001992
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001993 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001995 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001999 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2000
2001 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2002
Jack Jansene578a632001-08-15 01:27:14 +00002003 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002004
Guido van Rossum563e7081996-09-10 18:20:48 +00002005else
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Jack Jansene578a632001-08-15 01:27:14 +00002007 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002008 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORKPREFIX=
2010 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002011 FRAMEWORKINSTALLFIRST=
2012 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002013 FRAMEWORKALTINSTALLFIRST=
2014 FRAMEWORKALTINSTALLLAST=
2015 if test "x${prefix}" = "xNONE" ; then
2016 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2017 else
2018 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2019 fi
Jack Jansene578a632001-08-15 01:27:14 +00002020 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002021
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002023fi
2024
Thomas Wouters477c8d52006-05-27 19:21:47 +00002025
2026
Michael W. Hudson54241132001-12-07 15:38:26 +00002027
2028
2029
2030
Jack Jansene578a632001-08-15 01:27:14 +00002031
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002032
2033
2034
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002035
Jack Jansene578a632001-08-15 01:27:14 +00002036##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002037## AC_HELP_STRING(--with-dyld,
2038## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002039##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002040# Set name for machine-dependent library files
2041
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002042{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2043echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002044if test -z "$MACHDEP"
2045then
Guido van Rossum563e7081996-09-10 18:20:48 +00002046 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002047 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002048 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002049 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002050 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002051 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_md_system=`echo $ac_sys_system |
2054 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2055 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002056 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002057 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002058
Guido van Rossum07397971997-04-29 21:49:50 +00002059 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002060 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002061 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002062 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 esac
2065fi
Guido van Rossum91922671997-10-09 20:24:13 +00002066
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002067# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2068# disable features if it is defined, without any means to access these
2069# features as extensions. For these systems, we skip the definition of
2070# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2071# some feature, make sure there is no alternative way to access this
2072# feature. Also, when using wildcards, make sure you have verified the
2073# need for not defining _XOPEN_SOURCE on all systems matching the
2074# wildcard, and that the wildcard does not include future systems
2075# (which may remove their limitations).
2076case $ac_sys_system/$ac_sys_release in
2077 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2078 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002079 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002080 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002081 define_xopen_source=no
2082 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2083 # also defined. This can be overridden by defining _BSD_SOURCE
2084 # As this has a different meaning on Linux, only define it on OpenBSD
2085
2086cat >>confdefs.h <<\_ACEOF
2087#define _BSD_SOURCE 1
2088_ACEOF
2089
2090 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002091 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2092 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2093 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002094 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 +00002095 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002096 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2097 # of union __?sigval. Reported by Stuart Bishop.
2098 SunOS/5.6)
2099 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002100 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2101 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002102 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002103 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002104 define_xopen_source=no;;
2105 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002106 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002108 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002109 # On FreeBSD 4, the math functions C89 does not cover are never defined
2110 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2111 FreeBSD/4.*)
2112 define_xopen_source=no;;
2113 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2114 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2115 # identifies itself as Darwin/7.*
2116 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2117 # disables platform specific features beyond repair.
2118 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2119 # has no effect, don't bother defining them
2120 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002122 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2123 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2124 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002125 AIX/4)
2126 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002127 AIX/5)
2128 if test `uname -r` -eq 1; then
2129 define_xopen_source=no
2130 fi
2131 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002132 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2133 # defining NI_NUMERICHOST.
2134 QNX/6.3.2)
2135 define_xopen_source=no
2136 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002137
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002138esac
2139
2140if test $define_xopen_source = yes
2141then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002142 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2143 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002144 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2145 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002146 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002147 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148
2149cat >>confdefs.h <<\_ACEOF
2150#define _XOPEN_SOURCE 500
2151_ACEOF
2152
2153 ;;
2154 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002155
2156cat >>confdefs.h <<\_ACEOF
2157#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002158_ACEOF
2159
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 ;;
2161 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002162
2163 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2164 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2165 # several APIs are not declared. Since this is also needed in some
2166 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # except for Solaris 10, where it must not be defined,
2168 # as it implies XPG4.2
2169 case $ac_sys_system/$ac_sys_release in
2170 SunOS/5.10)
2171 ;;
2172 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002173
2174cat >>confdefs.h <<\_ACEOF
2175#define _XOPEN_SOURCE_EXTENDED 1
2176_ACEOF
2177
Martin v. Löwis7dece662005-11-26 11:38:24 +00002178 ;;
2179 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002181
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182cat >>confdefs.h <<\_ACEOF
2183#define _POSIX_C_SOURCE 200112L
2184_ACEOF
2185
2186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187fi
2188
Guido van Rossum91922671997-10-09 20:24:13 +00002189#
2190# SGI compilers allow the specification of the both the ABI and the
2191# ISA on the command line. Depending on the values of these switches,
2192# different and often incompatable code will be generated.
2193#
2194# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2195# thus supply support for various ABI/ISA combinations. The MACHDEP
2196# variable is also adjusted.
2197#
2198
2199if test ! -z "$SGI_ABI"
2200then
2201 CC="cc $SGI_ABI"
2202 LDFLAGS="$SGI_ABI $LDFLAGS"
2203 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2204fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002205{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2206echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207
Jack Jansen6b08a402004-06-03 12:41:45 +00002208# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2209# it may influence the way we can build extensions, so distutils
2210# needs to check it
2211
Thomas Wouters477c8d52006-05-27 19:21:47 +00002212
Jack Jansen6b08a402004-06-03 12:41:45 +00002213CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002214EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002215
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002216{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2217echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002218ac_sys_machine=`uname -m`
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002219{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2220echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002221
Guido van Rossum627b2d71993-12-24 10:39:16 +00002222# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002223
2224# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2225# for debug/optimization stuff. BASECFLAGS is for flags that are required
2226# just to get things to compile and link. Users are free to override OPT
2227# when running configure or make. The build should not break if they do.
2228# BASECFLAGS should generally not be messed with, however.
2229
2230# XXX shouldn't some/most/all of this code be merged with the stuff later
2231# on that fiddles with OPT and BASECFLAGS?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002232{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2233echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002235# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002236if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002237 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002238 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002239 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002240 without_gcc=yes;;
2241 yes) CC=gcc
2242 without_gcc=no;;
2243 *) CC=$withval
2244 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002246else
Martin v. Löwis11437992002-04-12 09:54:03 +00002247
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002248 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002249 AIX*) CC=cc_r
2250 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002251 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002252 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002253fi
2254
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002255{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2256echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002257
Guido van Rossum8b131c51995-03-09 14:10:13 +00002258# If the user switches compilers, we can't believe the cache
2259if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2260then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002261 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002262(it is also a good idea to do 'make clean' before compiling)" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002263echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002264(it is also a good idea to do 'make clean' before compiling)" >&2;}
2265 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002266fi
2267
Martin v. Löwis11437992002-04-12 09:54:03 +00002268ac_ext=c
2269ac_cpp='$CPP $CPPFLAGS'
2270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2272ac_compiler_gnu=$ac_cv_c_compiler_gnu
2273if test -n "$ac_tool_prefix"; then
2274 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2275set dummy ${ac_tool_prefix}gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002276{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2277echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002278if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002279 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002280else
2281 if test -n "$CC"; then
2282 ac_cv_prog_CC="$CC" # Let the user override the test.
2283else
Martin v. Löwis11437992002-04-12 09:54:03 +00002284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2285for as_dir in $PATH
2286do
2287 IFS=$as_save_IFS
2288 test -z "$as_dir" && as_dir=.
2289 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002290 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 +00002291 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002292 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 break 2
2294 fi
2295done
2296done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002297IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002298
Jack Jansendd19cf82001-12-06 22:36:17 +00002299fi
2300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002301CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002302if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002303 { echo "$as_me:$LINENO: result: $CC" >&5
2304echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002305else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002306 { echo "$as_me:$LINENO: result: no" >&5
2307echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002308fi
2309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002310
Martin v. Löwis11437992002-04-12 09:54:03 +00002311fi
2312if test -z "$ac_cv_prog_CC"; then
2313 ac_ct_CC=$CC
2314 # Extract the first word of "gcc", so it can be a program name with args.
2315set dummy gcc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002316{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2317echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002318if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002319 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002320else
2321 if test -n "$ac_ct_CC"; then
2322 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2323else
2324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2325for as_dir in $PATH
2326do
2327 IFS=$as_save_IFS
2328 test -z "$as_dir" && as_dir=.
2329 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002330 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 +00002331 ac_cv_prog_ac_ct_CC="gcc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002332 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002333 break 2
2334 fi
2335done
2336done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002338
2339fi
2340fi
2341ac_ct_CC=$ac_cv_prog_ac_ct_CC
2342if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002343 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2344echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002346 { echo "$as_me:$LINENO: result: no" >&5
2347echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002348fi
2349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350 if test "x$ac_ct_CC" = x; then
2351 CC=""
2352 else
2353 case $cross_compiling:$ac_tool_warned in
2354yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002355{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2356whose name does not start with the host triplet. If you think this
2357configuration is useful to you, please write to autoconf@gnu.org." >&5
2358echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2359whose name does not start with the host triplet. If you think this
2360configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361ac_tool_warned=yes ;;
2362esac
2363 CC=$ac_ct_CC
2364 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002365else
2366 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002367fi
2368
Jack Jansendd19cf82001-12-06 22:36:17 +00002369if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370 if test -n "$ac_tool_prefix"; then
2371 # 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 +00002372set dummy ${ac_tool_prefix}cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002373{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002375if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002376 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002377else
2378 if test -n "$CC"; then
2379 ac_cv_prog_CC="$CC" # Let the user override the test.
2380else
Martin v. Löwis11437992002-04-12 09:54:03 +00002381as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2382for as_dir in $PATH
2383do
2384 IFS=$as_save_IFS
2385 test -z "$as_dir" && as_dir=.
2386 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387 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 +00002388 ac_cv_prog_CC="${ac_tool_prefix}cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002389 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 break 2
2391 fi
2392done
2393done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396fi
2397fi
2398CC=$ac_cv_prog_CC
2399if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002400 { echo "$as_me:$LINENO: result: $CC" >&5
2401echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002402else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002403 { echo "$as_me:$LINENO: result: no" >&5
2404echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405fi
2406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002409fi
2410if test -z "$CC"; then
2411 # Extract the first word of "cc", so it can be a program name with args.
2412set dummy cc; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002413{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2414echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002415if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002416 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002417else
2418 if test -n "$CC"; then
2419 ac_cv_prog_CC="$CC" # Let the user override the test.
2420else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2423for as_dir in $PATH
2424do
2425 IFS=$as_save_IFS
2426 test -z "$as_dir" && as_dir=.
2427 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428 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 +00002429 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2430 ac_prog_rejected=yes
2431 continue
2432 fi
2433 ac_cv_prog_CC="cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002434 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002435 break 2
2436 fi
2437done
2438done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002441if test $ac_prog_rejected = yes; then
2442 # We found a bogon in the path, so make sure we never use it.
2443 set dummy $ac_cv_prog_CC
2444 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002445 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002446 # We chose a different compiler from the bogus one.
2447 # However, it has the same basename, so the bogon will be chosen
2448 # first if we set CC to just the basename; use the full file name.
2449 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002451 fi
2452fi
2453fi
2454fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002455CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002456if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002457 { echo "$as_me:$LINENO: result: $CC" >&5
2458echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002459else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002460 { echo "$as_me:$LINENO: result: no" >&5
2461echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462fi
2463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464
Martin v. Löwis11437992002-04-12 09:54:03 +00002465fi
2466if test -z "$CC"; then
2467 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 do
2470 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2471set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002472{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002474if test "${ac_cv_prog_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002476else
2477 if test -n "$CC"; then
2478 ac_cv_prog_CC="$CC" # Let the user override the test.
2479else
Martin v. Löwis11437992002-04-12 09:54:03 +00002480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2481for as_dir in $PATH
2482do
2483 IFS=$as_save_IFS
2484 test -z "$as_dir" && as_dir=.
2485 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 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 +00002487 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002488 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002491done
2492done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002494
2495fi
2496fi
2497CC=$ac_cv_prog_CC
2498if test -n "$CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002499 { echo "$as_me:$LINENO: result: $CC" >&5
2500echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002502 { echo "$as_me:$LINENO: result: no" >&5
2503echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002504fi
2505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 test -n "$CC" && break
2508 done
2509fi
2510if test -z "$CC"; then
2511 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002513do
2514 # Extract the first word of "$ac_prog", so it can be a program name with args.
2515set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002516{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002518if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002519 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002520else
2521 if test -n "$ac_ct_CC"; then
2522 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2523else
2524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2525for as_dir in $PATH
2526do
2527 IFS=$as_save_IFS
2528 test -z "$as_dir" && as_dir=.
2529 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 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 +00002531 ac_cv_prog_ac_ct_CC="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002532 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 break 2
2534 fi
2535done
2536done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539fi
2540fi
2541ac_ct_CC=$ac_cv_prog_ac_ct_CC
2542if test -n "$ac_ct_CC"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002543 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2544echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002546 { echo "$as_me:$LINENO: result: no" >&5
2547echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002548fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 test -n "$ac_ct_CC" && break
2552done
Michael W. Hudson54241132001-12-07 15:38:26 +00002553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 if test "x$ac_ct_CC" = x; then
2555 CC=""
2556 else
2557 case $cross_compiling:$ac_tool_warned in
2558yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002559{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2560whose name does not start with the host triplet. If you think this
2561configuration is useful to you, please write to autoconf@gnu.org." >&5
2562echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2563whose name does not start with the host triplet. If you think this
2564configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565ac_tool_warned=yes ;;
2566esac
2567 CC=$ac_ct_CC
2568 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002569fi
2570
2571fi
2572
2573
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002574test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002575See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002576echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002577See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002578 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002579
2580# Provide some information about the compiler.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002581echo "$as_me:$LINENO: checking for C compiler version" >&5
2582ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583{ (ac_try="$ac_compiler --version >&5"
2584case "(($ac_try" in
2585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2586 *) ac_try_echo=$ac_try;;
2587esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593{ (ac_try="$ac_compiler -v >&5"
2594case "(($ac_try" in
2595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2596 *) ac_try_echo=$ac_try;;
2597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603{ (ac_try="$ac_compiler -V >&5"
2604case "(($ac_try" in
2605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2606 *) ac_try_echo=$ac_try;;
2607esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 (exit $ac_status); }
2613
2614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002615/* confdefs.h. */
2616_ACEOF
2617cat confdefs.h >>conftest.$ac_ext
2618cat >>conftest.$ac_ext <<_ACEOF
2619/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621int
2622main ()
2623{
2624
2625 ;
2626 return 0;
2627}
2628_ACEOF
2629ac_clean_files_save=$ac_clean_files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002630ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002631# Try to create an executable without -o first, disregard a.out.
2632# It will help us diagnose broken compilers, and finding out an intuition
2633# of exeext.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002634{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2635echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2636ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2637#
2638# List of possible output files, starting from the most likely.
2639# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2640# only as a last resort. b.out is created by i960 compilers.
2641ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2642#
2643# The IRIX 6 linker writes into existing files which may not be
2644# executable, retaining their permissions. Remove them first so a
2645# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646ac_rmfiles=
2647for ac_file in $ac_files
2648do
2649 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002650 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2652 esac
2653done
2654rm -f $ac_rmfiles
2655
2656if { (ac_try="$ac_link_default"
2657case "(($ac_try" in
2658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2659 *) ac_try_echo=$ac_try;;
2660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2667# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2668# in a Makefile. We should not override ac_cv_exeext if it was cached,
2669# so that the user can short-circuit this test for compilers unknown to
2670# Autoconf.
2671for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002672do
2673 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002675 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002676 ;;
2677 [ab].out )
2678 # We found the default executable, but exeext='' is most
2679 # certainly right.
2680 break;;
2681 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2683 then :; else
2684 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2685 fi
2686 # We set ac_cv_exeext here because the later test for it is not
2687 # safe: cross compilers may not add the suffix if given an `-o'
2688 # argument, so we may need to know it at that point already.
2689 # Even if this section looks crufty: it has the advantage of
2690 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002691 break;;
2692 * )
2693 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 esac
2695done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696test "$ac_cv_exeext" = no && ac_cv_exeext=
2697
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002698else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699 ac_file=''
2700fi
2701
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002702{ echo "$as_me:$LINENO: result: $ac_file" >&5
2703echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704if test -z "$ac_file"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002706sed 's/^/| /' conftest.$ac_ext >&5
2707
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002708{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002709See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002710echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002711See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002712 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002713fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002714
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002715ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002718# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002719{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2720echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002721# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2722# If not cross compiling, check that we can run a simple program.
2723if test "$cross_compiling" != yes; then
2724 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 { (case "(($ac_try" in
2726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2727 *) ac_try_echo=$ac_try;;
2728esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 (exit $ac_status); }; }; then
2734 cross_compiling=no
2735 else
2736 if test "$cross_compiling" = maybe; then
2737 cross_compiling=yes
2738 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002739 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002740If you meant to cross compile, use \`--host'.
2741See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002742echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002743If you meant to cross compile, use \`--host'.
2744See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002745 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 fi
2747 fi
2748fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002749{ echo "$as_me:$LINENO: result: yes" >&5
2750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002752rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002753ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002755# the compiler is broken, or we cross compile.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002756{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2757echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2758{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2759echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002760
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002761{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2762echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763if { (ac_try="$ac_link"
2764case "(($ac_try" in
2765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2766 *) ac_try_echo=$ac_try;;
2767esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002773 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2774# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2775# work properly (i.e., refer to `conftest.exe'), while it won't with
2776# `rm'.
2777for ac_file in conftest.exe conftest conftest.*; do
2778 test -f "$ac_file" || continue
2779 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002780 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002781 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2782 break;;
2783 * ) break;;
2784 esac
2785done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002787 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002788See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002789echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002790See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002791 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002792fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002793
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002794rm -f conftest$ac_cv_exeext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002795{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2796echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002797
2798rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002799EXEEXT=$ac_cv_exeext
2800ac_exeext=$EXEEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002801{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2802echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002803if test "${ac_cv_objext+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002804 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002805else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002806 cat >conftest.$ac_ext <<_ACEOF
2807/* confdefs.h. */
2808_ACEOF
2809cat confdefs.h >>conftest.$ac_ext
2810cat >>conftest.$ac_ext <<_ACEOF
2811/* end confdefs.h. */
2812
2813int
2814main ()
2815{
2816
2817 ;
2818 return 0;
2819}
2820_ACEOF
2821rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002822if { (ac_try="$ac_compile"
2823case "(($ac_try" in
2824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825 *) ac_try_echo=$ac_try;;
2826esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002829 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832 for ac_file in conftest.o conftest.obj conftest.*; do
2833 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002834 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002835 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002836 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2837 break;;
2838 esac
2839done
2840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002842sed 's/^/| /' conftest.$ac_ext >&5
2843
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002844{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002845See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002846echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002847See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002848 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002849fi
2850
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002851rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002853{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2854echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002855OBJEXT=$ac_cv_objext
2856ac_objext=$OBJEXT
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002857{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2858echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002859if test "${ac_cv_c_compiler_gnu+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002860 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002861else
2862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002863/* confdefs.h. */
2864_ACEOF
2865cat confdefs.h >>conftest.$ac_ext
2866cat >>conftest.$ac_ext <<_ACEOF
2867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002868
Martin v. Löwis11437992002-04-12 09:54:03 +00002869int
2870main ()
2871{
2872#ifndef __GNUC__
2873 choke me
2874#endif
2875
2876 ;
2877 return 0;
2878}
2879_ACEOF
2880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002881if { (ac_try="$ac_compile"
2882case "(($ac_try" in
2883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2884 *) ac_try_echo=$ac_try;;
2885esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002889 grep -v '^ *+' conftest.er1 >conftest.err
2890 rm -f conftest.er1
2891 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893 (exit $ac_status); } && {
2894 test -z "$ac_c_werror_flag" ||
2895 test ! -s conftest.err
2896 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002897 ac_compiler_gnu=yes
2898else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002900sed 's/^/| /' conftest.$ac_ext >&5
2901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002902 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904
2905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002906ac_cv_c_compiler_gnu=$ac_compiler_gnu
2907
2908fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002909{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2910echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2911GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002912ac_test_CFLAGS=${CFLAGS+set}
2913ac_save_CFLAGS=$CFLAGS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002914{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2915echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916if test "${ac_cv_prog_cc_g+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002918else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002919 ac_save_c_werror_flag=$ac_c_werror_flag
2920 ac_c_werror_flag=yes
2921 ac_cv_prog_cc_g=no
2922 CFLAGS="-g"
2923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Martin v. Löwis11437992002-04-12 09:54:03 +00002930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002955 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002956else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002958sed 's/^/| /' conftest.$ac_ext >&5
2959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002960 CFLAGS=""
2961 cat >conftest.$ac_ext <<_ACEOF
2962/* confdefs.h. */
2963_ACEOF
2964cat confdefs.h >>conftest.$ac_ext
2965cat >>conftest.$ac_ext <<_ACEOF
2966/* end confdefs.h. */
2967
2968int
2969main ()
2970{
2971
2972 ;
2973 return 0;
2974}
2975_ACEOF
2976rm -f conftest.$ac_objext
2977if { (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
2984 ac_status=$?
2985 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
2993 :
2994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00002995 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002996sed 's/^/| /' conftest.$ac_ext >&5
2997
2998 ac_c_werror_flag=$ac_save_c_werror_flag
2999 CFLAGS="-g"
3000 cat >conftest.$ac_ext <<_ACEOF
3001/* confdefs.h. */
3002_ACEOF
3003cat confdefs.h >>conftest.$ac_ext
3004cat >>conftest.$ac_ext <<_ACEOF
3005/* end confdefs.h. */
3006
3007int
3008main ()
3009{
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
3016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022 (eval "$ac_compile") 2>conftest.er1
3023 ac_status=$?
3024 grep -v '^ *+' conftest.er1 >conftest.err
3025 rm -f conftest.er1
3026 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003028 (exit $ac_status); } && {
3029 test -z "$ac_c_werror_flag" ||
3030 test ! -s conftest.err
3031 } && test -s conftest.$ac_objext; then
3032 ac_cv_prog_cc_g=yes
3033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003034 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003035sed 's/^/| /' conftest.$ac_ext >&5
3036
3037
Guido van Rossum627b2d71993-12-24 10:39:16 +00003038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039
3040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042
3043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3044fi
3045
3046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3047 ac_c_werror_flag=$ac_save_c_werror_flag
3048fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003049{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3050echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003051if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003052 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003053elif test $ac_cv_prog_cc_g = yes; then
3054 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055 CFLAGS="-g -O2"
3056 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003057 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058 fi
3059else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003060 if test "$GCC" = yes; then
3061 CFLAGS="-O2"
3062 else
3063 CFLAGS=
3064 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003066{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3067echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068if test "${ac_cv_prog_cc_c89+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003069 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003070else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003072ac_save_CC=$CC
3073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003074/* confdefs.h. */
3075_ACEOF
3076cat confdefs.h >>conftest.$ac_ext
3077cat >>conftest.$ac_ext <<_ACEOF
3078/* end confdefs.h. */
3079#include <stdarg.h>
3080#include <stdio.h>
3081#include <sys/types.h>
3082#include <sys/stat.h>
3083/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3084struct buf { int x; };
3085FILE * (*rcsopen) (struct buf *, struct stat *, int);
3086static char *e (p, i)
3087 char **p;
3088 int i;
3089{
3090 return p[i];
3091}
3092static char *f (char * (*g) (char **, int), char **p, ...)
3093{
3094 char *s;
3095 va_list v;
3096 va_start (v,p);
3097 s = g (p, va_arg (v,int));
3098 va_end (v);
3099 return s;
3100}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003101
3102/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3103 function prototypes and stuff, but not '\xHH' hex character constants.
3104 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003106 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3107 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003109int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3112 inside strings and character constants. */
3113#define FOO(x) 'x'
3114int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3115
Skip Montanaro6dead952003-09-25 14:50:04 +00003116int test (int i, double x);
3117struct s1 {int (*f) (int a);};
3118struct s2 {int (*f) (double a);};
3119int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3120int argc;
3121char **argv;
3122int
3123main ()
3124{
3125return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3126 ;
3127 return 0;
3128}
3129_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003130for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3131 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003132do
3133 CC="$ac_save_CC $ac_arg"
3134 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135if { (ac_try="$ac_compile"
3136case "(($ac_try" in
3137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3138 *) ac_try_echo=$ac_try;;
3139esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003143 grep -v '^ *+' conftest.er1 >conftest.err
3144 rm -f conftest.er1
3145 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147 (exit $ac_status); } && {
3148 test -z "$ac_c_werror_flag" ||
3149 test ! -s conftest.err
3150 } && test -s conftest.$ac_objext; then
3151 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003152else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003154sed 's/^/| /' conftest.$ac_ext >&5
3155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156
Skip Montanaro6dead952003-09-25 14:50:04 +00003157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158
3159rm -f core conftest.err conftest.$ac_objext
3160 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003161done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003163CC=$ac_save_CC
3164
3165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166# AC_CACHE_VAL
3167case "x$ac_cv_prog_cc_c89" in
3168 x)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003169 { echo "$as_me:$LINENO: result: none needed" >&5
3170echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 xno)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003172 { echo "$as_me:$LINENO: result: unsupported" >&5
3173echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003174 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175 CC="$CC $ac_cv_prog_cc_c89"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003176 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3177echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003178esac
3179
Skip Montanaro6dead952003-09-25 14:50:04 +00003180
Martin v. Löwis11437992002-04-12 09:54:03 +00003181ac_ext=c
3182ac_cpp='$CPP $CPPFLAGS'
3183ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3184ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3185ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003186
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003187
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003188
3189
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003190{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3191echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003192
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003193# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003194if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003196
3197 case $withval in
3198 no) with_cxx_main=no
3199 MAINCC='$(CC)';;
3200 yes) with_cxx_main=yes
3201 MAINCC='$(CXX)';;
3202 *) with_cxx_main=yes
3203 MAINCC=$withval
3204 if test -z "$CXX"
3205 then
3206 CXX=$withval
3207 fi;;
3208 esac
3209else
3210
3211 with_cxx_main=no
3212 MAINCC='$(CC)'
3213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214fi
3215
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003216{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3217echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003218
3219preset_cxx="$CXX"
3220if test -z "$CXX"
3221then
3222 case "$CC" in
3223 gcc) # Extract the first word of "g++", so it can be a program name with args.
3224set dummy g++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003225{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3226echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003227if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003228 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229else
3230 case $CXX in
3231 [\\/]* | ?:[\\/]*)
3232 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3233 ;;
3234 *)
3235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236for as_dir in notfound
3237do
3238 IFS=$as_save_IFS
3239 test -z "$as_dir" && as_dir=.
3240 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241 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 +00003242 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003243 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003244 break 2
3245 fi
3246done
3247done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003249
3250 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3251 ;;
3252esac
3253fi
3254CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003255if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003256 { echo "$as_me:$LINENO: result: $CXX" >&5
3257echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003258else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003259 { echo "$as_me:$LINENO: result: no" >&5
3260echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003262
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003263 ;;
3264 cc) # Extract the first word of "c++", so it can be a program name with args.
3265set dummy c++; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003266{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003268if test "${ac_cv_path_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003269 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003270else
3271 case $CXX in
3272 [\\/]* | ?:[\\/]*)
3273 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3274 ;;
3275 *)
3276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3277for as_dir in notfound
3278do
3279 IFS=$as_save_IFS
3280 test -z "$as_dir" && as_dir=.
3281 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282 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 +00003283 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003284 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003285 break 2
3286 fi
3287done
3288done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003290
3291 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3292 ;;
3293esac
3294fi
3295CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003296if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003297 { echo "$as_me:$LINENO: result: $CXX" >&5
3298echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003299else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003300 { echo "$as_me:$LINENO: result: no" >&5
3301echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003303
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003304 ;;
3305 esac
3306 if test "$CXX" = "notfound"
3307 then
3308 CXX=""
3309 fi
3310fi
3311if test -z "$CXX"
3312then
3313 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3314do
3315 # Extract the first word of "$ac_prog", so it can be a program name with args.
3316set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003317{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3318echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319if test "${ac_cv_prog_CXX+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003320 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003321else
3322 if test -n "$CXX"; then
3323 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3324else
3325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3326for as_dir in $PATH
3327do
3328 IFS=$as_save_IFS
3329 test -z "$as_dir" && as_dir=.
3330 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003331 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 +00003332 ac_cv_prog_CXX="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003333 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003334 break 2
3335 fi
3336done
3337done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003339
3340fi
3341fi
3342CXX=$ac_cv_prog_CXX
3343if test -n "$CXX"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003344 { echo "$as_me:$LINENO: result: $CXX" >&5
3345echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003347 { echo "$as_me:$LINENO: result: no" >&5
3348echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003349fi
3350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003352 test -n "$CXX" && break
3353done
3354test -n "$CXX" || CXX="notfound"
3355
3356 if test "$CXX" = "notfound"
3357 then
3358 CXX=""
3359 fi
3360fi
3361if test "$preset_cxx" != "$CXX"
3362then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003363 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003364
3365 By default, distutils will build C++ extension modules with \"$CXX\".
3366 If this is not intended, then set CXX on the configure command line.
3367 " >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003368echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003369
3370 By default, distutils will build C++ extension modules with \"$CXX\".
3371 If this is not intended, then set CXX on the configure command line.
3372 " >&2;}
3373fi
3374
3375
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003376# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003377
3378ac_ext=c
3379ac_cpp='$CPP $CPPFLAGS'
3380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003383{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3384echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003385# On Suns, sometimes $CPP names a directory.
3386if test -n "$CPP" && test -d "$CPP"; then
3387 CPP=
3388fi
3389if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003390 if test "${ac_cv_prog_CPP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003391 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003392else
Martin v. Löwis11437992002-04-12 09:54:03 +00003393 # Double quotes because CPP needs to be expanded
3394 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3395 do
3396 ac_preproc_ok=false
3397for ac_c_preproc_warn_flag in '' yes
3398do
3399 # Use a header file that comes with gcc, so configuring glibc
3400 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003401 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3402 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003403 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 # not just through cpp. "Syntax error" is here to catch this case.
3405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003406/* confdefs.h. */
3407_ACEOF
3408cat confdefs.h >>conftest.$ac_ext
3409cat >>conftest.$ac_ext <<_ACEOF
3410/* end confdefs.h. */
3411#ifdef __STDC__
3412# include <limits.h>
3413#else
3414# include <assert.h>
3415#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003416 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003418if { (ac_try="$ac_cpp conftest.$ac_ext"
3419case "(($ac_try" in
3420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421 *) ac_try_echo=$ac_try;;
3422esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003426 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 rm -f conftest.er1
3428 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 (exit $ac_status); } >/dev/null && {
3431 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3432 test ! -s conftest.err
3433 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003434 :
3435else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Broken: fails on valid input.
3440continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003445 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003446 # can be detected and how.
3447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003448/* confdefs.h. */
3449_ACEOF
3450cat confdefs.h >>conftest.$ac_ext
3451cat >>conftest.$ac_ext <<_ACEOF
3452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003453#include <ac_nonexistent.h>
3454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455if { (ac_try="$ac_cpp conftest.$ac_ext"
3456case "(($ac_try" in
3457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3458 *) ac_try_echo=$ac_try;;
3459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003461 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003463 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003464 rm -f conftest.er1
3465 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 (exit $ac_status); } >/dev/null && {
3468 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3469 test ! -s conftest.err
3470 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003471 # Broken: success on invalid input.
3472continue
3473else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003475sed 's/^/| /' conftest.$ac_ext >&5
3476
Martin v. Löwis11437992002-04-12 09:54:03 +00003477 # Passes both tests.
3478ac_preproc_ok=:
3479break
3480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481
Martin v. Löwis11437992002-04-12 09:54:03 +00003482rm -f conftest.err conftest.$ac_ext
3483
3484done
3485# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3486rm -f conftest.err conftest.$ac_ext
3487if $ac_preproc_ok; then
3488 break
3489fi
3490
3491 done
3492 ac_cv_prog_CPP=$CPP
3493
3494fi
3495 CPP=$ac_cv_prog_CPP
3496else
3497 ac_cv_prog_CPP=$CPP
3498fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003499{ echo "$as_me:$LINENO: result: $CPP" >&5
3500echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003501ac_preproc_ok=false
3502for ac_c_preproc_warn_flag in '' yes
3503do
3504 # Use a header file that comes with gcc, so configuring glibc
3505 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003506 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3507 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 # On the NeXT, cc -E runs the code through the compiler's parser,
3509 # not just through cpp. "Syntax error" is here to catch this case.
3510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003511/* confdefs.h. */
3512_ACEOF
3513cat confdefs.h >>conftest.$ac_ext
3514cat >>conftest.$ac_ext <<_ACEOF
3515/* end confdefs.h. */
3516#ifdef __STDC__
3517# include <limits.h>
3518#else
3519# include <assert.h>
3520#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003521 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523if { (ac_try="$ac_cpp conftest.$ac_ext"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003531 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 rm -f conftest.er1
3533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535 (exit $ac_status); } >/dev/null && {
3536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 :
3540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Broken: fails on valid input.
3545continue
3546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548rm -f conftest.err conftest.$ac_ext
3549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 # can be detected and how.
3552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003553/* confdefs.h. */
3554_ACEOF
3555cat confdefs.h >>conftest.$ac_ext
3556cat >>conftest.$ac_ext <<_ACEOF
3557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003558#include <ac_nonexistent.h>
3559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560if { (ac_try="$ac_cpp conftest.$ac_ext"
3561case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003568 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 rm -f conftest.er1
3570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572 (exit $ac_status); } >/dev/null && {
3573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3574 test ! -s conftest.err
3575 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 # Broken: success on invalid input.
3577continue
3578else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003580sed 's/^/| /' conftest.$ac_ext >&5
3581
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 # Passes both tests.
3583ac_preproc_ok=:
3584break
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
3589done
3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3591rm -f conftest.err conftest.$ac_ext
3592if $ac_preproc_ok; then
3593 :
3594else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003595 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003596See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003597echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003598See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003599 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601
3602ac_ext=c
3603ac_cpp='$CPP $CPPFLAGS'
3604ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3605ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3606ac_compiler_gnu=$ac_cv_c_compiler_gnu
3607
3608
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003609{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3610echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611if test "${ac_cv_path_GREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003612 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003613else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003614 # Extract the first word of "grep ggrep" to use in msg output
3615if test -z "$GREP"; then
3616set dummy grep ggrep; ac_prog_name=$2
3617if test "${ac_cv_path_GREP+set}" = set; then
3618 echo $ECHO_N "(cached) $ECHO_C" >&6
3619else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 ac_path_GREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003621# Loop through the user's path and test for each of PROGNAME-LIST
3622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3624do
3625 IFS=$as_save_IFS
3626 test -z "$as_dir" && as_dir=.
3627 for ac_prog in grep ggrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003628 for ac_exec_ext in '' $ac_executable_extensions; do
3629 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3630 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3631 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 # Check for GNU $ac_path_GREP
3633case `"$ac_path_GREP" --version 2>&1` in
3634*GNU*)
3635 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3636*)
3637 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003638 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639 while :
3640 do
3641 cat "conftest.in" "conftest.in" >"conftest.tmp"
3642 mv "conftest.tmp" "conftest.in"
3643 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003644 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3646 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3647 ac_count=`expr $ac_count + 1`
3648 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3649 # Best one so far, save it but keep looking for a better one
3650 ac_cv_path_GREP="$ac_path_GREP"
3651 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003652 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653 # 10*(2^10) chars as input seems more than enough
3654 test $ac_count -gt 10 && break
3655 done
3656 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3657esac
3658
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003659
3660 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661 done
3662done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003663
3664done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003666
3667
3668fi
3669
3670GREP="$ac_cv_path_GREP"
3671if test -z "$GREP"; then
3672 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3673echo "$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 +00003674 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677else
3678 ac_cv_path_GREP=$GREP
3679fi
3680
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003683{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3684echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 GREP="$ac_cv_path_GREP"
3686
3687
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003688{ echo "$as_me:$LINENO: checking for egrep" >&5
3689echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690if test "${ac_cv_path_EGREP+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003691 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692else
3693 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3694 then ac_cv_path_EGREP="$GREP -E"
3695 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003696 # Extract the first word of "egrep" to use in msg output
3697if test -z "$EGREP"; then
3698set dummy egrep; ac_prog_name=$2
3699if test "${ac_cv_path_EGREP+set}" = set; then
3700 echo $ECHO_N "(cached) $ECHO_C" >&6
3701else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 ac_path_EGREP_found=false
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003703# Loop through the user's path and test for each of PROGNAME-LIST
3704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
3709 for ac_prog in egrep; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003710 for ac_exec_ext in '' $ac_executable_extensions; do
3711 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3712 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3713 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714 # Check for GNU $ac_path_EGREP
3715case `"$ac_path_EGREP" --version 2>&1` in
3716*GNU*)
3717 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3718*)
3719 ac_count=0
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003720 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721 while :
3722 do
3723 cat "conftest.in" "conftest.in" >"conftest.tmp"
3724 mv "conftest.tmp" "conftest.in"
3725 cp "conftest.in" "conftest.nl"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003726 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3728 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3729 ac_count=`expr $ac_count + 1`
3730 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3731 # Best one so far, save it but keep looking for a better one
3732 ac_cv_path_EGREP="$ac_path_EGREP"
3733 ac_path_EGREP_max=$ac_count
3734 fi
3735 # 10*(2^10) chars as input seems more than enough
3736 test $ac_count -gt 10 && break
3737 done
3738 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3739esac
3740
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003741
3742 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743 done
3744done
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003745
3746done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003747IFS=$as_save_IFS
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003748
3749
3750fi
3751
3752EGREP="$ac_cv_path_EGREP"
3753if test -z "$EGREP"; then
3754 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3755echo "$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 +00003756 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003757fi
3758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759else
3760 ac_cv_path_EGREP=$EGREP
3761fi
3762
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 fi
3765fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003766{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3767echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003769
3770
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003771
3772{ echo "$as_me:$LINENO: checking for AIX" >&5
3773echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3774cat >conftest.$ac_ext <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003775/* confdefs.h. */
3776_ACEOF
3777cat confdefs.h >>conftest.$ac_ext
3778cat >>conftest.$ac_ext <<_ACEOF
3779/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003780#ifdef _AIX
3781 yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003782#endif
3783
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003784_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3786 $EGREP "yes" >/dev/null 2>&1; then
3787 { echo "$as_me:$LINENO: result: yes" >&5
3788echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003789cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003790#define _ALL_SOURCE 1
3791_ACEOF
3792
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003793else
3794 { echo "$as_me:$LINENO: result: no" >&5
3795echo "${ECHO_T}no" >&6; }
3796fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00003797rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003798
3799
3800
3801# Check for unsupported systems
3802case $ac_sys_system/$ac_sys_release in
3803atheos*|Linux*/1*)
3804 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3805 echo See README for details.
3806 exit 1;;
3807esac
3808
3809
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003810{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3811echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003812
3813# Check whether --with-suffix was given.
3814if test "${with_suffix+set}" = set; then
3815 withval=$with_suffix;
3816 case $withval in
3817 no) EXEEXT=;;
3818 yes) EXEEXT=.exe;;
3819 *) EXEEXT=$withval;;
3820 esac
3821fi
3822
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003823{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3824echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003825
3826# Test whether we're running on a non-case-sensitive system, in which
3827# case we give a warning if no ext is given
3828
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003829{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3830echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831if test ! -d CaseSensitiveTestDir; then
3832mkdir CaseSensitiveTestDir
3833fi
3834
3835if test -d casesensitivetestdir
3836then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003837 { echo "$as_me:$LINENO: result: yes" >&5
3838echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003839 BUILDEXEEXT=.exe
3840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003841 { echo "$as_me:$LINENO: result: no" >&5
3842echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003843 BUILDEXEEXT=$EXEEXT
3844fi
3845rmdir CaseSensitiveTestDir
3846
3847case $MACHDEP in
3848bsdos*)
3849 case $CC in
3850 gcc) CC="$CC -D_HAVE_BSDI";;
3851 esac;;
3852esac
3853
3854case $ac_sys_system in
3855hp*|HP*)
3856 case $CC in
3857 cc|*/cc) CC="$CC -Ae";;
3858 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003859SunOS*)
3860 # Some functions have a prototype only with that define, e.g. confstr
3861
3862cat >>confdefs.h <<\_ACEOF
3863#define __EXTENSIONS__ 1
3864_ACEOF
3865
3866 ;;
3867esac
3868
3869
3870
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003871{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3872echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003873if test -z "$LIBRARY"
3874then
3875 LIBRARY='libpython$(VERSION).a'
3876fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003877{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3878echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003879
3880# LDLIBRARY is the name of the library to link against (as opposed to the
3881# name of the library into which to insert object files). BLDLIBRARY is also
3882# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3883# is blank as the main program is not linked directly against LDLIBRARY.
3884# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3885# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3886# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3887# DLLLIBRARY is the shared (i.e., DLL) library.
3888#
3889# RUNSHARED is used to run shared python without installed libraries
3890#
3891# INSTSONAME is the name of the shared library that will be use to install
3892# on the system - some systems like version suffix, others don't
3893
3894
3895
3896
3897
3898
3899LDLIBRARY="$LIBRARY"
3900BLDLIBRARY='$(LDLIBRARY)'
3901INSTSONAME='$(LDLIBRARY)'
3902DLLLIBRARY=''
3903LDLIBRARYDIR=''
3904RUNSHARED=''
3905
3906# LINKCC is the command that links the python executable -- default is $(CC).
3907# If CXX is set, and if it is needed to link a main function that was
3908# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3909# python might then depend on the C++ runtime
3910# This is altered for AIX in order to build the export list before
3911# linking.
3912
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003913{ echo "$as_me:$LINENO: checking LINKCC" >&5
3914echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003915if test -z "$LINKCC"
3916then
3917 LINKCC='$(PURIFY) $(MAINCC)'
3918 case $ac_sys_system in
3919 AIX*)
3920 exp_extra="\"\""
3921 if test $ac_sys_release -ge 5 -o \
3922 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3923 exp_extra="."
3924 fi
3925 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003926 QNX*)
3927 # qcc must be used because the other compilers do not
3928 # support -N.
3929 LINKCC=qcc;;
3930 esac
3931fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003932{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3933echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003934
3935# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3936# make sure we default having it set to "no": this is used by
3937# distutils.unixccompiler to know if it should add --enable-new-dtags
3938# to linker command lines, and failing to detect GNU ld simply results
3939# in the same bahaviour as before.
3940
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003941{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3942echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003943ac_prog=ld
3944if test "$GCC" = yes; then
3945 ac_prog=`$CC -print-prog-name=ld`
3946fi
3947case `"$ac_prog" -V 2>&1 < /dev/null` in
3948 *GNU*)
3949 GNULD=yes;;
3950 *)
3951 GNULD=no;;
3952esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003953{ echo "$as_me:$LINENO: result: $GNULD" >&5
3954echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003955
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003956{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3957echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003958# Check whether --enable-shared was given.
3959if test "${enable_shared+set}" = set; then
3960 enableval=$enable_shared;
3961fi
3962
3963
3964if test -z "$enable_shared"
3965then
3966 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00003967 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003968 enable_shared="yes";;
3969 *)
3970 enable_shared="no";;
3971 esac
3972fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003973{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3974echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003976{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3977echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003978# Check whether --enable-profiling was given.
3979if test "${enable_profiling+set}" = set; then
3980 enableval=$enable_profiling; ac_save_cc="$CC"
3981 CC="$CC -pg"
3982 if test "$cross_compiling" = yes; then
3983 ac_enable_profiling="no"
3984else
3985 cat >conftest.$ac_ext <<_ACEOF
3986/* confdefs.h. */
3987_ACEOF
3988cat confdefs.h >>conftest.$ac_ext
3989cat >>conftest.$ac_ext <<_ACEOF
3990/* end confdefs.h. */
3991int main() { return 0; }
3992_ACEOF
3993rm -f conftest$ac_exeext
3994if { (ac_try="$ac_link"
3995case "(($ac_try" in
3996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3997 *) ac_try_echo=$ac_try;;
3998esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00003999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004000 (eval "$ac_link") 2>&5
4001 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4004 { (case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004009 (eval "$ac_try") 2>&5
4010 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004012 (exit $ac_status); }; }; then
4013 ac_enable_profiling="yes"
4014else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004015 echo "$as_me: program exited with status $ac_status" >&5
4016echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017sed 's/^/| /' conftest.$ac_ext >&5
4018
4019( exit $ac_status )
4020ac_enable_profiling="no"
4021fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4023fi
4024
4025
4026 CC="$ac_save_cc"
4027fi
4028
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004029{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4030echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004031
4032case "$ac_enable_profiling" in
4033 "yes")
4034 BASECFLAGS="-pg $BASECFLAGS"
4035 LDFLAGS="-pg $LDFLAGS"
4036 ;;
4037esac
4038
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004039{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4040echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004041
4042# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4043# library that we build, but we do not want to link against it (we
4044# will find it with a -framework option). For this reason there is an
4045# extra variable BLDLIBRARY against which Python and the extension
4046# modules are linked, BLDLIBRARY. This is normally the same as
4047# LDLIBRARY, but empty for MacOSX framework builds.
4048if test "$enable_framework"
4049then
4050 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4051 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4052 BLDLIBRARY=''
4053else
4054 BLDLIBRARY='$(LDLIBRARY)'
4055fi
4056
4057# Other platforms follow
4058if test $enable_shared = "yes"; then
4059
4060cat >>confdefs.h <<\_ACEOF
4061#define Py_ENABLE_SHARED 1
4062_ACEOF
4063
4064 case $ac_sys_system in
4065 CYGWIN*)
4066 LDLIBRARY='libpython$(VERSION).dll.a'
4067 DLLLIBRARY='libpython$(VERSION).dll'
4068 ;;
4069 SunOS*)
4070 LDLIBRARY='libpython$(VERSION).so'
4071 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4072 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4073 INSTSONAME="$LDLIBRARY".$SOVERSION
4074 ;;
4075 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4076 LDLIBRARY='libpython$(VERSION).so'
4077 BLDLIBRARY='-L. -lpython$(VERSION)'
4078 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4079 case $ac_sys_system in
4080 FreeBSD*)
4081 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4082 ;;
4083 esac
4084 INSTSONAME="$LDLIBRARY".$SOVERSION
4085 ;;
4086 hp*|HP*)
4087 case `uname -m` in
4088 ia64)
4089 LDLIBRARY='libpython$(VERSION).so'
4090 ;;
4091 *)
4092 LDLIBRARY='libpython$(VERSION).sl'
4093 ;;
4094 esac
4095 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4096 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4097 ;;
4098 OSF*)
4099 LDLIBRARY='libpython$(VERSION).so'
4100 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4101 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4102 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004103 Darwin*)
4104 LDLIBRARY='libpython$(VERSION).dylib'
4105 BLDLIBRARY='-L. -lpython$(VERSION)'
4106 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4107 ;;
4108
4109 esac
4110else # shared is disabled
4111 case $ac_sys_system in
4112 CYGWIN*)
4113 BLDLIBRARY='$(LIBRARY)'
4114 LDLIBRARY='libpython$(VERSION).dll.a'
4115 ;;
4116 esac
4117fi
4118
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004119{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4120echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004121
4122if test -n "$ac_tool_prefix"; then
4123 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4124set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004125{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4126echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004127if test "${ac_cv_prog_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004128 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004129else
4130 if test -n "$RANLIB"; then
4131 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4132else
4133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134for as_dir in $PATH
4135do
4136 IFS=$as_save_IFS
4137 test -z "$as_dir" && as_dir=.
4138 for ac_exec_ext in '' $ac_executable_extensions; do
4139 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4140 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004141 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004142 break 2
4143 fi
4144done
4145done
4146IFS=$as_save_IFS
4147
4148fi
4149fi
4150RANLIB=$ac_cv_prog_RANLIB
4151if test -n "$RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004152 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4153echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004154else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004155 { echo "$as_me:$LINENO: result: no" >&5
4156echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004157fi
4158
4159
4160fi
4161if test -z "$ac_cv_prog_RANLIB"; then
4162 ac_ct_RANLIB=$RANLIB
4163 # Extract the first word of "ranlib", so it can be a program name with args.
4164set dummy ranlib; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004165{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004167if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004168 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004169else
4170 if test -n "$ac_ct_RANLIB"; then
4171 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4180 ac_cv_prog_ac_ct_RANLIB="ranlib"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004182 break 2
4183 fi
4184done
4185done
4186IFS=$as_save_IFS
4187
4188fi
4189fi
4190ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4191if test -n "$ac_ct_RANLIB"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004192 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4193echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004194else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004195 { echo "$as_me:$LINENO: result: no" >&5
4196echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004197fi
4198
4199 if test "x$ac_ct_RANLIB" = x; then
4200 RANLIB=":"
4201 else
4202 case $cross_compiling:$ac_tool_warned in
4203yes:)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004204{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4205whose name does not start with the host triplet. If you think this
4206configuration is useful to you, please write to autoconf@gnu.org." >&5
4207echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4208whose name does not start with the host triplet. If you think this
4209configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004210ac_tool_warned=yes ;;
4211esac
4212 RANLIB=$ac_ct_RANLIB
4213 fi
4214else
4215 RANLIB="$ac_cv_prog_RANLIB"
4216fi
4217
4218
4219for ac_prog in ar aal
4220do
4221 # Extract the first word of "$ac_prog", so it can be a program name with args.
4222set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004223{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4224echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004225if test "${ac_cv_prog_AR+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004226 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004227else
4228 if test -n "$AR"; then
4229 ac_cv_prog_AR="$AR" # Let the user override the test.
4230else
4231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4232for as_dir in $PATH
4233do
4234 IFS=$as_save_IFS
4235 test -z "$as_dir" && as_dir=.
4236 for ac_exec_ext in '' $ac_executable_extensions; do
4237 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4238 ac_cv_prog_AR="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004239 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004240 break 2
4241 fi
4242done
4243done
4244IFS=$as_save_IFS
4245
4246fi
4247fi
4248AR=$ac_cv_prog_AR
4249if test -n "$AR"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004250 { echo "$as_me:$LINENO: result: $AR" >&5
4251echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004252else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004253 { echo "$as_me:$LINENO: result: no" >&5
4254echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004255fi
4256
4257
4258 test -n "$AR" && break
4259done
4260test -n "$AR" || AR="ar"
4261
4262
4263# tweak ARFLAGS only if the user didn't set it on the command line
4264
4265if test -z "$ARFLAGS"
4266then
4267 ARFLAGS="rc"
4268fi
4269
4270
4271# Extract the first word of "svnversion", so it can be a program name with args.
4272set dummy svnversion; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004273{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4274echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004276 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277else
4278 if test -n "$SVNVERSION"; then
4279 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4280else
4281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4282for as_dir in $PATH
4283do
4284 IFS=$as_save_IFS
4285 test -z "$as_dir" && as_dir=.
4286 for ac_exec_ext in '' $ac_executable_extensions; do
4287 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4288 ac_cv_prog_SVNVERSION="found"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004289 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004290 break 2
4291 fi
4292done
4293done
4294IFS=$as_save_IFS
4295
4296 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4297fi
4298fi
4299SVNVERSION=$ac_cv_prog_SVNVERSION
4300if test -n "$SVNVERSION"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004301 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4302echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004304 { echo "$as_me:$LINENO: result: no" >&5
4305echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004306fi
4307
4308
4309if test $SVNVERSION = found
4310then
4311 SVNVERSION="svnversion \$(srcdir)"
4312else
4313 SVNVERSION="echo Unversioned directory"
4314fi
4315
4316case $MACHDEP in
4317bsdos*|hp*|HP*)
4318 # install -d does not work on BSDI or HP-UX
4319 if test -z "$INSTALL"
4320 then
4321 INSTALL="${srcdir}/install-sh -c"
4322 fi
4323esac
4324ac_aux_dir=
4325for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4326 if test -f "$ac_dir/install-sh"; then
4327 ac_aux_dir=$ac_dir
4328 ac_install_sh="$ac_aux_dir/install-sh -c"
4329 break
4330 elif test -f "$ac_dir/install.sh"; then
4331 ac_aux_dir=$ac_dir
4332 ac_install_sh="$ac_aux_dir/install.sh -c"
4333 break
4334 elif test -f "$ac_dir/shtool"; then
4335 ac_aux_dir=$ac_dir
4336 ac_install_sh="$ac_aux_dir/shtool install -c"
4337 break
4338 fi
4339done
4340if test -z "$ac_aux_dir"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004341 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4342echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004343 { (exit 1); exit 1; }; }
4344fi
4345
4346# These three variables are undocumented and unsupported,
4347# and are intended to be withdrawn in a future Autoconf release.
4348# They can cause serious problems if a builder's source tree is in a directory
4349# whose full name contains unusual characters.
4350ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4351ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4352ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4353
4354
4355# Find a good install program. We prefer a C program (faster),
4356# so one script is as good as another. But avoid the broken or
4357# incompatible versions:
4358# SysV /etc/install, /usr/sbin/install
4359# SunOS /usr/etc/install
4360# IRIX /sbin/install
4361# AIX /bin/install
4362# AmigaOS /C/install, which installs bootblocks on floppy discs
4363# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4364# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4365# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4366# OS/2's system install, which has a completely different semantic
4367# ./install, which can be erroneously created by make from ./install.sh.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004368{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4369echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004370if test -z "$INSTALL"; then
4371if test "${ac_cv_path_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004372 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004373else
4374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4375for as_dir in $PATH
4376do
4377 IFS=$as_save_IFS
4378 test -z "$as_dir" && as_dir=.
4379 # Account for people who put trailing slashes in PATH elements.
4380case $as_dir/ in
4381 ./ | .// | /cC/* | \
4382 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4383 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4384 /usr/ucb/* ) ;;
4385 *)
4386 # OSF1 and SCO ODT 3.0 have their own names for install.
4387 # Don't use installbsd from OSF since it installs stuff as root
4388 # by default.
4389 for ac_prog in ginstall scoinst install; do
4390 for ac_exec_ext in '' $ac_executable_extensions; do
4391 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4392 if test $ac_prog = install &&
4393 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4394 # AIX install. It has an incompatible calling convention.
4395 :
4396 elif test $ac_prog = install &&
4397 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4398 # program-specific install script used by HP pwplus--don't use.
4399 :
4400 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004401 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4402 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004403 fi
4404 fi
4405 done
4406 done
4407 ;;
4408esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409done
4410IFS=$as_save_IFS
4411
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004412
4413fi
4414 if test "${ac_cv_path_install+set}" = set; then
4415 INSTALL=$ac_cv_path_install
4416 else
4417 # As a last resort, use the slow shell script. Don't cache a
4418 # value for INSTALL within a source directory, because that will
4419 # break other packages using the cache if that directory is
4420 # removed, or if the value is a relative name.
4421 INSTALL=$ac_install_sh
4422 fi
4423fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004424{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4425echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004426
4427# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4428# It thinks the first close brace ends the variable substitution.
4429test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4430
4431test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4432
4433test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4434
4435
4436# Not every filesystem supports hard links
4437
4438if test -z "$LN" ; then
4439 case $ac_sys_system in
4440 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004441 *) LN=ln;;
4442 esac
4443fi
4444
4445# Check for --with-pydebug
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004446{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4447echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448
4449# Check whether --with-pydebug was given.
4450if test "${with_pydebug+set}" = set; then
4451 withval=$with_pydebug;
4452if test "$withval" != no
4453then
4454
4455cat >>confdefs.h <<\_ACEOF
4456#define Py_DEBUG 1
4457_ACEOF
4458
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004459 { echo "$as_me:$LINENO: result: yes" >&5
4460echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004461 Py_DEBUG='true'
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004462else { echo "$as_me:$LINENO: result: no" >&5
4463echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004464fi
4465else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004466 { echo "$as_me:$LINENO: result: no" >&5
4467echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004468fi
4469
4470
4471# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4472# merged with this chunk of code?
4473
4474# Optimizer/debugger flags
4475# ------------------------
4476# (The following bit of code is complicated enough - please keep things
4477# indented properly. Just pretend you're editing Python code. ;-)
4478
4479# There are two parallel sets of case statements below, one that checks to
4480# see if OPT was set and one that does BASECFLAGS setting based upon
4481# compiler and platform. BASECFLAGS tweaks need to be made even if the
4482# user set OPT.
4483
4484# tweak OPT based on compiler and platform, only if the user didn't set
4485# it on the command line
4486
4487if test -z "$OPT"
4488then
4489 case $GCC in
4490 yes)
4491 if test "$CC" != 'g++' ; then
4492 STRICT_PROTO="-Wstrict-prototypes"
4493 fi
4494 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4495 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4496 WRAP="-fwrapv"
4497 fi
4498 case $ac_cv_prog_cc_g in
4499 yes)
4500 if test "$Py_DEBUG" = 'true' ; then
4501 # Optimization messes up debuggers, so turn it off for
4502 # debug builds.
4503 OPT="-g -Wall $STRICT_PROTO"
4504 else
4505 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4506 fi
4507 ;;
4508 *)
4509 OPT="-O3 -Wall $STRICT_PROTO"
4510 ;;
4511 esac
4512 case $ac_sys_system in
4513 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4514 ;;
4515 esac
4516 ;;
4517
4518 *)
4519 OPT="-O"
4520 ;;
4521 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004522fi
4523
4524
4525
4526# The -arch flags for universal builds on OSX
4527UNIVERSAL_ARCH_FLAGS=
4528
4529
4530# tweak BASECFLAGS based on compiler and platform
4531case $GCC in
4532yes)
4533 # Python violates C99 rules, by casting between incompatible
4534 # pointer types. GCC may generate bad code as a result of that,
4535 # so use -fno-strict-aliasing if supported.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004536 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4537echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004538 ac_save_cc="$CC"
4539 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004540 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004541 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004542else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004543 cat >conftest.$ac_ext <<_ACEOF
4544/* confdefs.h. */
4545_ACEOF
4546cat confdefs.h >>conftest.$ac_ext
4547cat >>conftest.$ac_ext <<_ACEOF
4548/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004549
4550int
4551main ()
4552{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004553int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004554 ;
4555 return 0;
4556}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004557_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004558rm -f conftest.$ac_objext
4559if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004560case "(($ac_try" in
4561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4562 *) ac_try_echo=$ac_try;;
4563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004565 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004566 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004567 grep -v '^ *+' conftest.er1 >conftest.err
4568 rm -f conftest.er1
4569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004571 (exit $ac_status); } && {
4572 test -z "$ac_c_werror_flag" ||
4573 test ! -s conftest.err
4574 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004575 ac_cv_no_strict_aliasing_ok=yes
4576else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004577 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004578sed 's/^/| /' conftest.$ac_ext >&5
4579
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004580 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004581fi
4582
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004584fi
4585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004586 CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004587 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4588echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589 if test $ac_cv_no_strict_aliasing_ok = yes
4590 then
4591 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4592 fi
4593
4594 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4595 # support. Without this, treatment of subnormals doesn't follow
4596 # the standard.
4597 case $ac_sys_machine in
4598 alpha*)
4599 BASECFLAGS="$BASECFLAGS -mieee"
4600 ;;
4601 esac
4602
4603 case $ac_sys_system in
4604 SCO_SV*)
4605 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4606 ;;
4607 # is there any other compiler on Darwin besides gcc?
4608 Darwin*)
4609 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4610 # used to be here, but non-Apple gcc doesn't accept them.
4611
4612
4613 if test "${enable_universalsdk}"; then
4614 UNIVERSAL_ARCH_FLAGS=""
4615 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4616 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4617 ARCH_RUN_32BIT=""
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004618 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004619
4620 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4621 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004622 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004623 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624
4625 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4626 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004627 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628 ARCH_RUN_32BIT="arch -i386 -ppc"
4629
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004630 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4631 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004632 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004633 ARCH_RUN_32BIT="arch -i386"
4634
4635 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4636 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00004637 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
4638 ARCH_RUN_32BIT="arch -i386 -ppc7400"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004641 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4642echo "$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 +00004643 { (exit 1); exit 1; }; }
4644
4645 fi
4646
4647
4648 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4649 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4650 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4651 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4652 fi
4653 fi
4654
4655 # Calculate the right deployment target for this build.
4656 #
4657 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4658 if test ${cur_target} '>' 10.2; then
4659 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004660 if test ${enable_universalsdk}; then
4661 if test "${UNIVERSAL_ARCHS}" = "all"; then
4662 # Ensure that the default platform for a
4663 # 4-way universal build is OSX 10.5,
4664 # that's the first OS release where
4665 # 4-way builds make sense.
4666 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00004667
4668 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4669 cur_target='10.5'
4670
4671 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4672 cur_target='10.5'
4673
4674 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4675 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004676 fi
4677 else
4678 if test `arch` = "i386"; then
4679 # On Intel macs default to a deployment
4680 # target of 10.4, that's the first OSX
4681 # release with Intel support.
4682 cur_target="10.4"
4683 fi
4684 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004685 fi
4686 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4687
4688 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4689 # environment with a value that is the same as what we'll use
4690 # in the Makefile to ensure that we'll get the same compiler
4691 # environment during configure and build time.
4692 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4693 export MACOSX_DEPLOYMENT_TARGET
4694 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4695
4696 ;;
4697 OSF*)
4698 BASECFLAGS="$BASECFLAGS -mieee"
4699 ;;
4700 esac
4701 ;;
4702
4703*)
4704 case $ac_sys_system in
4705 OpenUNIX*|UnixWare*)
4706 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4707 ;;
4708 OSF*)
4709 BASECFLAGS="$BASECFLAGS -ieee -std"
4710 ;;
4711 SCO_SV*)
4712 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4713 ;;
4714 esac
4715 ;;
4716esac
4717
4718if test "$Py_DEBUG" = 'true'; then
4719 :
4720else
4721 OPT="-DNDEBUG $OPT"
4722fi
4723
4724if test "$ac_arch_flags"
4725then
4726 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4727fi
4728
4729# disable check for icc since it seems to pass, but generates a warning
4730if test "$CC" = icc
4731then
4732 ac_cv_opt_olimit_ok=no
4733fi
4734
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004735{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4736echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737if test "${ac_cv_opt_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004738 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004739else
4740 ac_save_cc="$CC"
4741CC="$CC -OPT:Olimit=0"
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004742cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743/* confdefs.h. */
4744_ACEOF
4745cat confdefs.h >>conftest.$ac_ext
4746cat >>conftest.$ac_ext <<_ACEOF
4747/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004748
4749int
4750main ()
4751{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004753 ;
4754 return 0;
4755}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004756_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004757rm -f conftest.$ac_objext
4758if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004759case "(($ac_try" in
4760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4761 *) ac_try_echo=$ac_try;;
4762esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004764 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004765 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004766 grep -v '^ *+' conftest.er1 >conftest.err
4767 rm -f conftest.er1
4768 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004770 (exit $ac_status); } && {
4771 test -z "$ac_c_werror_flag" ||
4772 test ! -s conftest.err
4773 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004774 ac_cv_opt_olimit_ok=yes
4775else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004776 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004777sed 's/^/| /' conftest.$ac_ext >&5
4778
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004779 ac_cv_opt_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780fi
4781
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783CC="$ac_save_cc"
4784fi
4785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004786{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4787echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004788if test $ac_cv_opt_olimit_ok = yes; then
4789 case $ac_sys_system in
4790 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4791 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4792 # environment?
4793 Darwin*)
4794 ;;
4795 *)
4796 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4797 ;;
4798 esac
4799else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004800 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4801echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004802 if test "${ac_cv_olimit_ok+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004803 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804else
4805 ac_save_cc="$CC"
4806 CC="$CC -Olimit 1500"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807 cat >conftest.$ac_ext <<_ACEOF
4808/* confdefs.h. */
4809_ACEOF
4810cat confdefs.h >>conftest.$ac_ext
4811cat >>conftest.$ac_ext <<_ACEOF
4812/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004813
4814int
4815main ()
4816{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004817int main() { return 0; }
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004818 ;
4819 return 0;
4820}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004821_ACEOF
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004822rm -f conftest.$ac_objext
4823if { (ac_try="$ac_compile"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004824case "(($ac_try" in
4825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4826 *) ac_try_echo=$ac_try;;
4827esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004829 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004830 ac_status=$?
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004831 grep -v '^ *+' conftest.er1 >conftest.err
4832 rm -f conftest.er1
4833 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004835 (exit $ac_status); } && {
4836 test -z "$ac_c_werror_flag" ||
4837 test ! -s conftest.err
4838 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004839 ac_cv_olimit_ok=yes
4840else
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004841 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004842sed 's/^/| /' conftest.$ac_ext >&5
4843
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004844 ac_cv_olimit_ok=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845fi
4846
Gregory P. Smithe0450c62009-11-01 21:11:36 +00004847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848 CC="$ac_save_cc"
4849fi
4850
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004851 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4852echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853 if test $ac_cv_olimit_ok = yes; then
4854 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4855 fi
4856fi
4857
4858# Check whether GCC supports PyArg_ParseTuple format
4859if test "$GCC" = "yes"
4860then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004861 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4862echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863 save_CFLAGS=$CFLAGS
4864 CFLAGS="$CFLAGS -Werror"
4865 cat >conftest.$ac_ext <<_ACEOF
4866/* confdefs.h. */
4867_ACEOF
4868cat confdefs.h >>conftest.$ac_ext
4869cat >>conftest.$ac_ext <<_ACEOF
4870/* end confdefs.h. */
4871
4872 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4873
4874int
4875main ()
4876{
4877
4878 ;
4879 return 0;
4880}
4881_ACEOF
4882rm -f conftest.$ac_objext
4883if { (ac_try="$ac_compile"
4884case "(($ac_try" in
4885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4886 *) ac_try_echo=$ac_try;;
4887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889 (eval "$ac_compile") 2>conftest.er1
4890 ac_status=$?
4891 grep -v '^ *+' conftest.er1 >conftest.err
4892 rm -f conftest.er1
4893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004895 (exit $ac_status); } && {
4896 test -z "$ac_c_werror_flag" ||
4897 test ! -s conftest.err
4898 } && test -s conftest.$ac_objext; then
4899
4900cat >>confdefs.h <<\_ACEOF
4901#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4902_ACEOF
4903
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004904 { echo "$as_me:$LINENO: result: yes" >&5
4905echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004906else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004907 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908sed 's/^/| /' conftest.$ac_ext >&5
4909
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004910 { echo "$as_me:$LINENO: result: no" >&5
4911echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912
4913fi
4914
4915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4916 CFLAGS=$save_CFLAGS
4917fi
4918
4919# On some compilers, pthreads are available without further options
4920# (e.g. MacOS X). On some of these systems, the compiler will not
4921# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4922# So we have to see first whether pthreads are available without
4923# options before we can check whether -Kpthread improves anything.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004924{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4925echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004926if test "${ac_cv_pthread_is_default+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004927 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928else
4929 if test "$cross_compiling" = yes; then
4930 ac_cv_pthread_is_default=no
4931else
4932 cat >conftest.$ac_ext <<_ACEOF
4933/* confdefs.h. */
4934_ACEOF
4935cat confdefs.h >>conftest.$ac_ext
4936cat >>conftest.$ac_ext <<_ACEOF
4937/* end confdefs.h. */
4938
4939#include <pthread.h>
4940
4941void* routine(void* p){return NULL;}
4942
4943int main(){
4944 pthread_t p;
4945 if(pthread_create(&p,NULL,routine,NULL)!=0)
4946 return 1;
4947 (void)pthread_detach(p);
4948 return 0;
4949}
4950
4951_ACEOF
4952rm -f conftest$ac_exeext
4953if { (ac_try="$ac_link"
4954case "(($ac_try" in
4955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4956 *) ac_try_echo=$ac_try;;
4957esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 (eval "$ac_link") 2>&5
4960 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4963 { (case "(($ac_try" in
4964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4965 *) ac_try_echo=$ac_try;;
4966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 (eval "$ac_try") 2>&5
4969 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971 (exit $ac_status); }; }; then
4972
4973 ac_cv_pthread_is_default=yes
4974 ac_cv_kthread=no
4975 ac_cv_pthread=no
4976
4977else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004978 echo "$as_me: program exited with status $ac_status" >&5
4979echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980sed 's/^/| /' conftest.$ac_ext >&5
4981
4982( exit $ac_status )
4983ac_cv_pthread_is_default=no
4984fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4986fi
4987
4988
4989
4990fi
4991
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004992{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4993echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
4995
4996if test $ac_cv_pthread_is_default = yes
4997then
4998 ac_cv_kpthread=no
4999else
5000# -Kpthread, if available, provides the right #defines
5001# and linker options to make pthread_create available
5002# Some compilers won't report that they do not support -Kpthread,
5003# so we need to run a program to see whether it really made the
5004# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005005{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5006echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007if test "${ac_cv_kpthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005008 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009else
5010 ac_save_cc="$CC"
5011CC="$CC -Kpthread"
5012if test "$cross_compiling" = yes; then
5013 ac_cv_kpthread=no
5014else
5015 cat >conftest.$ac_ext <<_ACEOF
5016/* confdefs.h. */
5017_ACEOF
5018cat confdefs.h >>conftest.$ac_ext
5019cat >>conftest.$ac_ext <<_ACEOF
5020/* end confdefs.h. */
5021
5022#include <pthread.h>
5023
5024void* routine(void* p){return NULL;}
5025
5026int main(){
5027 pthread_t p;
5028 if(pthread_create(&p,NULL,routine,NULL)!=0)
5029 return 1;
5030 (void)pthread_detach(p);
5031 return 0;
5032}
5033
5034_ACEOF
5035rm -f conftest$ac_exeext
5036if { (ac_try="$ac_link"
5037case "(($ac_try" in
5038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5039 *) ac_try_echo=$ac_try;;
5040esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005042 (eval "$ac_link") 2>&5
5043 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5046 { (case "(($ac_try" in
5047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5048 *) ac_try_echo=$ac_try;;
5049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051 (eval "$ac_try") 2>&5
5052 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 (exit $ac_status); }; }; then
5055 ac_cv_kpthread=yes
5056else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005057 echo "$as_me: program exited with status $ac_status" >&5
5058echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059sed 's/^/| /' conftest.$ac_ext >&5
5060
5061( exit $ac_status )
5062ac_cv_kpthread=no
5063fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5065fi
5066
5067
5068CC="$ac_save_cc"
5069fi
5070
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005071{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5072echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073fi
5074
5075if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5076then
5077# -Kthread, if available, provides the right #defines
5078# and linker options to make pthread_create available
5079# Some compilers won't report that they do not support -Kthread,
5080# so we need to run a program to see whether it really made the
5081# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005082{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5083echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005084if test "${ac_cv_kthread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005085 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086else
5087 ac_save_cc="$CC"
5088CC="$CC -Kthread"
5089if test "$cross_compiling" = yes; then
5090 ac_cv_kthread=no
5091else
5092 cat >conftest.$ac_ext <<_ACEOF
5093/* confdefs.h. */
5094_ACEOF
5095cat confdefs.h >>conftest.$ac_ext
5096cat >>conftest.$ac_ext <<_ACEOF
5097/* end confdefs.h. */
5098
5099#include <pthread.h>
5100
5101void* routine(void* p){return NULL;}
5102
5103int main(){
5104 pthread_t p;
5105 if(pthread_create(&p,NULL,routine,NULL)!=0)
5106 return 1;
5107 (void)pthread_detach(p);
5108 return 0;
5109}
5110
5111_ACEOF
5112rm -f conftest$ac_exeext
5113if { (ac_try="$ac_link"
5114case "(($ac_try" in
5115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5116 *) ac_try_echo=$ac_try;;
5117esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005119 (eval "$ac_link") 2>&5
5120 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5123 { (case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 (eval "$ac_try") 2>&5
5129 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 (exit $ac_status); }; }; then
5132 ac_cv_kthread=yes
5133else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005134 echo "$as_me: program exited with status $ac_status" >&5
5135echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005136sed 's/^/| /' conftest.$ac_ext >&5
5137
5138( exit $ac_status )
5139ac_cv_kthread=no
5140fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5142fi
5143
5144
5145CC="$ac_save_cc"
5146fi
5147
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5149echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150fi
5151
5152if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5153then
5154# -pthread, if available, provides the right #defines
5155# and linker options to make pthread_create available
5156# Some compilers won't report that they do not support -pthread,
5157# so we need to run a program to see whether it really made the
5158# function available.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005159{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5160echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161if test "${ac_cv_thread+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005162 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005163else
5164 ac_save_cc="$CC"
5165CC="$CC -pthread"
5166if test "$cross_compiling" = yes; then
5167 ac_cv_pthread=no
5168else
5169 cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */
5175
5176#include <pthread.h>
5177
5178void* routine(void* p){return NULL;}
5179
5180int main(){
5181 pthread_t p;
5182 if(pthread_create(&p,NULL,routine,NULL)!=0)
5183 return 1;
5184 (void)pthread_detach(p);
5185 return 0;
5186}
5187
5188_ACEOF
5189rm -f conftest$ac_exeext
5190if { (ac_try="$ac_link"
5191case "(($ac_try" in
5192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5193 *) ac_try_echo=$ac_try;;
5194esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005196 (eval "$ac_link") 2>&5
5197 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5200 { (case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 (eval "$ac_try") 2>&5
5206 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 (exit $ac_status); }; }; then
5209 ac_cv_pthread=yes
5210else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005211 echo "$as_me: program exited with status $ac_status" >&5
5212echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213sed 's/^/| /' conftest.$ac_ext >&5
5214
5215( exit $ac_status )
5216ac_cv_pthread=no
5217fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5219fi
5220
5221
5222CC="$ac_save_cc"
5223fi
5224
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005225{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5226echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227fi
5228
5229# If we have set a CC compiler flag for thread support then
5230# check if it works for CXX, too.
5231ac_cv_cxx_thread=no
5232if test ! -z "$CXX"
5233then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005234{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5235echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236ac_save_cxx="$CXX"
5237
5238if test "$ac_cv_kpthread" = "yes"
5239then
5240 CXX="$CXX -Kpthread"
5241 ac_cv_cxx_thread=yes
5242elif test "$ac_cv_kthread" = "yes"
5243then
5244 CXX="$CXX -Kthread"
5245 ac_cv_cxx_thread=yes
5246elif test "$ac_cv_pthread" = "yes"
5247then
5248 CXX="$CXX -pthread"
5249 ac_cv_cxx_thread=yes
5250fi
5251
5252if test $ac_cv_cxx_thread = yes
5253then
5254 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5255 $CXX -c conftest.$ac_ext 2>&5
5256 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5257 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5258 then
5259 ac_cv_cxx_thread=yes
5260 else
5261 ac_cv_cxx_thread=no
5262 fi
5263 rm -fr conftest*
5264fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005265{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5266echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267fi
5268CXX="$ac_save_cxx"
5269
5270
5271# checks for header files
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005272{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5273echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274if test "${ac_cv_header_stdc+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005275 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276else
5277 cat >conftest.$ac_ext <<_ACEOF
5278/* confdefs.h. */
5279_ACEOF
5280cat confdefs.h >>conftest.$ac_ext
5281cat >>conftest.$ac_ext <<_ACEOF
5282/* end confdefs.h. */
5283#include <stdlib.h>
5284#include <stdarg.h>
5285#include <string.h>
5286#include <float.h>
5287
5288int
5289main ()
5290{
5291
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
5297if { (ac_try="$ac_compile"
5298case "(($ac_try" in
5299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5300 *) ac_try_echo=$ac_try;;
5301esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303 (eval "$ac_compile") 2>conftest.er1
5304 ac_status=$?
5305 grep -v '^ *+' conftest.er1 >conftest.err
5306 rm -f conftest.er1
5307 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 (exit $ac_status); } && {
5310 test -z "$ac_c_werror_flag" ||
5311 test ! -s conftest.err
5312 } && test -s conftest.$ac_objext; then
5313 ac_cv_header_stdc=yes
5314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005315 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316sed 's/^/| /' conftest.$ac_ext >&5
5317
5318 ac_cv_header_stdc=no
5319fi
5320
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322
5323if test $ac_cv_header_stdc = yes; then
5324 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5325 cat >conftest.$ac_ext <<_ACEOF
5326/* confdefs.h. */
5327_ACEOF
5328cat confdefs.h >>conftest.$ac_ext
5329cat >>conftest.$ac_ext <<_ACEOF
5330/* end confdefs.h. */
5331#include <string.h>
5332
5333_ACEOF
5334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5335 $EGREP "memchr" >/dev/null 2>&1; then
5336 :
5337else
5338 ac_cv_header_stdc=no
5339fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005340rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341
5342fi
5343
5344if test $ac_cv_header_stdc = yes; then
5345 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5346 cat >conftest.$ac_ext <<_ACEOF
5347/* confdefs.h. */
5348_ACEOF
5349cat confdefs.h >>conftest.$ac_ext
5350cat >>conftest.$ac_ext <<_ACEOF
5351/* end confdefs.h. */
5352#include <stdlib.h>
5353
5354_ACEOF
5355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5356 $EGREP "free" >/dev/null 2>&1; then
5357 :
5358else
5359 ac_cv_header_stdc=no
5360fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00005361rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363fi
5364
5365if test $ac_cv_header_stdc = yes; then
5366 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5367 if test "$cross_compiling" = yes; then
5368 :
5369else
5370 cat >conftest.$ac_ext <<_ACEOF
5371/* confdefs.h. */
5372_ACEOF
5373cat confdefs.h >>conftest.$ac_ext
5374cat >>conftest.$ac_ext <<_ACEOF
5375/* end confdefs.h. */
5376#include <ctype.h>
5377#include <stdlib.h>
5378#if ((' ' & 0x0FF) == 0x020)
5379# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5380# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5381#else
5382# define ISLOWER(c) \
5383 (('a' <= (c) && (c) <= 'i') \
5384 || ('j' <= (c) && (c) <= 'r') \
5385 || ('s' <= (c) && (c) <= 'z'))
5386# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5387#endif
5388
5389#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5390int
5391main ()
5392{
5393 int i;
5394 for (i = 0; i < 256; i++)
5395 if (XOR (islower (i), ISLOWER (i))
5396 || toupper (i) != TOUPPER (i))
5397 return 2;
5398 return 0;
5399}
5400_ACEOF
5401rm -f conftest$ac_exeext
5402if { (ac_try="$ac_link"
5403case "(($ac_try" in
5404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5405 *) ac_try_echo=$ac_try;;
5406esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 (eval "$ac_link") 2>&5
5409 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5412 { (case "(($ac_try" in
5413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5414 *) ac_try_echo=$ac_try;;
5415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 (eval "$ac_try") 2>&5
5418 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420 (exit $ac_status); }; }; then
5421 :
5422else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005423 echo "$as_me: program exited with status $ac_status" >&5
5424echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425sed 's/^/| /' conftest.$ac_ext >&5
5426
5427( exit $ac_status )
5428ac_cv_header_stdc=no
5429fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5431fi
5432
5433
5434fi
5435fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005436{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5437echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005438if test $ac_cv_header_stdc = yes; then
5439
5440cat >>confdefs.h <<\_ACEOF
5441#define STDC_HEADERS 1
5442_ACEOF
5443
5444fi
5445
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5457 inttypes.h stdint.h unistd.h
5458do
5459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5460{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5462if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464else
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
5471$ac_includes_default
5472
5473#include <$ac_header>
5474_ACEOF
5475rm -f conftest.$ac_objext
5476if { (ac_try="$ac_compile"
5477case "(($ac_try" in
5478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5479 *) ac_try_echo=$ac_try;;
5480esac
5481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5482 (eval "$ac_compile") 2>conftest.er1
5483 ac_status=$?
5484 grep -v '^ *+' conftest.er1 >conftest.err
5485 rm -f conftest.er1
5486 cat conftest.err >&5
5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5488 (exit $ac_status); } && {
5489 test -z "$ac_c_werror_flag" ||
5490 test ! -s conftest.err
5491 } && test -s conftest.$ac_objext; then
5492 eval "$as_ac_Header=yes"
5493else
5494 echo "$as_me: failed program was:" >&5
5495sed 's/^/| /' conftest.$ac_ext >&5
5496
5497 eval "$as_ac_Header=no"
5498fi
5499
5500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5501fi
5502ac_res=`eval echo '${'$as_ac_Header'}'`
5503 { echo "$as_me:$LINENO: result: $ac_res" >&5
5504echo "${ECHO_T}$ac_res" >&6; }
5505if test `eval echo '${'$as_ac_Header'}'` = yes; then
5506 cat >>confdefs.h <<_ACEOF
5507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5508_ACEOF
5509
5510fi
5511
5512done
5513
5514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515
Martin v. Löwis11437992002-04-12 09:54:03 +00005516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
Anthony Baxter8a560de2004-10-13 15:30:56 +00005551
Martin v. Löwisc3001752005-01-23 09:27:24 +00005552
Martin v. Löwis11017b12006-01-14 18:12:57 +00005553
Thomas Wouters477c8d52006-05-27 19:21:47 +00005554
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005555
5556
5557
5558
5559
5560
5561
5562
Thomas Wouters89f507f2006-12-13 04:49:30 +00005563
Christian Heimes043d6f62008-01-07 17:19:16 +00005564
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005565
5566
Christian Heimesbbe741d2008-03-28 10:53:29 +00005567
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005568
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005569for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5570fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005571ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005572shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005573unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005574sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5575sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005576sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005577sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578sys/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 +00005579sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005580bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005581do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005582as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005583if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005584 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5585echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005586if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005588fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005589ac_res=`eval echo '${'$as_ac_Header'}'`
5590 { echo "$as_me:$LINENO: result: $ac_res" >&5
5591echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592else
Martin v. Löwis11437992002-04-12 09:54:03 +00005593 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005594{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5595echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005597/* confdefs.h. */
5598_ACEOF
5599cat confdefs.h >>conftest.$ac_ext
5600cat >>conftest.$ac_ext <<_ACEOF
5601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005602$ac_includes_default
5603#include <$ac_header>
5604_ACEOF
5605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005606if { (ac_try="$ac_compile"
5607case "(($ac_try" in
5608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5609 *) ac_try_echo=$ac_try;;
5610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005614 grep -v '^ *+' conftest.er1 >conftest.err
5615 rm -f conftest.er1
5616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005618 (exit $ac_status); } && {
5619 test -z "$ac_c_werror_flag" ||
5620 test ! -s conftest.err
5621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005625sed 's/^/| /' conftest.$ac_ext >&5
5626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005627 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005629
5630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005631{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5632echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005633
5634# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005635{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5636echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005638/* confdefs.h. */
5639_ACEOF
5640cat confdefs.h >>conftest.$ac_ext
5641cat >>conftest.$ac_ext <<_ACEOF
5642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005643#include <$ac_header>
5644_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005645if { (ac_try="$ac_cpp conftest.$ac_ext"
5646case "(($ac_try" in
5647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5648 *) ac_try_echo=$ac_try;;
5649esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005651 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005652 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005653 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005654 rm -f conftest.er1
5655 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005657 (exit $ac_status); } >/dev/null && {
5658 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5659 test ! -s conftest.err
5660 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 ac_header_preproc=yes
5662else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005664sed 's/^/| /' conftest.$ac_ext >&5
5665
Martin v. Löwis11437992002-04-12 09:54:03 +00005666 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005668
Martin v. Löwis11437992002-04-12 09:54:03 +00005669rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005670{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5671echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005672
5673# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005674case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5675 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005676 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5677echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5678 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5679echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005680 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005681 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005682 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005683 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5684echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5685 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5686echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5688echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5690echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5692echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5694echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005695 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005696## -------------------------------------- ##
5697## Report this to http://bugs.python.org/ ##
5698## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005699_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005700 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005701 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005703{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5704echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005705if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005706 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005707else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005708 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005710ac_res=`eval echo '${'$as_ac_Header'}'`
5711 { echo "$as_me:$LINENO: result: $ac_res" >&5
5712echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005713
5714fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005715if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005717#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005718_ACEOF
5719
5720fi
5721
Guido van Rossum627b2d71993-12-24 10:39:16 +00005722done
5723
Martin v. Löwis11437992002-04-12 09:54:03 +00005724
5725
5726
5727
5728
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005730for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005731 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5732{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5733echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005734if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005735 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005736else
Martin v. Löwis11437992002-04-12 09:54:03 +00005737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005738/* confdefs.h. */
5739_ACEOF
5740cat confdefs.h >>conftest.$ac_ext
5741cat >>conftest.$ac_ext <<_ACEOF
5742/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743#include <sys/types.h>
5744#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005745
Martin v. Löwis11437992002-04-12 09:54:03 +00005746int
5747main ()
5748{
5749if ((DIR *) 0)
5750return 0;
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005756if { (ac_try="$ac_compile"
5757case "(($ac_try" in
5758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5759 *) ac_try_echo=$ac_try;;
5760esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005764 grep -v '^ *+' conftest.er1 >conftest.err
5765 rm -f conftest.er1
5766 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005768 (exit $ac_status); } && {
5769 test -z "$ac_c_werror_flag" ||
5770 test ! -s conftest.err
5771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005772 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005773else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005775sed 's/^/| /' conftest.$ac_ext >&5
5776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005777 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005779
5780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005781fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005782ac_res=`eval echo '${'$as_ac_Header'}'`
5783 { echo "$as_me:$LINENO: result: $ac_res" >&5
5784echo "${ECHO_T}$ac_res" >&6; }
5785if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005786 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005787#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005788_ACEOF
5789
5790ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005791fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793done
5794# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5795if test $ac_header_dirent = dirent.h; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005796 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5797echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005798if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005799 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005803/* confdefs.h. */
5804_ACEOF
5805cat confdefs.h >>conftest.$ac_ext
5806cat >>conftest.$ac_ext <<_ACEOF
5807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005809/* Override any GCC internal prototype to avoid an error.
5810 Use char because int might match the return type of a GCC
5811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005812#ifdef __cplusplus
5813extern "C"
5814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005815char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005816int
5817main ()
5818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005819return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ;
5821 return 0;
5822}
5823_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005824for ac_lib in '' dir; do
5825 if test -z "$ac_lib"; then
5826 ac_res="none required"
5827 else
5828 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005830 fi
5831 rm -f conftest.$ac_objext conftest$ac_exeext
5832if { (ac_try="$ac_link"
5833case "(($ac_try" in
5834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5835 *) ac_try_echo=$ac_try;;
5836esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005838 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005839 ac_status=$?
5840 grep -v '^ *+' conftest.er1 >conftest.err
5841 rm -f conftest.er1
5842 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005844 (exit $ac_status); } && {
5845 test -z "$ac_c_werror_flag" ||
5846 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005847 } && test -s conftest$ac_exeext &&
5848 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005849 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005851 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005852sed 's/^/| /' conftest.$ac_ext >&5
5853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005854
Thomas Wouters477c8d52006-05-27 19:21:47 +00005855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005856
5857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5858 conftest$ac_exeext
5859 if test "${ac_cv_search_opendir+set}" = set; then
5860 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005862done
5863if test "${ac_cv_search_opendir+set}" = set; then
5864 :
5865else
5866 ac_cv_search_opendir=no
5867fi
5868rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005869LIBS=$ac_func_search_save_LIBS
5870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005871{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5872echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005873ac_res=$ac_cv_search_opendir
5874if test "$ac_res" != no; then
5875 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005876
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005880 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5881echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005882if test "${ac_cv_search_opendir+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005883 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005884else
5885 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005893/* Override any GCC internal prototype to avoid an error.
5894 Use char because int might match the return type of a GCC
5895 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005896#ifdef __cplusplus
5897extern "C"
5898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005899char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005900int
5901main ()
5902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005903return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005904 ;
5905 return 0;
5906}
5907_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005908for ac_lib in '' x; do
5909 if test -z "$ac_lib"; then
5910 ac_res="none required"
5911 else
5912 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005914 fi
5915 rm -f conftest.$ac_objext conftest$ac_exeext
5916if { (ac_try="$ac_link"
5917case "(($ac_try" in
5918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5919 *) ac_try_echo=$ac_try;;
5920esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005923 ac_status=$?
5924 grep -v '^ *+' conftest.er1 >conftest.err
5925 rm -f conftest.er1
5926 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005928 (exit $ac_status); } && {
5929 test -z "$ac_c_werror_flag" ||
5930 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005931 } && test -s conftest$ac_exeext &&
5932 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005935 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005936sed 's/^/| /' conftest.$ac_ext >&5
5937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005938
Thomas Wouters477c8d52006-05-27 19:21:47 +00005939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005940
5941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5942 conftest$ac_exeext
5943 if test "${ac_cv_search_opendir+set}" = set; then
5944 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005946done
5947if test "${ac_cv_search_opendir+set}" = set; then
5948 :
5949else
5950 ac_cv_search_opendir=no
5951fi
5952rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005953LIBS=$ac_func_search_save_LIBS
5954fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005955{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5956echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005957ac_res=$ac_cv_search_opendir
5958if test "$ac_res" != no; then
5959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005960
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961fi
5962
5963fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005964
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005965{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5966echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005968 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005969else
5970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005971/* confdefs.h. */
5972_ACEOF
5973cat confdefs.h >>conftest.$ac_ext
5974cat >>conftest.$ac_ext <<_ACEOF
5975/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005976#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005977int
5978main ()
5979{
5980return makedev(0, 0);
5981 ;
5982 return 0;
5983}
5984_ACEOF
5985rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005986if { (ac_try="$ac_link"
5987case "(($ac_try" in
5988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5989 *) ac_try_echo=$ac_try;;
5990esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005992 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005994 grep -v '^ *+' conftest.er1 >conftest.err
5995 rm -f conftest.er1
5996 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005998 (exit $ac_status); } && {
5999 test -z "$ac_c_werror_flag" ||
6000 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006001 } && test -s conftest$ac_exeext &&
6002 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006003 ac_cv_header_sys_types_h_makedev=yes
6004else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006006sed 's/^/| /' conftest.$ac_ext >&5
6007
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006008 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006010
6011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013
6014fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006015{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6016echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017
6018if test $ac_cv_header_sys_types_h_makedev = no; then
6019if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006020 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6021echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006023 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006024fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006025{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6026echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027else
6028 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006029{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6030echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006032/* confdefs.h. */
6033_ACEOF
6034cat confdefs.h >>conftest.$ac_ext
6035cat >>conftest.$ac_ext <<_ACEOF
6036/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006037$ac_includes_default
6038#include <sys/mkdev.h>
6039_ACEOF
6040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006041if { (ac_try="$ac_compile"
6042case "(($ac_try" in
6043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6044 *) ac_try_echo=$ac_try;;
6045esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006049 grep -v '^ *+' conftest.er1 >conftest.err
6050 rm -f conftest.er1
6051 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006053 (exit $ac_status); } && {
6054 test -z "$ac_c_werror_flag" ||
6055 test ! -s conftest.err
6056 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 ac_header_compiler=yes
6058else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006059 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006060sed 's/^/| /' conftest.$ac_ext >&5
6061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006064
6065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006066{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6067echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068
6069# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006070{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6071echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006073/* confdefs.h. */
6074_ACEOF
6075cat confdefs.h >>conftest.$ac_ext
6076cat >>conftest.$ac_ext <<_ACEOF
6077/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006078#include <sys/mkdev.h>
6079_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006080if { (ac_try="$ac_cpp conftest.$ac_ext"
6081case "(($ac_try" in
6082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6083 *) ac_try_echo=$ac_try;;
6084esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006086 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006088 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089 rm -f conftest.er1
6090 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006092 (exit $ac_status); } >/dev/null && {
6093 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6094 test ! -s conftest.err
6095 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096 ac_header_preproc=yes
6097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006099sed 's/^/| /' conftest.$ac_ext >&5
6100
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006101 ac_header_preproc=no
6102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006103
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006105{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6106echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107
6108# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6110 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006111 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6112echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6113 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6114echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006115 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006116 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006117 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006118 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6119echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006130 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006131## -------------------------------------- ##
6132## Report this to http://bugs.python.org/ ##
6133## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006134_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006136 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006138{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6139echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006141 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006142else
6143 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6144fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006145{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6146echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147
6148fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006149if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150
6151cat >>confdefs.h <<\_ACEOF
6152#define MAJOR_IN_MKDEV 1
6153_ACEOF
6154
6155fi
6156
6157
6158
6159 if test $ac_cv_header_sys_mkdev_h = no; then
6160 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006161 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6162echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006164 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006165fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006166{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6167echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006168else
6169 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006170{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6171echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006173/* confdefs.h. */
6174_ACEOF
6175cat confdefs.h >>conftest.$ac_ext
6176cat >>conftest.$ac_ext <<_ACEOF
6177/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006178$ac_includes_default
6179#include <sys/sysmacros.h>
6180_ACEOF
6181rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182if { (ac_try="$ac_compile"
6183case "(($ac_try" in
6184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6185 *) ac_try_echo=$ac_try;;
6186esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006190 grep -v '^ *+' conftest.er1 >conftest.err
6191 rm -f conftest.er1
6192 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194 (exit $ac_status); } && {
6195 test -z "$ac_c_werror_flag" ||
6196 test ! -s conftest.err
6197 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198 ac_header_compiler=yes
6199else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006201sed 's/^/| /' conftest.$ac_ext >&5
6202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006205
6206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006207{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6208echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209
6210# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006211{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6212echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006214/* confdefs.h. */
6215_ACEOF
6216cat confdefs.h >>conftest.$ac_ext
6217cat >>conftest.$ac_ext <<_ACEOF
6218/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006219#include <sys/sysmacros.h>
6220_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006221if { (ac_try="$ac_cpp conftest.$ac_ext"
6222case "(($ac_try" in
6223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6224 *) ac_try_echo=$ac_try;;
6225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006227 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006229 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230 rm -f conftest.er1
6231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006233 (exit $ac_status); } >/dev/null && {
6234 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6235 test ! -s conftest.err
6236 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_header_preproc=yes
6238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006240sed 's/^/| /' conftest.$ac_ext >&5
6241
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006242 ac_header_preproc=no
6243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006244
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006245rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006246{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6247echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248
6249# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6251 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006252 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6253echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6254 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6255echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006256 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006257 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006258 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006259 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6260echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006272## -------------------------------------- ##
6273## Report this to http://bugs.python.org/ ##
6274## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006275_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006276 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006277 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006278esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006279{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6280echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006282 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006283else
6284 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6285fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006286{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6287echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288
6289fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006290if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291
6292cat >>confdefs.h <<\_ACEOF
6293#define MAJOR_IN_SYSMACROS 1
6294_ACEOF
6295
6296fi
6297
6298
6299 fi
6300fi
6301
Michael W. Hudson54241132001-12-07 15:38:26 +00006302
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006303# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006304
6305for ac_header in term.h
6306do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006307as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6308{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6309echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006310if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006311 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006312else
6313 cat >conftest.$ac_ext <<_ACEOF
6314/* confdefs.h. */
6315_ACEOF
6316cat confdefs.h >>conftest.$ac_ext
6317cat >>conftest.$ac_ext <<_ACEOF
6318/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006319
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006320#ifdef HAVE_CURSES_H
6321#include <curses.h>
6322#endif
6323
6324
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006325#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006326_ACEOF
6327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006328if { (ac_try="$ac_compile"
6329case "(($ac_try" in
6330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6331 *) ac_try_echo=$ac_try;;
6332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335 ac_status=$?
6336 grep -v '^ *+' conftest.er1 >conftest.err
6337 rm -f conftest.er1
6338 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006340 (exit $ac_status); } && {
6341 test -z "$ac_c_werror_flag" ||
6342 test ! -s conftest.err
6343 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006344 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006346 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006347sed 's/^/| /' conftest.$ac_ext >&5
6348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006351
6352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006353fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006354ac_res=`eval echo '${'$as_ac_Header'}'`
6355 { echo "$as_me:$LINENO: result: $ac_res" >&5
6356echo "${ECHO_T}$ac_res" >&6; }
6357if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006358 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006359#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006360_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006361
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362fi
6363
6364done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
6366
Martin v. Löwis11017b12006-01-14 18:12:57 +00006367# On Linux, netlink.h requires asm/types.h
6368
6369for ac_header in linux/netlink.h
6370do
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006371as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6372{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6373echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006375 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376else
6377 cat >conftest.$ac_ext <<_ACEOF
6378/* confdefs.h. */
6379_ACEOF
6380cat confdefs.h >>conftest.$ac_ext
6381cat >>conftest.$ac_ext <<_ACEOF
6382/* end confdefs.h. */
6383
6384#ifdef HAVE_ASM_TYPES_H
6385#include <asm/types.h>
6386#endif
6387#ifdef HAVE_SYS_SOCKET_H
6388#include <sys/socket.h>
6389#endif
6390
6391
6392#include <$ac_header>
6393_ACEOF
6394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006395if { (ac_try="$ac_compile"
6396case "(($ac_try" in
6397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6398 *) ac_try_echo=$ac_try;;
6399esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006402 ac_status=$?
6403 grep -v '^ *+' conftest.er1 >conftest.err
6404 rm -f conftest.er1
6405 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006407 (exit $ac_status); } && {
6408 test -z "$ac_c_werror_flag" ||
6409 test ! -s conftest.err
6410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411 eval "$as_ac_Header=yes"
6412else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006413 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006414sed 's/^/| /' conftest.$ac_ext >&5
6415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006418
6419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006421ac_res=`eval echo '${'$as_ac_Header'}'`
6422 { echo "$as_me:$LINENO: result: $ac_res" >&5
6423echo "${ECHO_T}$ac_res" >&6; }
6424if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006425 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006427_ACEOF
6428
6429fi
6430
6431done
6432
6433
Guido van Rossum627b2d71993-12-24 10:39:16 +00006434# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006435was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006436{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6437echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006445
6446_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006448 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006449 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006450else
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452
6453cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006455_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006457
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006459rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006461{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6462echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006463
Neal Norwitz11690112002-07-30 01:08:28 +00006464# Check whether using makedev requires defining _OSF_SOURCE
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006465{ echo "$as_me:$LINENO: checking for makedev" >&5
6466echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006467cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006468/* confdefs.h. */
6469_ACEOF
6470cat confdefs.h >>conftest.$ac_ext
6471cat >>conftest.$ac_ext <<_ACEOF
6472/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006473#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006474int
6475main ()
6476{
6477 makedev(0, 0)
6478 ;
6479 return 0;
6480}
6481_ACEOF
6482rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006483if { (ac_try="$ac_link"
6484case "(($ac_try" in
6485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6486 *) ac_try_echo=$ac_try;;
6487esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006489 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006491 grep -v '^ *+' conftest.er1 >conftest.err
6492 rm -f conftest.er1
6493 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006495 (exit $ac_status); } && {
6496 test -z "$ac_c_werror_flag" ||
6497 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006498 } && test -s conftest$ac_exeext &&
6499 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006500 ac_cv_has_makedev=yes
6501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006503sed 's/^/| /' conftest.$ac_ext >&5
6504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507
6508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006510if test "$ac_cv_has_makedev" = "no"; then
6511 # we didn't link, try if _OSF_SOURCE will allow us to link
6512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006513/* confdefs.h. */
6514_ACEOF
6515cat confdefs.h >>conftest.$ac_ext
6516cat >>conftest.$ac_ext <<_ACEOF
6517/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006518
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006519#define _OSF_SOURCE 1
6520#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006521
Neal Norwitz11690112002-07-30 01:08:28 +00006522int
6523main ()
6524{
6525 makedev(0, 0)
6526 ;
6527 return 0;
6528}
6529_ACEOF
6530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531if { (ac_try="$ac_link"
6532case "(($ac_try" in
6533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6534 *) ac_try_echo=$ac_try;;
6535esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539 grep -v '^ *+' conftest.er1 >conftest.err
6540 rm -f conftest.er1
6541 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006543 (exit $ac_status); } && {
6544 test -z "$ac_c_werror_flag" ||
6545 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006546 } && test -s conftest$ac_exeext &&
6547 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006548 ac_cv_has_makedev=yes
6549else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006551sed 's/^/| /' conftest.$ac_ext >&5
6552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006553 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006555
6556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006558 if test "$ac_cv_has_makedev" = "yes"; then
6559
6560cat >>confdefs.h <<\_ACEOF
6561#define _OSF_SOURCE 1
6562_ACEOF
6563
6564 fi
6565fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006566{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6567echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006568if test "$ac_cv_has_makedev" = "yes"; then
6569
6570cat >>confdefs.h <<\_ACEOF
6571#define HAVE_MAKEDEV 1
6572_ACEOF
6573
6574fi
6575
Martin v. Löwis399a6892002-10-04 10:22:02 +00006576# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6577# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6578# defined, but the compiler does not support pragma redefine_extname,
6579# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6580# structures (such as rlimit64) without declaring them. As a
6581# work-around, disable LFS on such configurations
6582
6583use_lfs=yes
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006584{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6585echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006587/* confdefs.h. */
6588_ACEOF
6589cat confdefs.h >>conftest.$ac_ext
6590cat >>conftest.$ac_ext <<_ACEOF
6591/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006592
6593#define _LARGEFILE_SOURCE 1
6594#define _FILE_OFFSET_BITS 64
6595#include <sys/resource.h>
6596
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597int
6598main ()
6599{
6600struct rlimit foo;
6601 ;
6602 return 0;
6603}
6604_ACEOF
6605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606if { (ac_try="$ac_compile"
6607case "(($ac_try" in
6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609 *) ac_try_echo=$ac_try;;
6610esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 grep -v '^ *+' conftest.er1 >conftest.err
6615 rm -f conftest.er1
6616 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618 (exit $ac_status); } && {
6619 test -z "$ac_c_werror_flag" ||
6620 test ! -s conftest.err
6621 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622 sol_lfs_bug=no
6623else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006625sed 's/^/| /' conftest.$ac_ext >&5
6626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629
6630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006631{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6632echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006633if test "$sol_lfs_bug" = "yes"; then
6634 use_lfs=no
6635fi
6636
6637if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006638# Two defines needed to enable largefile support on various platforms
6639# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006640
Martin v. Löwis11437992002-04-12 09:54:03 +00006641cat >>confdefs.h <<\_ACEOF
6642#define _LARGEFILE_SOURCE 1
6643_ACEOF
6644
6645
6646cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006647#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006648_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006649
Martin v. Löwis399a6892002-10-04 10:22:02 +00006650fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006651
Guido van Rossum84e7b241996-08-19 21:59:00 +00006652# Add some code to confdefs.h so that the test for off_t works on SCO
6653cat >> confdefs.h <<\EOF
6654#if defined(SCO_DS)
6655#undef _OFF_T
6656#endif
6657EOF
6658
Guido van Rossumef2255b2000-03-10 22:30:29 +00006659# Type availability checks
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006660{ echo "$as_me:$LINENO: checking for mode_t" >&5
6661echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006662if test "${ac_cv_type_mode_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006663 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006664else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006665 cat >conftest.$ac_ext <<_ACEOF
6666/* confdefs.h. */
6667_ACEOF
6668cat confdefs.h >>conftest.$ac_ext
6669cat >>conftest.$ac_ext <<_ACEOF
6670/* end confdefs.h. */
6671$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006672typedef mode_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006673int
6674main ()
6675{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006676if ((ac__type_new_ *) 0)
6677 return 0;
6678if (sizeof (ac__type_new_))
6679 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006680 ;
6681 return 0;
6682}
6683_ACEOF
6684rm -f conftest.$ac_objext
6685if { (ac_try="$ac_compile"
6686case "(($ac_try" in
6687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6688 *) ac_try_echo=$ac_try;;
6689esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006691 (eval "$ac_compile") 2>conftest.er1
6692 ac_status=$?
6693 grep -v '^ *+' conftest.er1 >conftest.err
6694 rm -f conftest.er1
6695 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006697 (exit $ac_status); } && {
6698 test -z "$ac_c_werror_flag" ||
6699 test ! -s conftest.err
6700 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006701 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006704sed 's/^/| /' conftest.$ac_ext >&5
6705
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006706 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708
6709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006710fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006711{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6712echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6713if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006714 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006715else
Martin v. Löwis11437992002-04-12 09:54:03 +00006716
6717cat >>confdefs.h <<_ACEOF
6718#define mode_t int
6719_ACEOF
6720
6721fi
6722
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006723{ echo "$as_me:$LINENO: checking for off_t" >&5
6724echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006725if test "${ac_cv_type_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006726 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006727else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006728 cat >conftest.$ac_ext <<_ACEOF
6729/* confdefs.h. */
6730_ACEOF
6731cat confdefs.h >>conftest.$ac_ext
6732cat >>conftest.$ac_ext <<_ACEOF
6733/* end confdefs.h. */
6734$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006735typedef off_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006736int
6737main ()
6738{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006739if ((ac__type_new_ *) 0)
6740 return 0;
6741if (sizeof (ac__type_new_))
6742 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006743 ;
6744 return 0;
6745}
6746_ACEOF
6747rm -f conftest.$ac_objext
6748if { (ac_try="$ac_compile"
6749case "(($ac_try" in
6750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6751 *) ac_try_echo=$ac_try;;
6752esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006754 (eval "$ac_compile") 2>conftest.er1
6755 ac_status=$?
6756 grep -v '^ *+' conftest.er1 >conftest.err
6757 rm -f conftest.er1
6758 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006760 (exit $ac_status); } && {
6761 test -z "$ac_c_werror_flag" ||
6762 test ! -s conftest.err
6763 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006764 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006765else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006767sed 's/^/| /' conftest.$ac_ext >&5
6768
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006769 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771
6772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006773fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006774{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6775echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6776if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006777 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006778else
Martin v. Löwis11437992002-04-12 09:54:03 +00006779
6780cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006781#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006782_ACEOF
6783
6784fi
6785
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006786{ echo "$as_me:$LINENO: checking for pid_t" >&5
6787echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006788if test "${ac_cv_type_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006790else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006791 cat >conftest.$ac_ext <<_ACEOF
6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
6797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006798typedef pid_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006799int
6800main ()
6801{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006802if ((ac__type_new_ *) 0)
6803 return 0;
6804if (sizeof (ac__type_new_))
6805 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006806 ;
6807 return 0;
6808}
6809_ACEOF
6810rm -f conftest.$ac_objext
6811if { (ac_try="$ac_compile"
6812case "(($ac_try" in
6813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6814 *) ac_try_echo=$ac_try;;
6815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006817 (eval "$ac_compile") 2>conftest.er1
6818 ac_status=$?
6819 grep -v '^ *+' conftest.er1 >conftest.err
6820 rm -f conftest.er1
6821 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006823 (exit $ac_status); } && {
6824 test -z "$ac_c_werror_flag" ||
6825 test ! -s conftest.err
6826 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006827 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006828else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006829 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006830sed 's/^/| /' conftest.$ac_ext >&5
6831
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006832 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834
6835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006836fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006837{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6838echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6839if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006840 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841else
Martin v. Löwis11437992002-04-12 09:54:03 +00006842
6843cat >>confdefs.h <<_ACEOF
6844#define pid_t int
6845_ACEOF
6846
6847fi
6848
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006849{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6850echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006851if test "${ac_cv_type_signal+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006852 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006853else
6854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006855/* confdefs.h. */
6856_ACEOF
6857cat confdefs.h >>conftest.$ac_ext
6858cat >>conftest.$ac_ext <<_ACEOF
6859/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006860#include <sys/types.h>
6861#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863int
6864main ()
6865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006872if { (ac_try="$ac_compile"
6873case "(($ac_try" in
6874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6875 *) ac_try_echo=$ac_try;;
6876esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006880 grep -v '^ *+' conftest.er1 >conftest.err
6881 rm -f conftest.er1
6882 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884 (exit $ac_status); } && {
6885 test -z "$ac_c_werror_flag" ||
6886 test ! -s conftest.err
6887 } && test -s conftest.$ac_objext; then
6888 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006891sed 's/^/| /' conftest.$ac_ext >&5
6892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006898{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6899echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006900
Martin v. Löwis11437992002-04-12 09:54:03 +00006901cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006902#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006904
Michael W. Hudson54241132001-12-07 15:38:26 +00006905
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006906{ echo "$as_me:$LINENO: checking for size_t" >&5
6907echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006908if test "${ac_cv_type_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006911 cat >conftest.$ac_ext <<_ACEOF
6912/* confdefs.h. */
6913_ACEOF
6914cat confdefs.h >>conftest.$ac_ext
6915cat >>conftest.$ac_ext <<_ACEOF
6916/* end confdefs.h. */
6917$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006918typedef size_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006919int
6920main ()
6921{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006922if ((ac__type_new_ *) 0)
6923 return 0;
6924if (sizeof (ac__type_new_))
6925 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006926 ;
6927 return 0;
6928}
6929_ACEOF
6930rm -f conftest.$ac_objext
6931if { (ac_try="$ac_compile"
6932case "(($ac_try" in
6933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6934 *) ac_try_echo=$ac_try;;
6935esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006937 (eval "$ac_compile") 2>conftest.er1
6938 ac_status=$?
6939 grep -v '^ *+' conftest.er1 >conftest.err
6940 rm -f conftest.er1
6941 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006943 (exit $ac_status); } && {
6944 test -z "$ac_c_werror_flag" ||
6945 test ! -s conftest.err
6946 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006947 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006948else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006950sed 's/^/| /' conftest.$ac_ext >&5
6951
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006952 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006954
6955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006956fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006957{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6958echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6959if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006961else
Martin v. Löwis11437992002-04-12 09:54:03 +00006962
6963cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006964#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006965_ACEOF
6966
6967fi
6968
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006969{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6970echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006971if test "${ac_cv_type_uid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006973else
6974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006975/* confdefs.h. */
6976_ACEOF
6977cat confdefs.h >>conftest.$ac_ext
6978cat >>conftest.$ac_ext <<_ACEOF
6979/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
6982_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006984 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985 ac_cv_type_uid_t=yes
6986else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987 ac_cv_type_uid_t=no
6988fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +00006989rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006990
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00006992{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6993echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006994if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995
Martin v. Löwis11437992002-04-12 09:54:03 +00006996cat >>confdefs.h <<\_ACEOF
6997#define uid_t int
6998_ACEOF
6999
7000
7001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007003_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004
7005fi
7006
Mark Dickinsonbd792642009-03-18 20:06:12 +00007007
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007008 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7009echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007010if test "${ac_cv_c_uint32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007011 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007012else
7013 ac_cv_c_uint32_t=no
7014 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7015 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7016 cat >conftest.$ac_ext <<_ACEOF
7017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
7022$ac_includes_default
7023int
7024main ()
7025{
7026static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7027test_array [0] = 0
7028
7029 ;
7030 return 0;
7031}
7032_ACEOF
7033rm -f conftest.$ac_objext
7034if { (ac_try="$ac_compile"
7035case "(($ac_try" in
7036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7037 *) ac_try_echo=$ac_try;;
7038esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007040 (eval "$ac_compile") 2>conftest.er1
7041 ac_status=$?
7042 grep -v '^ *+' conftest.er1 >conftest.err
7043 rm -f conftest.er1
7044 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007046 (exit $ac_status); } && {
7047 test -z "$ac_c_werror_flag" ||
7048 test ! -s conftest.err
7049 } && test -s conftest.$ac_objext; then
7050 case $ac_type in
7051 uint32_t) ac_cv_c_uint32_t=yes ;;
7052 *) ac_cv_c_uint32_t=$ac_type ;;
7053esac
7054
7055else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007056 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007057sed 's/^/| /' conftest.$ac_ext >&5
7058
7059
7060fi
7061
7062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7063 test "$ac_cv_c_uint32_t" != no && break
7064 done
7065fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007066{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7067echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007068 case $ac_cv_c_uint32_t in #(
7069 no|yes) ;; #(
7070 *)
7071
7072cat >>confdefs.h <<\_ACEOF
7073#define _UINT32_T 1
7074_ACEOF
7075
7076
7077cat >>confdefs.h <<_ACEOF
7078#define uint32_t $ac_cv_c_uint32_t
7079_ACEOF
7080;;
7081 esac
7082
7083
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007084 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7085echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007086if test "${ac_cv_c_uint64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007087 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007088else
7089 ac_cv_c_uint64_t=no
7090 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7091 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7092 cat >conftest.$ac_ext <<_ACEOF
7093/* confdefs.h. */
7094_ACEOF
7095cat confdefs.h >>conftest.$ac_ext
7096cat >>conftest.$ac_ext <<_ACEOF
7097/* end confdefs.h. */
7098$ac_includes_default
7099int
7100main ()
7101{
7102static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7103test_array [0] = 0
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109rm -f conftest.$ac_objext
7110if { (ac_try="$ac_compile"
7111case "(($ac_try" in
7112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7113 *) ac_try_echo=$ac_try;;
7114esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007116 (eval "$ac_compile") 2>conftest.er1
7117 ac_status=$?
7118 grep -v '^ *+' conftest.er1 >conftest.err
7119 rm -f conftest.er1
7120 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007122 (exit $ac_status); } && {
7123 test -z "$ac_c_werror_flag" ||
7124 test ! -s conftest.err
7125 } && test -s conftest.$ac_objext; then
7126 case $ac_type in
7127 uint64_t) ac_cv_c_uint64_t=yes ;;
7128 *) ac_cv_c_uint64_t=$ac_type ;;
7129esac
7130
7131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007132 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007133sed 's/^/| /' conftest.$ac_ext >&5
7134
7135
7136fi
7137
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139 test "$ac_cv_c_uint64_t" != no && break
7140 done
7141fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007142{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7143echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007144 case $ac_cv_c_uint64_t in #(
7145 no|yes) ;; #(
7146 *)
7147
7148cat >>confdefs.h <<\_ACEOF
7149#define _UINT64_T 1
7150_ACEOF
7151
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uint64_t $ac_cv_c_uint64_t
7155_ACEOF
7156;;
7157 esac
7158
7159
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007160 { echo "$as_me:$LINENO: checking for int32_t" >&5
7161echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007162if test "${ac_cv_c_int32_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007163 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007164else
7165 ac_cv_c_int32_t=no
7166 for ac_type in 'int32_t' 'int' 'long int' \
7167 'long long int' 'short int' 'signed char'; do
7168 cat >conftest.$ac_ext <<_ACEOF
7169/* confdefs.h. */
7170_ACEOF
7171cat confdefs.h >>conftest.$ac_ext
7172cat >>conftest.$ac_ext <<_ACEOF
7173/* end confdefs.h. */
7174$ac_includes_default
7175int
7176main ()
7177{
7178static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7179test_array [0] = 0
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185rm -f conftest.$ac_objext
7186if { (ac_try="$ac_compile"
7187case "(($ac_try" in
7188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7189 *) ac_try_echo=$ac_try;;
7190esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007192 (eval "$ac_compile") 2>conftest.er1
7193 ac_status=$?
7194 grep -v '^ *+' conftest.er1 >conftest.err
7195 rm -f conftest.er1
7196 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007198 (exit $ac_status); } && {
7199 test -z "$ac_c_werror_flag" ||
7200 test ! -s conftest.err
7201 } && test -s conftest.$ac_objext; then
7202 cat >conftest.$ac_ext <<_ACEOF
7203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
7208$ac_includes_default
7209int
7210main ()
7211{
7212static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007213 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
7221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007227 (eval "$ac_compile") 2>conftest.er1
7228 ac_status=$?
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
7237 :
7238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007239 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007240sed 's/^/| /' conftest.$ac_ext >&5
7241
7242 case $ac_type in
7243 int32_t) ac_cv_c_int32_t=yes ;;
7244 *) ac_cv_c_int32_t=$ac_type ;;
7245esac
7246
7247fi
7248
7249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7250else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007251 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007252sed 's/^/| /' conftest.$ac_ext >&5
7253
7254
7255fi
7256
7257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7258 test "$ac_cv_c_int32_t" != no && break
7259 done
7260fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007261{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7262echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007263 case $ac_cv_c_int32_t in #(
7264 no|yes) ;; #(
7265 *)
7266
7267cat >>confdefs.h <<_ACEOF
7268#define int32_t $ac_cv_c_int32_t
7269_ACEOF
7270;;
7271 esac
7272
7273
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007274 { echo "$as_me:$LINENO: checking for int64_t" >&5
7275echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007276if test "${ac_cv_c_int64_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007277 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007278else
7279 ac_cv_c_int64_t=no
7280 for ac_type in 'int64_t' 'int' 'long int' \
7281 'long long int' 'short int' 'signed char'; do
7282 cat >conftest.$ac_ext <<_ACEOF
7283/* confdefs.h. */
7284_ACEOF
7285cat confdefs.h >>conftest.$ac_ext
7286cat >>conftest.$ac_ext <<_ACEOF
7287/* end confdefs.h. */
7288$ac_includes_default
7289int
7290main ()
7291{
7292static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7293test_array [0] = 0
7294
7295 ;
7296 return 0;
7297}
7298_ACEOF
7299rm -f conftest.$ac_objext
7300if { (ac_try="$ac_compile"
7301case "(($ac_try" in
7302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7303 *) ac_try_echo=$ac_try;;
7304esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007306 (eval "$ac_compile") 2>conftest.er1
7307 ac_status=$?
7308 grep -v '^ *+' conftest.er1 >conftest.err
7309 rm -f conftest.er1
7310 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007312 (exit $ac_status); } && {
7313 test -z "$ac_c_werror_flag" ||
7314 test ! -s conftest.err
7315 } && test -s conftest.$ac_objext; then
7316 cat >conftest.$ac_ext <<_ACEOF
7317/* confdefs.h. */
7318_ACEOF
7319cat confdefs.h >>conftest.$ac_ext
7320cat >>conftest.$ac_ext <<_ACEOF
7321/* end confdefs.h. */
7322$ac_includes_default
7323int
7324main ()
7325{
7326static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007327 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007328test_array [0] = 0
7329
7330 ;
7331 return 0;
7332}
7333_ACEOF
7334rm -f conftest.$ac_objext
7335if { (ac_try="$ac_compile"
7336case "(($ac_try" in
7337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7338 *) ac_try_echo=$ac_try;;
7339esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007341 (eval "$ac_compile") 2>conftest.er1
7342 ac_status=$?
7343 grep -v '^ *+' conftest.er1 >conftest.err
7344 rm -f conftest.er1
7345 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347 (exit $ac_status); } && {
7348 test -z "$ac_c_werror_flag" ||
7349 test ! -s conftest.err
7350 } && test -s conftest.$ac_objext; then
7351 :
7352else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007353 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007354sed 's/^/| /' conftest.$ac_ext >&5
7355
7356 case $ac_type in
7357 int64_t) ac_cv_c_int64_t=yes ;;
7358 *) ac_cv_c_int64_t=$ac_type ;;
7359esac
7360
7361fi
7362
7363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007365 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007366sed 's/^/| /' conftest.$ac_ext >&5
7367
7368
7369fi
7370
7371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372 test "$ac_cv_c_int64_t" != no && break
7373 done
7374fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007375{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7376echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007377 case $ac_cv_c_int64_t in #(
7378 no|yes) ;; #(
7379 *)
7380
7381cat >>confdefs.h <<_ACEOF
7382#define int64_t $ac_cv_c_int64_t
7383_ACEOF
7384;;
7385 esac
7386
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007387{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7388echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007389if test "${ac_cv_type_ssize_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007391else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007392 cat >conftest.$ac_ext <<_ACEOF
7393/* confdefs.h. */
7394_ACEOF
7395cat confdefs.h >>conftest.$ac_ext
7396cat >>conftest.$ac_ext <<_ACEOF
7397/* end confdefs.h. */
7398$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007399typedef ssize_t ac__type_new_;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007400int
7401main ()
7402{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007403if ((ac__type_new_ *) 0)
7404 return 0;
7405if (sizeof (ac__type_new_))
7406 return 0;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007418 (eval "$ac_compile") 2>conftest.er1
7419 ac_status=$?
7420 grep -v '^ *+' conftest.er1 >conftest.err
7421 rm -f conftest.er1
7422 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007424 (exit $ac_status); } && {
7425 test -z "$ac_c_werror_flag" ||
7426 test ! -s conftest.err
7427 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007428 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007430 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431sed 's/^/| /' conftest.$ac_ext >&5
7432
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007433 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007435
7436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007437fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007438{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7439echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7440if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007441
7442cat >>confdefs.h <<\_ACEOF
7443#define HAVE_SSIZE_T 1
7444_ACEOF
7445
7446fi
7447
Jack Jansendd19cf82001-12-06 22:36:17 +00007448
Michael W. Hudson54241132001-12-07 15:38:26 +00007449# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007450# ANSI C requires sizeof(char) == 1, so no need to check it
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007451{ echo "$as_me:$LINENO: checking for int" >&5
7452echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7453if test "${ac_cv_type_int+set}" = set; then
7454 echo $ECHO_N "(cached) $ECHO_C" >&6
7455else
7456 cat >conftest.$ac_ext <<_ACEOF
7457/* confdefs.h. */
7458_ACEOF
7459cat confdefs.h >>conftest.$ac_ext
7460cat >>conftest.$ac_ext <<_ACEOF
7461/* end confdefs.h. */
7462$ac_includes_default
7463typedef int ac__type_new_;
7464int
7465main ()
7466{
7467if ((ac__type_new_ *) 0)
7468 return 0;
7469if (sizeof (ac__type_new_))
7470 return 0;
7471 ;
7472 return 0;
7473}
7474_ACEOF
7475rm -f conftest.$ac_objext
7476if { (ac_try="$ac_compile"
7477case "(($ac_try" in
7478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7479 *) ac_try_echo=$ac_try;;
7480esac
7481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7482 (eval "$ac_compile") 2>conftest.er1
7483 ac_status=$?
7484 grep -v '^ *+' conftest.er1 >conftest.err
7485 rm -f conftest.er1
7486 cat conftest.err >&5
7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488 (exit $ac_status); } && {
7489 test -z "$ac_c_werror_flag" ||
7490 test ! -s conftest.err
7491 } && test -s conftest.$ac_objext; then
7492 ac_cv_type_int=yes
7493else
7494 echo "$as_me: failed program was:" >&5
7495sed 's/^/| /' conftest.$ac_ext >&5
7496
7497 ac_cv_type_int=no
7498fi
7499
7500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7501fi
7502{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7503echo "${ECHO_T}$ac_cv_type_int" >&6; }
7504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007505# The cast to long int works around a bug in the HP C Compiler
7506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007509{ echo "$as_me:$LINENO: checking size of int" >&5
7510echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007511if test "${ac_cv_sizeof_int+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007512 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007513else
Martin v. Löwis11437992002-04-12 09:54:03 +00007514 if test "$cross_compiling" = yes; then
7515 # Depending upon the size, compute the lo and hi bounds.
7516cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007517/* confdefs.h. */
7518_ACEOF
7519cat confdefs.h >>conftest.$ac_ext
7520cat >>conftest.$ac_ext <<_ACEOF
7521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007522$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007523 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007524int
7525main ()
7526{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007528test_array [0] = 0
7529
7530 ;
7531 return 0;
7532}
7533_ACEOF
7534rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007535if { (ac_try="$ac_compile"
7536case "(($ac_try" in
7537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7538 *) ac_try_echo=$ac_try;;
7539esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007543 grep -v '^ *+' conftest.er1 >conftest.err
7544 rm -f conftest.er1
7545 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007547 (exit $ac_status); } && {
7548 test -z "$ac_c_werror_flag" ||
7549 test ! -s conftest.err
7550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_lo=0 ac_mid=0
7552 while :; do
7553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007554/* confdefs.h. */
7555_ACEOF
7556cat confdefs.h >>conftest.$ac_ext
7557cat >>conftest.$ac_ext <<_ACEOF
7558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007559$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007560 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007561int
7562main ()
7563{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007564static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007565test_array [0] = 0
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572if { (ac_try="$ac_compile"
7573case "(($ac_try" in
7574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575 *) ac_try_echo=$ac_try;;
7576esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584 (exit $ac_status); } && {
7585 test -z "$ac_c_werror_flag" ||
7586 test ! -s conftest.err
7587 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_hi=$ac_mid; break
7589else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007591sed 's/^/| /' conftest.$ac_ext >&5
7592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 ac_lo=`expr $ac_mid + 1`
7594 if test $ac_lo -le $ac_mid; then
7595 ac_lo= ac_hi=
7596 break
7597 fi
7598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600
7601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 done
7603else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007605sed 's/^/| /' conftest.$ac_ext >&5
7606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007608/* confdefs.h. */
7609_ACEOF
7610cat confdefs.h >>conftest.$ac_ext
7611cat >>conftest.$ac_ext <<_ACEOF
7612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007613$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007614 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007615int
7616main ()
7617{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007618static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007619test_array [0] = 0
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_hi=-1 ac_mid=-1
7643 while :; do
7644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007650$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007651 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007655static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007656test_array [0] = 0
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_lo=$ac_mid; break
7680else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 ac_hi=`expr '(' $ac_mid ')' - 1`
7685 if test $ac_mid -le $ac_hi; then
7686 ac_lo= ac_hi=
7687 break
7688 fi
7689 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691
7692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 done
7694else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007696sed 's/^/| /' conftest.$ac_ext >&5
7697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700
7701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703
7704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007705# Binary search between lo and hi bounds.
7706while test "x$ac_lo" != "x$ac_hi"; do
7707 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007709/* confdefs.h. */
7710_ACEOF
7711cat confdefs.h >>conftest.$ac_ext
7712cat >>conftest.$ac_ext <<_ACEOF
7713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007715 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007716int
7717main ()
7718{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007720test_array [0] = 0
7721
7722 ;
7723 return 0;
7724}
7725_ACEOF
7726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727if { (ac_try="$ac_compile"
7728case "(($ac_try" in
7729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7730 *) ac_try_echo=$ac_try;;
7731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007735 grep -v '^ *+' conftest.er1 >conftest.err
7736 rm -f conftest.er1
7737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739 (exit $ac_status); } && {
7740 test -z "$ac_c_werror_flag" ||
7741 test ! -s conftest.err
7742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_hi=$ac_mid
7744else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007746sed 's/^/| /' conftest.$ac_ext >&5
7747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007750
7751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007752done
7753case $ac_lo in
7754?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755'') if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007756 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007757See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007758echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007759See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007760 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761 else
7762 ac_cv_sizeof_int=0
7763 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007764esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765else
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007767/* confdefs.h. */
7768_ACEOF
7769cat confdefs.h >>conftest.$ac_ext
7770cat >>conftest.$ac_ext <<_ACEOF
7771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007772$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007773 typedef int ac__type_sizeof_;
7774static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7775static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007776#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007777#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007780{
Martin v. Löwis11437992002-04-12 09:54:03 +00007781
7782 FILE *f = fopen ("conftest.val", "w");
7783 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007785 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007788 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007790 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007791 }
7792 else
7793 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007795 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007797 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
7801 ;
7802 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007803}
Martin v. Löwis11437992002-04-12 09:54:03 +00007804_ACEOF
7805rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806if { (ac_try="$ac_link"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007815 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 { (case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 (exit $ac_status); }; }; then
7825 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007826else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007827 echo "$as_me: program exited with status $ac_status" >&5
7828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007829sed 's/^/| /' conftest.$ac_ext >&5
7830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832if test "$ac_cv_type_int" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007833 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007834See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007835echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007836See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007837 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838 else
7839 ac_cv_sizeof_int=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842rm -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 +00007843fi
7844rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007846{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7847echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848
7849
7850
Martin v. Löwis11437992002-04-12 09:54:03 +00007851cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007852#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854
7855
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007856{ echo "$as_me:$LINENO: checking for long" >&5
7857echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7858if test "${ac_cv_type_long+set}" = set; then
7859 echo $ECHO_N "(cached) $ECHO_C" >&6
7860else
7861 cat >conftest.$ac_ext <<_ACEOF
7862/* confdefs.h. */
7863_ACEOF
7864cat confdefs.h >>conftest.$ac_ext
7865cat >>conftest.$ac_ext <<_ACEOF
7866/* end confdefs.h. */
7867$ac_includes_default
7868typedef long ac__type_new_;
7869int
7870main ()
7871{
7872if ((ac__type_new_ *) 0)
7873 return 0;
7874if (sizeof (ac__type_new_))
7875 return 0;
7876 ;
7877 return 0;
7878}
7879_ACEOF
7880rm -f conftest.$ac_objext
7881if { (ac_try="$ac_compile"
7882case "(($ac_try" in
7883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7884 *) ac_try_echo=$ac_try;;
7885esac
7886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7887 (eval "$ac_compile") 2>conftest.er1
7888 ac_status=$?
7889 grep -v '^ *+' conftest.er1 >conftest.err
7890 rm -f conftest.er1
7891 cat conftest.err >&5
7892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7893 (exit $ac_status); } && {
7894 test -z "$ac_c_werror_flag" ||
7895 test ! -s conftest.err
7896 } && test -s conftest.$ac_objext; then
7897 ac_cv_type_long=yes
7898else
7899 echo "$as_me: failed program was:" >&5
7900sed 's/^/| /' conftest.$ac_ext >&5
7901
7902 ac_cv_type_long=no
7903fi
7904
7905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7906fi
7907{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7908echo "${ECHO_T}$ac_cv_type_long" >&6; }
7909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007914{ echo "$as_me:$LINENO: checking size of long" >&5
7915echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007916if test "${ac_cv_sizeof_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007917 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 if test "$cross_compiling" = yes; then
7920 # Depending upon the size, compute the lo and hi bounds.
7921cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007928 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007929int
7930main ()
7931{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007933test_array [0] = 0
7934
7935 ;
7936 return 0;
7937}
7938_ACEOF
7939rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940if { (ac_try="$ac_compile"
7941case "(($ac_try" in
7942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7943 *) ac_try_echo=$ac_try;;
7944esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 (exit $ac_status); } && {
7953 test -z "$ac_c_werror_flag" ||
7954 test ! -s conftest.err
7955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_lo=0 ac_mid=0
7957 while :; do
7958 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007964$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007965 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007966int
7967main ()
7968{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007969static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007970test_array [0] = 0
7971
7972 ;
7973 return 0;
7974}
7975_ACEOF
7976rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977if { (ac_try="$ac_compile"
7978case "(($ac_try" in
7979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7980 *) ac_try_echo=$ac_try;;
7981esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007983 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985 grep -v '^ *+' conftest.er1 >conftest.err
7986 rm -f conftest.er1
7987 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989 (exit $ac_status); } && {
7990 test -z "$ac_c_werror_flag" ||
7991 test ! -s conftest.err
7992 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_hi=$ac_mid; break
7994else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00007995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007996sed 's/^/| /' conftest.$ac_ext >&5
7997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 ac_lo=`expr $ac_mid + 1`
7999 if test $ac_lo -le $ac_mid; then
8000 ac_lo= ac_hi=
8001 break
8002 fi
8003 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005
8006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 done
8008else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008010sed 's/^/| /' conftest.$ac_ext >&5
8011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008019 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008020int
8021main ()
8022{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008024test_array [0] = 0
8025
8026 ;
8027 return 0;
8028}
8029_ACEOF
8030rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031if { (ac_try="$ac_compile"
8032case "(($ac_try" in
8033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8034 *) ac_try_echo=$ac_try;;
8035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008039 grep -v '^ *+' conftest.er1 >conftest.err
8040 rm -f conftest.er1
8041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043 (exit $ac_status); } && {
8044 test -z "$ac_c_werror_flag" ||
8045 test ! -s conftest.err
8046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_hi=-1 ac_mid=-1
8048 while :; do
8049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008050/* confdefs.h. */
8051_ACEOF
8052cat confdefs.h >>conftest.$ac_ext
8053cat >>conftest.$ac_ext <<_ACEOF
8054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008055$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008056 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008057int
8058main ()
8059{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008060static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008061test_array [0] = 0
8062
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068if { (ac_try="$ac_compile"
8069case "(($ac_try" in
8070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071 *) ac_try_echo=$ac_try;;
8072esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008080 (exit $ac_status); } && {
8081 test -z "$ac_c_werror_flag" ||
8082 test ! -s conftest.err
8083 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_lo=$ac_mid; break
8085else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008087sed 's/^/| /' conftest.$ac_ext >&5
8088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 ac_hi=`expr '(' $ac_mid ')' - 1`
8090 if test $ac_mid -le $ac_hi; then
8091 ac_lo= ac_hi=
8092 break
8093 fi
8094 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096
8097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 done
8099else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008101sed 's/^/| /' conftest.$ac_ext >&5
8102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105
8106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110# Binary search between lo and hi bounds.
8111while test "x$ac_lo" != "x$ac_hi"; do
8112 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008114/* confdefs.h. */
8115_ACEOF
8116cat confdefs.h >>conftest.$ac_ext
8117cat >>conftest.$ac_ext <<_ACEOF
8118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008119$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008120 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008125test_array [0] = 0
8126
8127 ;
8128 return 0;
8129}
8130_ACEOF
8131rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132if { (ac_try="$ac_compile"
8133case "(($ac_try" in
8134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8135 *) ac_try_echo=$ac_try;;
8136esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008140 grep -v '^ *+' conftest.er1 >conftest.err
8141 rm -f conftest.er1
8142 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 (exit $ac_status); } && {
8145 test -z "$ac_c_werror_flag" ||
8146 test ! -s conftest.err
8147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_hi=$ac_mid
8149else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008151sed 's/^/| /' conftest.$ac_ext >&5
8152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155
8156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008157done
8158case $ac_lo in
8159?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160'') if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008161 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008162See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008163echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008164See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008165 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008166 else
8167 ac_cv_sizeof_long=0
8168 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008169esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008170else
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008178 typedef long ac__type_sizeof_;
8179static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8180static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008181#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008182#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008185{
Martin v. Löwis11437992002-04-12 09:54:03 +00008186
8187 FILE *f = fopen ("conftest.val", "w");
8188 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008189 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008190 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008193 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008195 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 }
8197 else
8198 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008200 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008202 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206 ;
8207 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008208}
Martin v. Löwis11437992002-04-12 09:54:03 +00008209_ACEOF
8210rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211if { (ac_try="$ac_link"
8212case "(($ac_try" in
8213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8214 *) ac_try_echo=$ac_try;;
8215esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008218 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008220 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 { (case "(($ac_try" in
8222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8223 *) ac_try_echo=$ac_try;;
8224esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 (exit $ac_status); }; }; then
8230 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008232 echo "$as_me: program exited with status $ac_status" >&5
8233echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008234sed 's/^/| /' conftest.$ac_ext >&5
8235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237if test "$ac_cv_type_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008238 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008239See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008240echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008241See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008242 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243 else
8244 ac_cv_sizeof_long=0
8245 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247rm -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 +00008248fi
8249rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008250fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008251{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8252echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253
8254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008257#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259
8260
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008261{ echo "$as_me:$LINENO: checking for void *" >&5
8262echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8263if test "${ac_cv_type_void_p+set}" = set; then
8264 echo $ECHO_N "(cached) $ECHO_C" >&6
8265else
8266 cat >conftest.$ac_ext <<_ACEOF
8267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
8272$ac_includes_default
8273typedef void * ac__type_new_;
8274int
8275main ()
8276{
8277if ((ac__type_new_ *) 0)
8278 return 0;
8279if (sizeof (ac__type_new_))
8280 return 0;
8281 ;
8282 return 0;
8283}
8284_ACEOF
8285rm -f conftest.$ac_objext
8286if { (ac_try="$ac_compile"
8287case "(($ac_try" in
8288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8289 *) ac_try_echo=$ac_try;;
8290esac
8291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8292 (eval "$ac_compile") 2>conftest.er1
8293 ac_status=$?
8294 grep -v '^ *+' conftest.er1 >conftest.err
8295 rm -f conftest.er1
8296 cat conftest.err >&5
8297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8298 (exit $ac_status); } && {
8299 test -z "$ac_c_werror_flag" ||
8300 test ! -s conftest.err
8301 } && test -s conftest.$ac_objext; then
8302 ac_cv_type_void_p=yes
8303else
8304 echo "$as_me: failed program was:" >&5
8305sed 's/^/| /' conftest.$ac_ext >&5
8306
8307 ac_cv_type_void_p=no
8308fi
8309
8310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8311fi
8312{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8313echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315# The cast to long int works around a bug in the HP C Compiler
8316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008319{ echo "$as_me:$LINENO: checking size of void *" >&5
8320echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008321if test "${ac_cv_sizeof_void_p+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008322 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008323else
Martin v. Löwis11437992002-04-12 09:54:03 +00008324 if test "$cross_compiling" = yes; then
8325 # Depending upon the size, compute the lo and hi bounds.
8326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008327/* confdefs.h. */
8328_ACEOF
8329cat confdefs.h >>conftest.$ac_ext
8330cat >>conftest.$ac_ext <<_ACEOF
8331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008332$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008333 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334int
8335main ()
8336{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008338test_array [0] = 0
8339
8340 ;
8341 return 0;
8342}
8343_ACEOF
8344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345if { (ac_try="$ac_compile"
8346case "(($ac_try" in
8347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8348 *) ac_try_echo=$ac_try;;
8349esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008353 grep -v '^ *+' conftest.er1 >conftest.err
8354 rm -f conftest.er1
8355 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357 (exit $ac_status); } && {
8358 test -z "$ac_c_werror_flag" ||
8359 test ! -s conftest.err
8360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_lo=0 ac_mid=0
8362 while :; do
8363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008364/* confdefs.h. */
8365_ACEOF
8366cat confdefs.h >>conftest.$ac_ext
8367cat >>conftest.$ac_ext <<_ACEOF
8368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008369$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008370 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008371int
8372main ()
8373{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008375test_array [0] = 0
8376
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382if { (ac_try="$ac_compile"
8383case "(($ac_try" in
8384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8385 *) ac_try_echo=$ac_try;;
8386esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394 (exit $ac_status); } && {
8395 test -z "$ac_c_werror_flag" ||
8396 test ! -s conftest.err
8397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_hi=$ac_mid; break
8399else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008401sed 's/^/| /' conftest.$ac_ext >&5
8402
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 ac_lo=`expr $ac_mid + 1`
8404 if test $ac_lo -le $ac_mid; then
8405 ac_lo= ac_hi=
8406 break
8407 fi
8408 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410
8411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 done
8413else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008415sed 's/^/| /' conftest.$ac_ext >&5
8416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008424 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008425int
8426main ()
8427{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008429test_array [0] = 0
8430
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436if { (ac_try="$ac_compile"
8437case "(($ac_try" in
8438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8439 *) ac_try_echo=$ac_try;;
8440esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008444 grep -v '^ *+' conftest.er1 >conftest.err
8445 rm -f conftest.er1
8446 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008448 (exit $ac_status); } && {
8449 test -z "$ac_c_werror_flag" ||
8450 test ! -s conftest.err
8451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_hi=-1 ac_mid=-1
8453 while :; do
8454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008455/* confdefs.h. */
8456_ACEOF
8457cat confdefs.h >>conftest.$ac_ext
8458cat >>conftest.$ac_ext <<_ACEOF
8459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008460$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008461 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008465static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008466test_array [0] = 0
8467
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473if { (ac_try="$ac_compile"
8474case "(($ac_try" in
8475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8476 *) ac_try_echo=$ac_try;;
8477esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008481 grep -v '^ *+' conftest.er1 >conftest.err
8482 rm -f conftest.er1
8483 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 (exit $ac_status); } && {
8486 test -z "$ac_c_werror_flag" ||
8487 test ! -s conftest.err
8488 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_lo=$ac_mid; break
8490else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008492sed 's/^/| /' conftest.$ac_ext >&5
8493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 ac_hi=`expr '(' $ac_mid ')' - 1`
8495 if test $ac_mid -le $ac_hi; then
8496 ac_lo= ac_hi=
8497 break
8498 fi
8499 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501
8502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 done
8504else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008515# Binary search between lo and hi bounds.
8516while test "x$ac_lo" != "x$ac_hi"; do
8517 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008519/* confdefs.h. */
8520_ACEOF
8521cat confdefs.h >>conftest.$ac_ext
8522cat >>conftest.$ac_ext <<_ACEOF
8523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008524$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008525 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526int
8527main ()
8528{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008529static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008530test_array [0] = 0
8531
8532 ;
8533 return 0;
8534}
8535_ACEOF
8536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537if { (ac_try="$ac_compile"
8538case "(($ac_try" in
8539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8540 *) ac_try_echo=$ac_try;;
8541esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008545 grep -v '^ *+' conftest.er1 >conftest.err
8546 rm -f conftest.er1
8547 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008549 (exit $ac_status); } && {
8550 test -z "$ac_c_werror_flag" ||
8551 test ! -s conftest.err
8552 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_hi=$ac_mid
8554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008556sed 's/^/| /' conftest.$ac_ext >&5
8557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560
8561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008562done
8563case $ac_lo in
8564?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565'') if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008566 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008567See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008568echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008569See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008570 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 else
8572 ac_cv_sizeof_void_p=0
8573 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008574esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008575else
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008577/* confdefs.h. */
8578_ACEOF
8579cat confdefs.h >>conftest.$ac_ext
8580cat >>conftest.$ac_ext <<_ACEOF
8581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008582$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008583 typedef void * ac__type_sizeof_;
8584static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8585static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008586#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008587#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008590{
Martin v. Löwis11437992002-04-12 09:54:03 +00008591
8592 FILE *f = fopen ("conftest.val", "w");
8593 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008595 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008596 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008598 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008600 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 }
8602 else
8603 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008605 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008607 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611 ;
8612 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008613}
Martin v. Löwis11437992002-04-12 09:54:03 +00008614_ACEOF
8615rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616if { (ac_try="$ac_link"
8617case "(($ac_try" in
8618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8619 *) ac_try_echo=$ac_try;;
8620esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 { (case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 (exit $ac_status); }; }; then
8635 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008637 echo "$as_me: program exited with status $ac_status" >&5
8638echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008639sed 's/^/| /' conftest.$ac_ext >&5
8640
Martin v. Löwis11437992002-04-12 09:54:03 +00008641( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642if test "$ac_cv_type_void_p" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008644See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008645echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008646See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008647 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008648 else
8649 ac_cv_sizeof_void_p=0
8650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652rm -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 +00008653fi
8654rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008655fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008656{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8657echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008662#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008664
8665
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008666{ echo "$as_me:$LINENO: checking for short" >&5
8667echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8668if test "${ac_cv_type_short+set}" = set; then
8669 echo $ECHO_N "(cached) $ECHO_C" >&6
8670else
8671 cat >conftest.$ac_ext <<_ACEOF
8672/* confdefs.h. */
8673_ACEOF
8674cat confdefs.h >>conftest.$ac_ext
8675cat >>conftest.$ac_ext <<_ACEOF
8676/* end confdefs.h. */
8677$ac_includes_default
8678typedef short ac__type_new_;
8679int
8680main ()
8681{
8682if ((ac__type_new_ *) 0)
8683 return 0;
8684if (sizeof (ac__type_new_))
8685 return 0;
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690rm -f conftest.$ac_objext
8691if { (ac_try="$ac_compile"
8692case "(($ac_try" in
8693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8694 *) ac_try_echo=$ac_try;;
8695esac
8696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8697 (eval "$ac_compile") 2>conftest.er1
8698 ac_status=$?
8699 grep -v '^ *+' conftest.er1 >conftest.err
8700 rm -f conftest.er1
8701 cat conftest.err >&5
8702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8703 (exit $ac_status); } && {
8704 test -z "$ac_c_werror_flag" ||
8705 test ! -s conftest.err
8706 } && test -s conftest.$ac_objext; then
8707 ac_cv_type_short=yes
8708else
8709 echo "$as_me: failed program was:" >&5
8710sed 's/^/| /' conftest.$ac_ext >&5
8711
8712 ac_cv_type_short=no
8713fi
8714
8715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8716fi
8717{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8718echo "${ECHO_T}$ac_cv_type_short" >&6; }
8719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008724{ echo "$as_me:$LINENO: checking size of short" >&5
8725echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008726if test "${ac_cv_sizeof_short+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008727 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 if test "$cross_compiling" = yes; then
8730 # Depending upon the size, compute the lo and hi bounds.
8731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* confdefs.h. */
8733_ACEOF
8734cat confdefs.h >>conftest.$ac_ext
8735cat >>conftest.$ac_ext <<_ACEOF
8736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008738 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008739int
8740main ()
8741{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008743test_array [0] = 0
8744
8745 ;
8746 return 0;
8747}
8748_ACEOF
8749rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008750if { (ac_try="$ac_compile"
8751case "(($ac_try" in
8752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8753 *) ac_try_echo=$ac_try;;
8754esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008758 grep -v '^ *+' conftest.er1 >conftest.err
8759 rm -f conftest.er1
8760 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762 (exit $ac_status); } && {
8763 test -z "$ac_c_werror_flag" ||
8764 test ! -s conftest.err
8765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_lo=0 ac_mid=0
8767 while :; do
8768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008769/* confdefs.h. */
8770_ACEOF
8771cat confdefs.h >>conftest.$ac_ext
8772cat >>conftest.$ac_ext <<_ACEOF
8773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008775 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008776int
8777main ()
8778{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008780test_array [0] = 0
8781
8782 ;
8783 return 0;
8784}
8785_ACEOF
8786rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787if { (ac_try="$ac_compile"
8788case "(($ac_try" in
8789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8790 *) ac_try_echo=$ac_try;;
8791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008795 grep -v '^ *+' conftest.er1 >conftest.err
8796 rm -f conftest.er1
8797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799 (exit $ac_status); } && {
8800 test -z "$ac_c_werror_flag" ||
8801 test ! -s conftest.err
8802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_hi=$ac_mid; break
8804else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008806sed 's/^/| /' conftest.$ac_ext >&5
8807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808 ac_lo=`expr $ac_mid + 1`
8809 if test $ac_lo -le $ac_mid; then
8810 ac_lo= ac_hi=
8811 break
8812 fi
8813 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815
8816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 done
8818else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008820sed 's/^/| /' conftest.$ac_ext >&5
8821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* confdefs.h. */
8824_ACEOF
8825cat confdefs.h >>conftest.$ac_ext
8826cat >>conftest.$ac_ext <<_ACEOF
8827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008828$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008829 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008834test_array [0] = 0
8835
8836 ;
8837 return 0;
8838}
8839_ACEOF
8840rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841if { (ac_try="$ac_compile"
8842case "(($ac_try" in
8843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8844 *) ac_try_echo=$ac_try;;
8845esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008849 grep -v '^ *+' conftest.er1 >conftest.err
8850 rm -f conftest.er1
8851 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 (exit $ac_status); } && {
8854 test -z "$ac_c_werror_flag" ||
8855 test ! -s conftest.err
8856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_hi=-1 ac_mid=-1
8858 while :; do
8859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* confdefs.h. */
8861_ACEOF
8862cat confdefs.h >>conftest.$ac_ext
8863cat >>conftest.$ac_ext <<_ACEOF
8864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008866 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008871test_array [0] = 0
8872
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_lo=$ac_mid; break
8895else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008897sed 's/^/| /' conftest.$ac_ext >&5
8898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 ac_hi=`expr '(' $ac_mid ')' - 1`
8900 if test $ac_mid -le $ac_hi; then
8901 ac_lo= ac_hi=
8902 break
8903 fi
8904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008906
8907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 done
8909else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008911sed 's/^/| /' conftest.$ac_ext >&5
8912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915
8916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918
8919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008920# Binary search between lo and hi bounds.
8921while test "x$ac_lo" != "x$ac_hi"; do
8922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* confdefs.h. */
8925_ACEOF
8926cat confdefs.h >>conftest.$ac_ext
8927cat >>conftest.$ac_ext <<_ACEOF
8928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008930 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008931int
8932main ()
8933{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008935test_array [0] = 0
8936
8937 ;
8938 return 0;
8939}
8940_ACEOF
8941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008942if { (ac_try="$ac_compile"
8943case "(($ac_try" in
8944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8945 *) ac_try_echo=$ac_try;;
8946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008950 grep -v '^ *+' conftest.er1 >conftest.err
8951 rm -f conftest.er1
8952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954 (exit $ac_status); } && {
8955 test -z "$ac_c_werror_flag" ||
8956 test ! -s conftest.err
8957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_hi=$ac_mid
8959else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008961sed 's/^/| /' conftest.$ac_ext >&5
8962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965
8966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008967done
8968case $ac_lo in
8969?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970'') if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008972See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008973echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008974See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008975 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 else
8977 ac_cv_sizeof_short=0
8978 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008979esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008982/* confdefs.h. */
8983_ACEOF
8984cat confdefs.h >>conftest.$ac_ext
8985cat >>conftest.$ac_ext <<_ACEOF
8986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008987$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00008988 typedef short ac__type_sizeof_;
8989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008992#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008995{
Martin v. Löwis11437992002-04-12 09:54:03 +00008996
8997 FILE *f = fopen ("conftest.val", "w");
8998 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009002 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009005 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 }
9007 else
9008 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009012 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
9016 ;
9017 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009018}
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
9020rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021if { (ac_try="$ac_link"
9022case "(($ac_try" in
9023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9024 *) ac_try_echo=$ac_try;;
9025esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 { (case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 (exit $ac_status); }; }; then
9040 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009041else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009042 echo "$as_me: program exited with status $ac_status" >&5
9043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009044sed 's/^/| /' conftest.$ac_ext >&5
9045
Martin v. Löwis11437992002-04-12 09:54:03 +00009046( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047if test "$ac_cv_type_short" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009049See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009050echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009051See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009052 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053 else
9054 ac_cv_sizeof_short=0
9055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057rm -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 +00009058fi
9059rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009060fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9062echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009063
9064
9065
Martin v. Löwis11437992002-04-12 09:54:03 +00009066cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009067#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009068_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069
9070
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009071{ echo "$as_me:$LINENO: checking for float" >&5
9072echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9073if test "${ac_cv_type_float+set}" = set; then
9074 echo $ECHO_N "(cached) $ECHO_C" >&6
9075else
9076 cat >conftest.$ac_ext <<_ACEOF
9077/* confdefs.h. */
9078_ACEOF
9079cat confdefs.h >>conftest.$ac_ext
9080cat >>conftest.$ac_ext <<_ACEOF
9081/* end confdefs.h. */
9082$ac_includes_default
9083typedef float ac__type_new_;
9084int
9085main ()
9086{
9087if ((ac__type_new_ *) 0)
9088 return 0;
9089if (sizeof (ac__type_new_))
9090 return 0;
9091 ;
9092 return 0;
9093}
9094_ACEOF
9095rm -f conftest.$ac_objext
9096if { (ac_try="$ac_compile"
9097case "(($ac_try" in
9098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9099 *) ac_try_echo=$ac_try;;
9100esac
9101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9102 (eval "$ac_compile") 2>conftest.er1
9103 ac_status=$?
9104 grep -v '^ *+' conftest.er1 >conftest.err
9105 rm -f conftest.er1
9106 cat conftest.err >&5
9107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9108 (exit $ac_status); } && {
9109 test -z "$ac_c_werror_flag" ||
9110 test ! -s conftest.err
9111 } && test -s conftest.$ac_objext; then
9112 ac_cv_type_float=yes
9113else
9114 echo "$as_me: failed program was:" >&5
9115sed 's/^/| /' conftest.$ac_ext >&5
9116
9117 ac_cv_type_float=no
9118fi
9119
9120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9121fi
9122{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9123echo "${ECHO_T}$ac_cv_type_float" >&6; }
9124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125# The cast to long int works around a bug in the HP C Compiler
9126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9128# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009129{ echo "$as_me:$LINENO: checking size of float" >&5
9130echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009131if test "${ac_cv_sizeof_float+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009132 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 if test "$cross_compiling" = yes; then
9135 # Depending upon the size, compute the lo and hi bounds.
9136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* confdefs.h. */
9138_ACEOF
9139cat confdefs.h >>conftest.$ac_ext
9140cat >>conftest.$ac_ext <<_ACEOF
9141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009142$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009143 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009144int
9145main ()
9146{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009148test_array [0] = 0
9149
9150 ;
9151 return 0;
9152}
9153_ACEOF
9154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009155if { (ac_try="$ac_compile"
9156case "(($ac_try" in
9157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9158 *) ac_try_echo=$ac_try;;
9159esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009163 grep -v '^ *+' conftest.er1 >conftest.err
9164 rm -f conftest.er1
9165 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167 (exit $ac_status); } && {
9168 test -z "$ac_c_werror_flag" ||
9169 test ! -s conftest.err
9170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_lo=0 ac_mid=0
9172 while :; do
9173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009174/* confdefs.h. */
9175_ACEOF
9176cat confdefs.h >>conftest.$ac_ext
9177cat >>conftest.$ac_ext <<_ACEOF
9178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009179$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009180 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009181int
9182main ()
9183{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009185test_array [0] = 0
9186
9187 ;
9188 return 0;
9189}
9190_ACEOF
9191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192if { (ac_try="$ac_compile"
9193case "(($ac_try" in
9194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9195 *) ac_try_echo=$ac_try;;
9196esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009200 grep -v '^ *+' conftest.er1 >conftest.err
9201 rm -f conftest.er1
9202 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204 (exit $ac_status); } && {
9205 test -z "$ac_c_werror_flag" ||
9206 test ! -s conftest.err
9207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_hi=$ac_mid; break
9209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009211sed 's/^/| /' conftest.$ac_ext >&5
9212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 ac_lo=`expr $ac_mid + 1`
9214 if test $ac_lo -le $ac_mid; then
9215 ac_lo= ac_hi=
9216 break
9217 fi
9218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009220
9221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 done
9223else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* confdefs.h. */
9229_ACEOF
9230cat confdefs.h >>conftest.$ac_ext
9231cat >>conftest.$ac_ext <<_ACEOF
9232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009234 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009238static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009239test_array [0] = 0
9240
9241 ;
9242 return 0;
9243}
9244_ACEOF
9245rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246if { (ac_try="$ac_compile"
9247case "(($ac_try" in
9248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9249 *) ac_try_echo=$ac_try;;
9250esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 grep -v '^ *+' conftest.er1 >conftest.err
9255 rm -f conftest.er1
9256 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 (exit $ac_status); } && {
9259 test -z "$ac_c_werror_flag" ||
9260 test ! -s conftest.err
9261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_hi=-1 ac_mid=-1
9263 while :; do
9264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* confdefs.h. */
9266_ACEOF
9267cat confdefs.h >>conftest.$ac_ext
9268cat >>conftest.$ac_ext <<_ACEOF
9269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009270$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009271 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009275static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009276test_array [0] = 0
9277
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009295 (exit $ac_status); } && {
9296 test -z "$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_lo=$ac_mid; break
9300else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009302sed 's/^/| /' conftest.$ac_ext >&5
9303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304 ac_hi=`expr '(' $ac_mid ')' - 1`
9305 if test $ac_mid -le $ac_hi; then
9306 ac_lo= ac_hi=
9307 break
9308 fi
9309 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009311
9312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 done
9314else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009316sed 's/^/| /' conftest.$ac_ext >&5
9317
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320
9321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323
9324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009325# Binary search between lo and hi bounds.
9326while test "x$ac_lo" != "x$ac_hi"; do
9327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* confdefs.h. */
9330_ACEOF
9331cat confdefs.h >>conftest.$ac_ext
9332cat >>conftest.$ac_ext <<_ACEOF
9333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009334$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009335 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009336int
9337main ()
9338{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009340test_array [0] = 0
9341
9342 ;
9343 return 0;
9344}
9345_ACEOF
9346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009347if { (ac_try="$ac_compile"
9348case "(($ac_try" in
9349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9350 *) ac_try_echo=$ac_try;;
9351esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009355 grep -v '^ *+' conftest.er1 >conftest.err
9356 rm -f conftest.er1
9357 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359 (exit $ac_status); } && {
9360 test -z "$ac_c_werror_flag" ||
9361 test ! -s conftest.err
9362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_hi=$ac_mid
9364else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009366sed 's/^/| /' conftest.$ac_ext >&5
9367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009370
9371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372done
9373case $ac_lo in
9374?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375'') if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009376 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009377See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009378echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009379See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009380 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 else
9382 ac_cv_sizeof_float=0
9383 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009384esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009385else
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009393 typedef float ac__type_sizeof_;
9394static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9395static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009396#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009400{
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
9402 FILE *f = fopen ("conftest.val", "w");
9403 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009405 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009408 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009410 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 }
9412 else
9413 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009415 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009417 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009418 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
9421 ;
9422 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009423}
Martin v. Löwis11437992002-04-12 09:54:03 +00009424_ACEOF
9425rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426if { (ac_try="$ac_link"
9427case "(($ac_try" in
9428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9429 *) ac_try_echo=$ac_try;;
9430esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009432 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436 { (case "(($ac_try" in
9437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9438 *) ac_try_echo=$ac_try;;
9439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 (exit $ac_status); }; }; then
9445 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009446else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009447 echo "$as_me: program exited with status $ac_status" >&5
9448echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009449sed 's/^/| /' conftest.$ac_ext >&5
9450
Martin v. Löwis11437992002-04-12 09:54:03 +00009451( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452if test "$ac_cv_type_float" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009454See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009455echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009456See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009457 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458 else
9459 ac_cv_sizeof_float=0
9460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462rm -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 +00009463fi
9464rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009465fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009466{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9467echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468
9469
9470
Martin v. Löwis11437992002-04-12 09:54:03 +00009471cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009472#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009473_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474
9475
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009476{ echo "$as_me:$LINENO: checking for double" >&5
9477echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9478if test "${ac_cv_type_double+set}" = set; then
9479 echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481 cat >conftest.$ac_ext <<_ACEOF
9482/* confdefs.h. */
9483_ACEOF
9484cat confdefs.h >>conftest.$ac_ext
9485cat >>conftest.$ac_ext <<_ACEOF
9486/* end confdefs.h. */
9487$ac_includes_default
9488typedef double ac__type_new_;
9489int
9490main ()
9491{
9492if ((ac__type_new_ *) 0)
9493 return 0;
9494if (sizeof (ac__type_new_))
9495 return 0;
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500rm -f conftest.$ac_objext
9501if { (ac_try="$ac_compile"
9502case "(($ac_try" in
9503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9504 *) ac_try_echo=$ac_try;;
9505esac
9506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9507 (eval "$ac_compile") 2>conftest.er1
9508 ac_status=$?
9509 grep -v '^ *+' conftest.er1 >conftest.err
9510 rm -f conftest.er1
9511 cat conftest.err >&5
9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9513 (exit $ac_status); } && {
9514 test -z "$ac_c_werror_flag" ||
9515 test ! -s conftest.err
9516 } && test -s conftest.$ac_objext; then
9517 ac_cv_type_double=yes
9518else
9519 echo "$as_me: failed program was:" >&5
9520sed 's/^/| /' conftest.$ac_ext >&5
9521
9522 ac_cv_type_double=no
9523fi
9524
9525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526fi
9527{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9528echo "${ECHO_T}$ac_cv_type_double" >&6; }
9529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530# The cast to long int works around a bug in the HP C Compiler
9531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9533# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009534{ echo "$as_me:$LINENO: checking size of double" >&5
9535echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009536if test "${ac_cv_sizeof_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009537 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009538else
Martin v. Löwis11437992002-04-12 09:54:03 +00009539 if test "$cross_compiling" = yes; then
9540 # Depending upon the size, compute the lo and hi bounds.
9541cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009542/* confdefs.h. */
9543_ACEOF
9544cat confdefs.h >>conftest.$ac_ext
9545cat >>conftest.$ac_ext <<_ACEOF
9546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009548 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009553test_array [0] = 0
9554
9555 ;
9556 return 0;
9557}
9558_ACEOF
9559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560if { (ac_try="$ac_compile"
9561case "(($ac_try" in
9562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9563 *) ac_try_echo=$ac_try;;
9564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009567 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009568 grep -v '^ *+' conftest.er1 >conftest.err
9569 rm -f conftest.er1
9570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009572 (exit $ac_status); } && {
9573 test -z "$ac_c_werror_flag" ||
9574 test ! -s conftest.err
9575 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_lo=0 ac_mid=0
9577 while :; do
9578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009579/* confdefs.h. */
9580_ACEOF
9581cat confdefs.h >>conftest.$ac_ext
9582cat >>conftest.$ac_ext <<_ACEOF
9583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009585 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009586int
9587main ()
9588{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009590test_array [0] = 0
9591
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597if { (ac_try="$ac_compile"
9598case "(($ac_try" in
9599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9600 *) ac_try_echo=$ac_try;;
9601esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609 (exit $ac_status); } && {
9610 test -z "$ac_c_werror_flag" ||
9611 test ! -s conftest.err
9612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_hi=$ac_mid; break
9614else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009616sed 's/^/| /' conftest.$ac_ext >&5
9617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 ac_lo=`expr $ac_mid + 1`
9619 if test $ac_lo -le $ac_mid; then
9620 ac_lo= ac_hi=
9621 break
9622 fi
9623 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 done
9628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009630sed 's/^/| /' conftest.$ac_ext >&5
9631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009633/* confdefs.h. */
9634_ACEOF
9635cat confdefs.h >>conftest.$ac_ext
9636cat >>conftest.$ac_ext <<_ACEOF
9637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009639 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009643static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009644test_array [0] = 0
9645
9646 ;
9647 return 0;
9648}
9649_ACEOF
9650rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651if { (ac_try="$ac_compile"
9652case "(($ac_try" in
9653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9654 *) ac_try_echo=$ac_try;;
9655esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009659 grep -v '^ *+' conftest.er1 >conftest.err
9660 rm -f conftest.er1
9661 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663 (exit $ac_status); } && {
9664 test -z "$ac_c_werror_flag" ||
9665 test ! -s conftest.err
9666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_hi=-1 ac_mid=-1
9668 while :; do
9669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009670/* confdefs.h. */
9671_ACEOF
9672cat confdefs.h >>conftest.$ac_ext
9673cat >>conftest.$ac_ext <<_ACEOF
9674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009676 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009677int
9678main ()
9679{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009681test_array [0] = 0
9682
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688if { (ac_try="$ac_compile"
9689case "(($ac_try" in
9690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9691 *) ac_try_echo=$ac_try;;
9692esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009696 grep -v '^ *+' conftest.er1 >conftest.err
9697 rm -f conftest.er1
9698 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700 (exit $ac_status); } && {
9701 test -z "$ac_c_werror_flag" ||
9702 test ! -s conftest.err
9703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_lo=$ac_mid; break
9705else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009707sed 's/^/| /' conftest.$ac_ext >&5
9708
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709 ac_hi=`expr '(' $ac_mid ')' - 1`
9710 if test $ac_mid -le $ac_hi; then
9711 ac_lo= ac_hi=
9712 break
9713 fi
9714 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716
9717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 done
9719else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009721sed 's/^/| /' conftest.$ac_ext >&5
9722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009723 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725
9726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728
9729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009730# Binary search between lo and hi bounds.
9731while test "x$ac_lo" != "x$ac_hi"; do
9732 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* confdefs.h. */
9735_ACEOF
9736cat confdefs.h >>conftest.$ac_ext
9737cat >>conftest.$ac_ext <<_ACEOF
9738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009740 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009741int
9742main ()
9743{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009745test_array [0] = 0
9746
9747 ;
9748 return 0;
9749}
9750_ACEOF
9751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752if { (ac_try="$ac_compile"
9753case "(($ac_try" in
9754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9755 *) ac_try_echo=$ac_try;;
9756esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 grep -v '^ *+' conftest.er1 >conftest.err
9761 rm -f conftest.er1
9762 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764 (exit $ac_status); } && {
9765 test -z "$ac_c_werror_flag" ||
9766 test ! -s conftest.err
9767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_hi=$ac_mid
9769else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009771sed 's/^/| /' conftest.$ac_ext >&5
9772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775
9776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009777done
9778case $ac_lo in
9779?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780'') if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009781 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009782See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009783echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009784See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009785 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 else
9787 ac_cv_sizeof_double=0
9788 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009789esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009790else
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* confdefs.h. */
9793_ACEOF
9794cat confdefs.h >>conftest.$ac_ext
9795cat >>conftest.$ac_ext <<_ACEOF
9796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009798 typedef double ac__type_sizeof_;
9799static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9800static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009801#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009802#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009805{
Martin v. Löwis11437992002-04-12 09:54:03 +00009806
9807 FILE *f = fopen ("conftest.val", "w");
9808 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009810 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009813 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009814 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009815 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 }
9817 else
9818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009820 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009822 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009824 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
9826 ;
9827 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009828}
Martin v. Löwis11437992002-04-12 09:54:03 +00009829_ACEOF
9830rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831if { (ac_try="$ac_link"
9832case "(($ac_try" in
9833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9834 *) ac_try_echo=$ac_try;;
9835esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009837 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841 { (case "(($ac_try" in
9842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843 *) ac_try_echo=$ac_try;;
9844esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 (exit $ac_status); }; }; then
9850 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009851else
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009852 echo "$as_me: program exited with status $ac_status" >&5
9853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Martin v. Löwis11437992002-04-12 09:54:03 +00009856( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857if test "$ac_cv_type_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009858 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009859See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009860echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009861See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009862 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863 else
9864 ac_cv_sizeof_double=0
9865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867rm -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 +00009868fi
9869rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009870fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009871{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9872echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873
9874
9875
Martin v. Löwis11437992002-04-12 09:54:03 +00009876cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009877#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009878_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879
9880
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009881{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9882echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9883if test "${ac_cv_type_fpos_t+set}" = set; then
9884 echo $ECHO_N "(cached) $ECHO_C" >&6
9885else
9886 cat >conftest.$ac_ext <<_ACEOF
9887/* confdefs.h. */
9888_ACEOF
9889cat confdefs.h >>conftest.$ac_ext
9890cat >>conftest.$ac_ext <<_ACEOF
9891/* end confdefs.h. */
9892$ac_includes_default
9893typedef fpos_t ac__type_new_;
9894int
9895main ()
9896{
9897if ((ac__type_new_ *) 0)
9898 return 0;
9899if (sizeof (ac__type_new_))
9900 return 0;
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext
9906if { (ac_try="$ac_compile"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
9911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9912 (eval "$ac_compile") 2>conftest.er1
9913 ac_status=$?
9914 grep -v '^ *+' conftest.er1 >conftest.err
9915 rm -f conftest.er1
9916 cat conftest.err >&5
9917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9918 (exit $ac_status); } && {
9919 test -z "$ac_c_werror_flag" ||
9920 test ! -s conftest.err
9921 } && test -s conftest.$ac_objext; then
9922 ac_cv_type_fpos_t=yes
9923else
9924 echo "$as_me: failed program was:" >&5
9925sed 's/^/| /' conftest.$ac_ext >&5
9926
9927 ac_cv_type_fpos_t=no
9928fi
9929
9930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9931fi
9932{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9933echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935# The cast to long int works around a bug in the HP C Compiler
9936# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9937# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9938# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009939{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9940echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009941if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009942 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009943else
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 if test "$cross_compiling" = yes; then
9945 # Depending upon the size, compute the lo and hi bounds.
9946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009952$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009953 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009954int
9955main ()
9956{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009958test_array [0] = 0
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965if { (ac_try="$ac_compile"
9966case "(($ac_try" in
9967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9968 *) ac_try_echo=$ac_try;;
9969esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009973 grep -v '^ *+' conftest.er1 >conftest.err
9974 rm -f conftest.er1
9975 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 (exit $ac_status); } && {
9978 test -z "$ac_c_werror_flag" ||
9979 test ! -s conftest.err
9980 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_lo=0 ac_mid=0
9982 while :; do
9983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009990 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009991int
9992main ()
9993{
Ronald Oussoren74f29b42009-09-20 20:09:26 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_hi=$ac_mid; break
10019else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010021sed 's/^/| /' conftest.$ac_ext >&5
10022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 ac_lo=`expr $ac_mid + 1`
10024 if test $ac_lo -le $ac_mid; then
10025 ac_lo= ac_hi=
10026 break
10027 fi
10028 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030
10031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 done
10033else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010035sed 's/^/| /' conftest.$ac_ext >&5
10036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010038/* confdefs.h. */
10039_ACEOF
10040cat confdefs.h >>conftest.$ac_ext
10041cat >>conftest.$ac_ext <<_ACEOF
10042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010043$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010044 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010045int
10046main ()
10047{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010048static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010049test_array [0] = 0
10050
10051 ;
10052 return 0;
10053}
10054_ACEOF
10055rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056if { (ac_try="$ac_compile"
10057case "(($ac_try" in
10058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10059 *) ac_try_echo=$ac_try;;
10060esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010064 grep -v '^ *+' conftest.er1 >conftest.err
10065 rm -f conftest.er1
10066 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068 (exit $ac_status); } && {
10069 test -z "$ac_c_werror_flag" ||
10070 test ! -s conftest.err
10071 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_hi=-1 ac_mid=-1
10073 while :; do
10074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010081 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010082int
10083main ()
10084{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010086test_array [0] = 0
10087
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010093if { (ac_try="$ac_compile"
10094case "(($ac_try" in
10095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10096 *) ac_try_echo=$ac_try;;
10097esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_lo=$ac_mid; break
10110else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010112sed 's/^/| /' conftest.$ac_ext >&5
10113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114 ac_hi=`expr '(' $ac_mid ')' - 1`
10115 if test $ac_mid -le $ac_hi; then
10116 ac_lo= ac_hi=
10117 break
10118 fi
10119 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121
10122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 done
10124else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010126sed 's/^/| /' conftest.$ac_ext >&5
10127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130
10131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133
10134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010135# Binary search between lo and hi bounds.
10136while test "x$ac_lo" != "x$ac_hi"; do
10137 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10138 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* confdefs.h. */
10140_ACEOF
10141cat confdefs.h >>conftest.$ac_ext
10142cat >>conftest.$ac_ext <<_ACEOF
10143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010145 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010146int
10147main ()
10148{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010149static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010150test_array [0] = 0
10151
10152 ;
10153 return 0;
10154}
10155_ACEOF
10156rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157if { (ac_try="$ac_compile"
10158case "(($ac_try" in
10159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10160 *) ac_try_echo=$ac_try;;
10161esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010165 grep -v '^ *+' conftest.er1 >conftest.err
10166 rm -f conftest.er1
10167 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169 (exit $ac_status); } && {
10170 test -z "$ac_c_werror_flag" ||
10171 test ! -s conftest.err
10172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_hi=$ac_mid
10174else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010176sed 's/^/| /' conftest.$ac_ext >&5
10177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180
10181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010182done
10183case $ac_lo in
10184?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185'') if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010186 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010187See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010188echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010189See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010190 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 else
10192 ac_cv_sizeof_fpos_t=0
10193 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010194esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* confdefs.h. */
10198_ACEOF
10199cat confdefs.h >>conftest.$ac_ext
10200cat >>conftest.$ac_ext <<_ACEOF
10201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010202$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010203 typedef fpos_t ac__type_sizeof_;
10204static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10205static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010206#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010207#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010210{
Martin v. Löwis11437992002-04-12 09:54:03 +000010211
10212 FILE *f = fopen ("conftest.val", "w");
10213 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010215 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010218 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010220 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 }
10222 else
10223 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010224 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010225 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010227 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
10231 ;
10232 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010233}
Martin v. Löwis11437992002-04-12 09:54:03 +000010234_ACEOF
10235rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236if { (ac_try="$ac_link"
10237case "(($ac_try" in
10238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10239 *) ac_try_echo=$ac_try;;
10240esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010243 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246 { (case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 (exit $ac_status); }; }; then
10255 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010257 echo "$as_me: program exited with status $ac_status" >&5
10258echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010259sed 's/^/| /' conftest.$ac_ext >&5
10260
Martin v. Löwis11437992002-04-12 09:54:03 +000010261( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262if test "$ac_cv_type_fpos_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010263 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010264See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010265echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010266See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010267 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010268 else
10269 ac_cv_sizeof_fpos_t=0
10270 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272rm -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 +000010273fi
10274rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010275fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010276{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10277echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278
10279
10280
Martin v. Löwis11437992002-04-12 09:54:03 +000010281cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010282#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284
Michael W. Hudson54241132001-12-07 15:38:26 +000010285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010286{ echo "$as_me:$LINENO: checking for size_t" >&5
10287echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10288if test "${ac_cv_type_size_t+set}" = set; then
10289 echo $ECHO_N "(cached) $ECHO_C" >&6
10290else
10291 cat >conftest.$ac_ext <<_ACEOF
10292/* confdefs.h. */
10293_ACEOF
10294cat confdefs.h >>conftest.$ac_ext
10295cat >>conftest.$ac_ext <<_ACEOF
10296/* end confdefs.h. */
10297$ac_includes_default
10298typedef size_t ac__type_new_;
10299int
10300main ()
10301{
10302if ((ac__type_new_ *) 0)
10303 return 0;
10304if (sizeof (ac__type_new_))
10305 return 0;
10306 ;
10307 return 0;
10308}
10309_ACEOF
10310rm -f conftest.$ac_objext
10311if { (ac_try="$ac_compile"
10312case "(($ac_try" in
10313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10314 *) ac_try_echo=$ac_try;;
10315esac
10316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10317 (eval "$ac_compile") 2>conftest.er1
10318 ac_status=$?
10319 grep -v '^ *+' conftest.er1 >conftest.err
10320 rm -f conftest.er1
10321 cat conftest.err >&5
10322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10323 (exit $ac_status); } && {
10324 test -z "$ac_c_werror_flag" ||
10325 test ! -s conftest.err
10326 } && test -s conftest.$ac_objext; then
10327 ac_cv_type_size_t=yes
10328else
10329 echo "$as_me: failed program was:" >&5
10330sed 's/^/| /' conftest.$ac_ext >&5
10331
10332 ac_cv_type_size_t=no
10333fi
10334
10335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10336fi
10337{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10338echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340# The cast to long int works around a bug in the HP C Compiler
10341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10343# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010344{ echo "$as_me:$LINENO: checking size of size_t" >&5
10345echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010346if test "${ac_cv_sizeof_size_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010348else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349 if test "$cross_compiling" = yes; then
10350 # Depending upon the size, compute the lo and hi bounds.
10351cat >conftest.$ac_ext <<_ACEOF
10352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
10357$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010358 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010359int
10360main ()
10361{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010362static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010363test_array [0] = 0
10364
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370if { (ac_try="$ac_compile"
10371case "(($ac_try" in
10372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373 *) ac_try_echo=$ac_try;;
10374esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010377 ac_status=$?
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382 (exit $ac_status); } && {
10383 test -z "$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386 ac_lo=0 ac_mid=0
10387 while :; do
10388 cat >conftest.$ac_ext <<_ACEOF
10389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
10394$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010395 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010396int
10397main ()
10398{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400test_array [0] = 0
10401
10402 ;
10403 return 0;
10404}
10405_ACEOF
10406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407if { (ac_try="$ac_compile"
10408case "(($ac_try" in
10409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10410 *) ac_try_echo=$ac_try;;
10411esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010414 ac_status=$?
10415 grep -v '^ *+' conftest.er1 >conftest.err
10416 rm -f conftest.er1
10417 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419 (exit $ac_status); } && {
10420 test -z "$ac_c_werror_flag" ||
10421 test ! -s conftest.err
10422 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423 ac_hi=$ac_mid; break
10424else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010425 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010426sed 's/^/| /' conftest.$ac_ext >&5
10427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428 ac_lo=`expr $ac_mid + 1`
10429 if test $ac_lo -le $ac_mid; then
10430 ac_lo= ac_hi=
10431 break
10432 fi
10433 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010435
10436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010437 done
10438else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010439 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010440sed 's/^/| /' conftest.$ac_ext >&5
10441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010442 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010443/* confdefs.h. */
10444_ACEOF
10445cat confdefs.h >>conftest.$ac_ext
10446cat >>conftest.$ac_ext <<_ACEOF
10447/* end confdefs.h. */
10448$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010449 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010450int
10451main ()
10452{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010453static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454test_array [0] = 0
10455
10456 ;
10457 return 0;
10458}
10459_ACEOF
10460rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461if { (ac_try="$ac_compile"
10462case "(($ac_try" in
10463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10464 *) ac_try_echo=$ac_try;;
10465esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468 ac_status=$?
10469 grep -v '^ *+' conftest.er1 >conftest.err
10470 rm -f conftest.er1
10471 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473 (exit $ac_status); } && {
10474 test -z "$ac_c_werror_flag" ||
10475 test ! -s conftest.err
10476 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477 ac_hi=-1 ac_mid=-1
10478 while :; do
10479 cat >conftest.$ac_ext <<_ACEOF
10480/* confdefs.h. */
10481_ACEOF
10482cat confdefs.h >>conftest.$ac_ext
10483cat >>conftest.$ac_ext <<_ACEOF
10484/* end confdefs.h. */
10485$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010486 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487int
10488main ()
10489{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491test_array [0] = 0
10492
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498if { (ac_try="$ac_compile"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 ac_lo=$ac_mid; break
10515else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010516 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010517sed 's/^/| /' conftest.$ac_ext >&5
10518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 ac_hi=`expr '(' $ac_mid ')' - 1`
10520 if test $ac_mid -le $ac_hi; then
10521 ac_lo= ac_hi=
10522 break
10523 fi
10524 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528 done
10529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010530 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531sed 's/^/| /' conftest.$ac_ext >&5
10532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535
10536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538
10539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540# Binary search between lo and hi bounds.
10541while test "x$ac_lo" != "x$ac_hi"; do
10542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10543 cat >conftest.$ac_ext <<_ACEOF
10544/* confdefs.h. */
10545_ACEOF
10546cat confdefs.h >>conftest.$ac_ext
10547cat >>conftest.$ac_ext <<_ACEOF
10548/* end confdefs.h. */
10549$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010550 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010551int
10552main ()
10553{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010554static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555test_array [0] = 0
10556
10557 ;
10558 return 0;
10559}
10560_ACEOF
10561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562if { (ac_try="$ac_compile"
10563case "(($ac_try" in
10564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10565 *) ac_try_echo=$ac_try;;
10566esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569 ac_status=$?
10570 grep -v '^ *+' conftest.er1 >conftest.err
10571 rm -f conftest.er1
10572 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574 (exit $ac_status); } && {
10575 test -z "$ac_c_werror_flag" ||
10576 test ! -s conftest.err
10577 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578 ac_hi=$ac_mid
10579else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010580 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010581sed 's/^/| /' conftest.$ac_ext >&5
10582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585
10586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587done
10588case $ac_lo in
10589?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590'') if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010591 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010593echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010595 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 else
10597 ac_cv_sizeof_size_t=0
10598 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599esac
10600else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 cat >conftest.$ac_ext <<_ACEOF
10602/* confdefs.h. */
10603_ACEOF
10604cat confdefs.h >>conftest.$ac_ext
10605cat >>conftest.$ac_ext <<_ACEOF
10606/* end confdefs.h. */
10607$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010608 typedef size_t ac__type_sizeof_;
10609static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10610static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611#include <stdio.h>
10612#include <stdlib.h>
10613int
10614main ()
10615{
10616
10617 FILE *f = fopen ("conftest.val", "w");
10618 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010619 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010620 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010623 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010625 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010626 }
10627 else
10628 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010630 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010632 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010633 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641if { (ac_try="$ac_link"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010648 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 { (case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 (exit $ac_status); }; }; then
10660 ac_cv_sizeof_size_t=`cat conftest.val`
10661else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010662 echo "$as_me: program exited with status $ac_status" >&5
10663echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664sed 's/^/| /' conftest.$ac_ext >&5
10665
10666( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667if test "$ac_cv_type_size_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010668 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010670echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010671See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010672 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010673 else
10674 ac_cv_sizeof_size_t=0
10675 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677rm -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 +000010678fi
10679rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010681{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10682echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683
10684
10685
Martin v. Löwis18e16552006-02-15 17:27:45 +000010686cat >>confdefs.h <<_ACEOF
10687#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10688_ACEOF
10689
10690
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010691{ echo "$as_me:$LINENO: checking for pid_t" >&5
10692echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10693if test "${ac_cv_type_pid_t+set}" = set; then
10694 echo $ECHO_N "(cached) $ECHO_C" >&6
10695else
10696 cat >conftest.$ac_ext <<_ACEOF
10697/* confdefs.h. */
10698_ACEOF
10699cat confdefs.h >>conftest.$ac_ext
10700cat >>conftest.$ac_ext <<_ACEOF
10701/* end confdefs.h. */
10702$ac_includes_default
10703typedef pid_t ac__type_new_;
10704int
10705main ()
10706{
10707if ((ac__type_new_ *) 0)
10708 return 0;
10709if (sizeof (ac__type_new_))
10710 return 0;
10711 ;
10712 return 0;
10713}
10714_ACEOF
10715rm -f conftest.$ac_objext
10716if { (ac_try="$ac_compile"
10717case "(($ac_try" in
10718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10719 *) ac_try_echo=$ac_try;;
10720esac
10721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10722 (eval "$ac_compile") 2>conftest.er1
10723 ac_status=$?
10724 grep -v '^ *+' conftest.er1 >conftest.err
10725 rm -f conftest.er1
10726 cat conftest.err >&5
10727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10728 (exit $ac_status); } && {
10729 test -z "$ac_c_werror_flag" ||
10730 test ! -s conftest.err
10731 } && test -s conftest.$ac_objext; then
10732 ac_cv_type_pid_t=yes
10733else
10734 echo "$as_me: failed program was:" >&5
10735sed 's/^/| /' conftest.$ac_ext >&5
10736
10737 ac_cv_type_pid_t=no
10738fi
10739
10740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10741fi
10742{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10743echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10744
Christian Heimes400adb02008-02-01 08:12:03 +000010745# The cast to long int works around a bug in the HP C Compiler
10746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10748# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010749{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10750echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010751if test "${ac_cv_sizeof_pid_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010752 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010753else
10754 if test "$cross_compiling" = yes; then
10755 # Depending upon the size, compute the lo and hi bounds.
10756cat >conftest.$ac_ext <<_ACEOF
10757/* confdefs.h. */
10758_ACEOF
10759cat confdefs.h >>conftest.$ac_ext
10760cat >>conftest.$ac_ext <<_ACEOF
10761/* end confdefs.h. */
10762$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010763 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010764int
10765main ()
10766{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010767static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010768test_array [0] = 0
10769
10770 ;
10771 return 0;
10772}
10773_ACEOF
10774rm -f conftest.$ac_objext
10775if { (ac_try="$ac_compile"
10776case "(($ac_try" in
10777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10778 *) ac_try_echo=$ac_try;;
10779esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010781 (eval "$ac_compile") 2>conftest.er1
10782 ac_status=$?
10783 grep -v '^ *+' conftest.er1 >conftest.err
10784 rm -f conftest.er1
10785 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010787 (exit $ac_status); } && {
10788 test -z "$ac_c_werror_flag" ||
10789 test ! -s conftest.err
10790 } && test -s conftest.$ac_objext; then
10791 ac_lo=0 ac_mid=0
10792 while :; do
10793 cat >conftest.$ac_ext <<_ACEOF
10794/* confdefs.h. */
10795_ACEOF
10796cat confdefs.h >>conftest.$ac_ext
10797cat >>conftest.$ac_ext <<_ACEOF
10798/* end confdefs.h. */
10799$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010800 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010801int
10802main ()
10803{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010805test_array [0] = 0
10806
10807 ;
10808 return 0;
10809}
10810_ACEOF
10811rm -f conftest.$ac_objext
10812if { (ac_try="$ac_compile"
10813case "(($ac_try" in
10814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10815 *) ac_try_echo=$ac_try;;
10816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010818 (eval "$ac_compile") 2>conftest.er1
10819 ac_status=$?
10820 grep -v '^ *+' conftest.er1 >conftest.err
10821 rm -f conftest.er1
10822 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010824 (exit $ac_status); } && {
10825 test -z "$ac_c_werror_flag" ||
10826 test ! -s conftest.err
10827 } && test -s conftest.$ac_objext; then
10828 ac_hi=$ac_mid; break
10829else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010830 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
10833 ac_lo=`expr $ac_mid + 1`
10834 if test $ac_lo -le $ac_mid; then
10835 ac_lo= ac_hi=
10836 break
10837 fi
10838 ac_mid=`expr 2 '*' $ac_mid + 1`
10839fi
10840
10841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10842 done
10843else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010844 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010845sed 's/^/| /' conftest.$ac_ext >&5
10846
10847 cat >conftest.$ac_ext <<_ACEOF
10848/* confdefs.h. */
10849_ACEOF
10850cat confdefs.h >>conftest.$ac_ext
10851cat >>conftest.$ac_ext <<_ACEOF
10852/* end confdefs.h. */
10853$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010854 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010855int
10856main ()
10857{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010858static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010859test_array [0] = 0
10860
10861 ;
10862 return 0;
10863}
10864_ACEOF
10865rm -f conftest.$ac_objext
10866if { (ac_try="$ac_compile"
10867case "(($ac_try" in
10868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10869 *) ac_try_echo=$ac_try;;
10870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010872 (eval "$ac_compile") 2>conftest.er1
10873 ac_status=$?
10874 grep -v '^ *+' conftest.er1 >conftest.err
10875 rm -f conftest.er1
10876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010878 (exit $ac_status); } && {
10879 test -z "$ac_c_werror_flag" ||
10880 test ! -s conftest.err
10881 } && test -s conftest.$ac_objext; then
10882 ac_hi=-1 ac_mid=-1
10883 while :; do
10884 cat >conftest.$ac_ext <<_ACEOF
10885/* confdefs.h. */
10886_ACEOF
10887cat confdefs.h >>conftest.$ac_ext
10888cat >>conftest.$ac_ext <<_ACEOF
10889/* end confdefs.h. */
10890$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010891 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010892int
10893main ()
10894{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010896test_array [0] = 0
10897
10898 ;
10899 return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext
10903if { (ac_try="$ac_compile"
10904case "(($ac_try" in
10905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10906 *) ac_try_echo=$ac_try;;
10907esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010909 (eval "$ac_compile") 2>conftest.er1
10910 ac_status=$?
10911 grep -v '^ *+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010915 (exit $ac_status); } && {
10916 test -z "$ac_c_werror_flag" ||
10917 test ! -s conftest.err
10918 } && test -s conftest.$ac_objext; then
10919 ac_lo=$ac_mid; break
10920else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010921 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 ac_hi=`expr '(' $ac_mid ')' - 1`
10925 if test $ac_mid -le $ac_hi; then
10926 ac_lo= ac_hi=
10927 break
10928 fi
10929 ac_mid=`expr 2 '*' $ac_mid`
10930fi
10931
10932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10933 done
10934else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010935 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010936sed 's/^/| /' conftest.$ac_ext >&5
10937
10938 ac_lo= ac_hi=
10939fi
10940
10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942fi
10943
10944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10945# Binary search between lo and hi bounds.
10946while test "x$ac_lo" != "x$ac_hi"; do
10947 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10948 cat >conftest.$ac_ext <<_ACEOF
10949/* confdefs.h. */
10950_ACEOF
10951cat confdefs.h >>conftest.$ac_ext
10952cat >>conftest.$ac_ext <<_ACEOF
10953/* end confdefs.h. */
10954$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010955 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010956int
10957main ()
10958{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010959static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010960test_array [0] = 0
10961
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966rm -f conftest.$ac_objext
10967if { (ac_try="$ac_compile"
10968case "(($ac_try" in
10969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10970 *) ac_try_echo=$ac_try;;
10971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010973 (eval "$ac_compile") 2>conftest.er1
10974 ac_status=$?
10975 grep -v '^ *+' conftest.er1 >conftest.err
10976 rm -f conftest.er1
10977 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010979 (exit $ac_status); } && {
10980 test -z "$ac_c_werror_flag" ||
10981 test ! -s conftest.err
10982 } && test -s conftest.$ac_objext; then
10983 ac_hi=$ac_mid
10984else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010985 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010986sed 's/^/| /' conftest.$ac_ext >&5
10987
10988 ac_lo=`expr '(' $ac_mid ')' + 1`
10989fi
10990
10991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10992done
10993case $ac_lo in
10994?*) ac_cv_sizeof_pid_t=$ac_lo;;
10995'') if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010996 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010997See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000010998echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010999See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011000 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011001 else
11002 ac_cv_sizeof_pid_t=0
11003 fi ;;
11004esac
11005else
11006 cat >conftest.$ac_ext <<_ACEOF
11007/* confdefs.h. */
11008_ACEOF
11009cat confdefs.h >>conftest.$ac_ext
11010cat >>conftest.$ac_ext <<_ACEOF
11011/* end confdefs.h. */
11012$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011013 typedef pid_t ac__type_sizeof_;
11014static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11015static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011016#include <stdio.h>
11017#include <stdlib.h>
11018int
11019main ()
11020{
11021
11022 FILE *f = fopen ("conftest.val", "w");
11023 if (! f)
11024 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011025 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011026 {
11027 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011028 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011029 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011030 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011031 }
11032 else
11033 {
11034 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011035 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011036 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011037 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011038 }
11039 return ferror (f) || fclose (f) != 0;
11040
11041 ;
11042 return 0;
11043}
11044_ACEOF
11045rm -f conftest$ac_exeext
11046if { (ac_try="$ac_link"
11047case "(($ac_try" in
11048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11049 *) ac_try_echo=$ac_try;;
11050esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011052 (eval "$ac_link") 2>&5
11053 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11056 { (case "(($ac_try" in
11057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11058 *) ac_try_echo=$ac_try;;
11059esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011061 (eval "$ac_try") 2>&5
11062 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011064 (exit $ac_status); }; }; then
11065 ac_cv_sizeof_pid_t=`cat conftest.val`
11066else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011067 echo "$as_me: program exited with status $ac_status" >&5
11068echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011069sed 's/^/| /' conftest.$ac_ext >&5
11070
11071( exit $ac_status )
11072if test "$ac_cv_type_pid_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011073 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011074See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011075echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011076See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011077 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011078 else
11079 ac_cv_sizeof_pid_t=0
11080 fi
11081fi
11082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11083fi
11084rm -f conftest.val
11085fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011086{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11087echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011088
11089
11090
11091cat >>confdefs.h <<_ACEOF
11092#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11093_ACEOF
11094
11095
Michael W. Hudson54241132001-12-07 15:38:26 +000011096
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011097{ echo "$as_me:$LINENO: checking for long long support" >&5
11098echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011099have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* confdefs.h. */
11102_ACEOF
11103cat confdefs.h >>conftest.$ac_ext
11104cat >>conftest.$ac_ext <<_ACEOF
11105/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011110long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 ;
11112 return 0;
11113}
11114_ACEOF
11115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116if { (ac_try="$ac_compile"
11117case "(($ac_try" in
11118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11119 *) ac_try_echo=$ac_try;;
11120esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011124 grep -v '^ *+' conftest.er1 >conftest.err
11125 rm -f conftest.er1
11126 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128 (exit $ac_status); } && {
11129 test -z "$ac_c_werror_flag" ||
11130 test ! -s conftest.err
11131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011132
11133
11134cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011135#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011136_ACEOF
11137
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011138 have_long_long=yes
11139
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011140else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011142sed 's/^/| /' conftest.$ac_ext >&5
11143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011146
11147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011148{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11149echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011150if test "$have_long_long" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011151{ echo "$as_me:$LINENO: checking for long long" >&5
11152echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11153if test "${ac_cv_type_long_long+set}" = set; then
11154 echo $ECHO_N "(cached) $ECHO_C" >&6
11155else
11156 cat >conftest.$ac_ext <<_ACEOF
11157/* confdefs.h. */
11158_ACEOF
11159cat confdefs.h >>conftest.$ac_ext
11160cat >>conftest.$ac_ext <<_ACEOF
11161/* end confdefs.h. */
11162$ac_includes_default
11163typedef long long ac__type_new_;
11164int
11165main ()
11166{
11167if ((ac__type_new_ *) 0)
11168 return 0;
11169if (sizeof (ac__type_new_))
11170 return 0;
11171 ;
11172 return 0;
11173}
11174_ACEOF
11175rm -f conftest.$ac_objext
11176if { (ac_try="$ac_compile"
11177case "(($ac_try" in
11178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11179 *) ac_try_echo=$ac_try;;
11180esac
11181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11182 (eval "$ac_compile") 2>conftest.er1
11183 ac_status=$?
11184 grep -v '^ *+' conftest.er1 >conftest.err
11185 rm -f conftest.er1
11186 cat conftest.err >&5
11187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11188 (exit $ac_status); } && {
11189 test -z "$ac_c_werror_flag" ||
11190 test ! -s conftest.err
11191 } && test -s conftest.$ac_objext; then
11192 ac_cv_type_long_long=yes
11193else
11194 echo "$as_me: failed program was:" >&5
11195sed 's/^/| /' conftest.$ac_ext >&5
11196
11197 ac_cv_type_long_long=no
11198fi
11199
11200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11201fi
11202{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11203echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205# The cast to long int works around a bug in the HP C Compiler
11206# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11207# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11208# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011209{ echo "$as_me:$LINENO: checking size of long long" >&5
11210echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011211if test "${ac_cv_sizeof_long_long+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011212 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 if test "$cross_compiling" = yes; then
11215 # Depending upon the size, compute the lo and hi bounds.
11216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* confdefs.h. */
11218_ACEOF
11219cat confdefs.h >>conftest.$ac_ext
11220cat >>conftest.$ac_ext <<_ACEOF
11221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011222$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011223 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011228test_array [0] = 0
11229
11230 ;
11231 return 0;
11232}
11233_ACEOF
11234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235if { (ac_try="$ac_compile"
11236case "(($ac_try" in
11237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11238 *) ac_try_echo=$ac_try;;
11239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011243 grep -v '^ *+' conftest.er1 >conftest.err
11244 rm -f conftest.er1
11245 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247 (exit $ac_status); } && {
11248 test -z "$ac_c_werror_flag" ||
11249 test ! -s conftest.err
11250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ac_lo=0 ac_mid=0
11252 while :; do
11253 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011254/* confdefs.h. */
11255_ACEOF
11256cat confdefs.h >>conftest.$ac_ext
11257cat >>conftest.$ac_ext <<_ACEOF
11258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011259$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011260 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011261int
11262main ()
11263{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011264static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011265test_array [0] = 0
11266
11267 ;
11268 return 0;
11269}
11270_ACEOF
11271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011272if { (ac_try="$ac_compile"
11273case "(($ac_try" in
11274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11275 *) ac_try_echo=$ac_try;;
11276esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011280 grep -v '^ *+' conftest.er1 >conftest.err
11281 rm -f conftest.er1
11282 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 (exit $ac_status); } && {
11285 test -z "$ac_c_werror_flag" ||
11286 test ! -s conftest.err
11287 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ac_hi=$ac_mid; break
11289else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011291sed 's/^/| /' conftest.$ac_ext >&5
11292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293 ac_lo=`expr $ac_mid + 1`
11294 if test $ac_lo -le $ac_mid; then
11295 ac_lo= ac_hi=
11296 break
11297 fi
11298 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300
11301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 done
11303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011305sed 's/^/| /' conftest.$ac_ext >&5
11306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011313$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011314 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011319test_array [0] = 0
11320
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326if { (ac_try="$ac_compile"
11327case "(($ac_try" in
11328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11329 *) ac_try_echo=$ac_try;;
11330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011334 grep -v '^ *+' conftest.er1 >conftest.err
11335 rm -f conftest.er1
11336 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011338 (exit $ac_status); } && {
11339 test -z "$ac_c_werror_flag" ||
11340 test ! -s conftest.err
11341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ac_hi=-1 ac_mid=-1
11343 while :; do
11344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011345/* confdefs.h. */
11346_ACEOF
11347cat confdefs.h >>conftest.$ac_ext
11348cat >>conftest.$ac_ext <<_ACEOF
11349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011350$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011351 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011352int
11353main ()
11354{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011356test_array [0] = 0
11357
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ac_lo=$ac_mid; break
11380else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011382sed 's/^/| /' conftest.$ac_ext >&5
11383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384 ac_hi=`expr '(' $ac_mid ')' - 1`
11385 if test $ac_mid -le $ac_hi; then
11386 ac_lo= ac_hi=
11387 break
11388 fi
11389 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391
11392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011393 done
11394else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011396sed 's/^/| /' conftest.$ac_ext >&5
11397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400
11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403
11404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011405# Binary search between lo and hi bounds.
11406while test "x$ac_lo" != "x$ac_hi"; do
11407 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011409/* confdefs.h. */
11410_ACEOF
11411cat confdefs.h >>conftest.$ac_ext
11412cat >>conftest.$ac_ext <<_ACEOF
11413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011414$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011415 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011416int
11417main ()
11418{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011419static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011420test_array [0] = 0
11421
11422 ;
11423 return 0;
11424}
11425_ACEOF
11426rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427if { (ac_try="$ac_compile"
11428case "(($ac_try" in
11429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11430 *) ac_try_echo=$ac_try;;
11431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011435 grep -v '^ *+' conftest.er1 >conftest.err
11436 rm -f conftest.er1
11437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011439 (exit $ac_status); } && {
11440 test -z "$ac_c_werror_flag" ||
11441 test ! -s conftest.err
11442 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_hi=$ac_mid
11444else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011446sed 's/^/| /' conftest.$ac_ext >&5
11447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450
11451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011452done
11453case $ac_lo in
11454?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011455'') if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011456 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011457See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011458echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011459See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011460 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011461 else
11462 ac_cv_sizeof_long_long=0
11463 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011464esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011465else
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011473 typedef long long ac__type_sizeof_;
11474static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11475static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011476#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011477#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011480{
Martin v. Löwis11437992002-04-12 09:54:03 +000011481
11482 FILE *f = fopen ("conftest.val", "w");
11483 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011485 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011488 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011489 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011490 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 }
11492 else
11493 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011494 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011495 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011497 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011499 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
11501 ;
11502 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011503}
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
11505rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506if { (ac_try="$ac_link"
11507case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 { (case "(($ac_try" in
11517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11518 *) ac_try_echo=$ac_try;;
11519esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 (exit $ac_status); }; }; then
11525 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011527 echo "$as_me: program exited with status $ac_status" >&5
11528echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011529sed 's/^/| /' conftest.$ac_ext >&5
11530
Martin v. Löwis11437992002-04-12 09:54:03 +000011531( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532if test "$ac_cv_type_long_long" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011533 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011534See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011535echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011536See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011537 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538 else
11539 ac_cv_sizeof_long_long=0
11540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542rm -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 +000011543fi
11544rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011545fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011546{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11547echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548
11549
11550
Martin v. Löwis11437992002-04-12 09:54:03 +000011551cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011552#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011553_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554
Michael W. Hudson54241132001-12-07 15:38:26 +000011555
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556fi
11557
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011558{ echo "$as_me:$LINENO: checking for long double support" >&5
11559echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011560have_long_double=no
11561cat >conftest.$ac_ext <<_ACEOF
11562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
11567
11568int
11569main ()
11570{
11571long double x; x = (long double)0;
11572 ;
11573 return 0;
11574}
11575_ACEOF
11576rm -f conftest.$ac_objext
11577if { (ac_try="$ac_compile"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011583 (eval "$ac_compile") 2>conftest.er1
11584 ac_status=$?
11585 grep -v '^ *+' conftest.er1 >conftest.err
11586 rm -f conftest.er1
11587 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011589 (exit $ac_status); } && {
11590 test -z "$ac_c_werror_flag" ||
11591 test ! -s conftest.err
11592 } && test -s conftest.$ac_objext; then
11593
11594
11595cat >>confdefs.h <<\_ACEOF
11596#define HAVE_LONG_DOUBLE 1
11597_ACEOF
11598
11599 have_long_double=yes
11600
11601else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011602 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011603sed 's/^/| /' conftest.$ac_ext >&5
11604
11605
11606fi
11607
11608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011609{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11610echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011611if test "$have_long_double" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011612{ echo "$as_me:$LINENO: checking for long double" >&5
11613echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11614if test "${ac_cv_type_long_double+set}" = set; then
11615 echo $ECHO_N "(cached) $ECHO_C" >&6
11616else
11617 cat >conftest.$ac_ext <<_ACEOF
11618/* confdefs.h. */
11619_ACEOF
11620cat confdefs.h >>conftest.$ac_ext
11621cat >>conftest.$ac_ext <<_ACEOF
11622/* end confdefs.h. */
11623$ac_includes_default
11624typedef long double ac__type_new_;
11625int
11626main ()
11627{
11628if ((ac__type_new_ *) 0)
11629 return 0;
11630if (sizeof (ac__type_new_))
11631 return 0;
11632 ;
11633 return 0;
11634}
11635_ACEOF
11636rm -f conftest.$ac_objext
11637if { (ac_try="$ac_compile"
11638case "(($ac_try" in
11639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11640 *) ac_try_echo=$ac_try;;
11641esac
11642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11643 (eval "$ac_compile") 2>conftest.er1
11644 ac_status=$?
11645 grep -v '^ *+' conftest.er1 >conftest.err
11646 rm -f conftest.er1
11647 cat conftest.err >&5
11648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11649 (exit $ac_status); } && {
11650 test -z "$ac_c_werror_flag" ||
11651 test ! -s conftest.err
11652 } && test -s conftest.$ac_objext; then
11653 ac_cv_type_long_double=yes
11654else
11655 echo "$as_me: failed program was:" >&5
11656sed 's/^/| /' conftest.$ac_ext >&5
11657
11658 ac_cv_type_long_double=no
11659fi
11660
11661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11662fi
11663{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11664echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11665
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011666# The cast to long int works around a bug in the HP C Compiler
11667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11669# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011670{ echo "$as_me:$LINENO: checking size of long double" >&5
11671echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011672if test "${ac_cv_sizeof_long_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011673 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011674else
11675 if test "$cross_compiling" = yes; then
11676 # Depending upon the size, compute the lo and hi bounds.
11677cat >conftest.$ac_ext <<_ACEOF
11678/* confdefs.h. */
11679_ACEOF
11680cat confdefs.h >>conftest.$ac_ext
11681cat >>conftest.$ac_ext <<_ACEOF
11682/* end confdefs.h. */
11683$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011684 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685int
11686main ()
11687{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011688static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689test_array [0] = 0
11690
11691 ;
11692 return 0;
11693}
11694_ACEOF
11695rm -f conftest.$ac_objext
11696if { (ac_try="$ac_compile"
11697case "(($ac_try" in
11698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11699 *) ac_try_echo=$ac_try;;
11700esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011702 (eval "$ac_compile") 2>conftest.er1
11703 ac_status=$?
11704 grep -v '^ *+' conftest.er1 >conftest.err
11705 rm -f conftest.er1
11706 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708 (exit $ac_status); } && {
11709 test -z "$ac_c_werror_flag" ||
11710 test ! -s conftest.err
11711 } && test -s conftest.$ac_objext; then
11712 ac_lo=0 ac_mid=0
11713 while :; do
11714 cat >conftest.$ac_ext <<_ACEOF
11715/* confdefs.h. */
11716_ACEOF
11717cat confdefs.h >>conftest.$ac_ext
11718cat >>conftest.$ac_ext <<_ACEOF
11719/* end confdefs.h. */
11720$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011721 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011722int
11723main ()
11724{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011725static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011726test_array [0] = 0
11727
11728 ;
11729 return 0;
11730}
11731_ACEOF
11732rm -f conftest.$ac_objext
11733if { (ac_try="$ac_compile"
11734case "(($ac_try" in
11735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11736 *) ac_try_echo=$ac_try;;
11737esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011739 (eval "$ac_compile") 2>conftest.er1
11740 ac_status=$?
11741 grep -v '^ *+' conftest.er1 >conftest.err
11742 rm -f conftest.er1
11743 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745 (exit $ac_status); } && {
11746 test -z "$ac_c_werror_flag" ||
11747 test ! -s conftest.err
11748 } && test -s conftest.$ac_objext; then
11749 ac_hi=$ac_mid; break
11750else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011751 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011752sed 's/^/| /' conftest.$ac_ext >&5
11753
11754 ac_lo=`expr $ac_mid + 1`
11755 if test $ac_lo -le $ac_mid; then
11756 ac_lo= ac_hi=
11757 break
11758 fi
11759 ac_mid=`expr 2 '*' $ac_mid + 1`
11760fi
11761
11762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11763 done
11764else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011765 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011766sed 's/^/| /' conftest.$ac_ext >&5
11767
11768 cat >conftest.$ac_ext <<_ACEOF
11769/* confdefs.h. */
11770_ACEOF
11771cat confdefs.h >>conftest.$ac_ext
11772cat >>conftest.$ac_ext <<_ACEOF
11773/* end confdefs.h. */
11774$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011775 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011776int
11777main ()
11778{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011780test_array [0] = 0
11781
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786rm -f conftest.$ac_objext
11787if { (ac_try="$ac_compile"
11788case "(($ac_try" in
11789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11790 *) ac_try_echo=$ac_try;;
11791esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793 (eval "$ac_compile") 2>conftest.er1
11794 ac_status=$?
11795 grep -v '^ *+' conftest.er1 >conftest.err
11796 rm -f conftest.er1
11797 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799 (exit $ac_status); } && {
11800 test -z "$ac_c_werror_flag" ||
11801 test ! -s conftest.err
11802 } && test -s conftest.$ac_objext; then
11803 ac_hi=-1 ac_mid=-1
11804 while :; do
11805 cat >conftest.$ac_ext <<_ACEOF
11806/* confdefs.h. */
11807_ACEOF
11808cat confdefs.h >>conftest.$ac_ext
11809cat >>conftest.$ac_ext <<_ACEOF
11810/* end confdefs.h. */
11811$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011812 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011813int
11814main ()
11815{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011817test_array [0] = 0
11818
11819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext
11824if { (ac_try="$ac_compile"
11825case "(($ac_try" in
11826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11827 *) ac_try_echo=$ac_try;;
11828esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011830 (eval "$ac_compile") 2>conftest.er1
11831 ac_status=$?
11832 grep -v '^ *+' conftest.er1 >conftest.err
11833 rm -f conftest.er1
11834 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011836 (exit $ac_status); } && {
11837 test -z "$ac_c_werror_flag" ||
11838 test ! -s conftest.err
11839 } && test -s conftest.$ac_objext; then
11840 ac_lo=$ac_mid; break
11841else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011842 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011843sed 's/^/| /' conftest.$ac_ext >&5
11844
11845 ac_hi=`expr '(' $ac_mid ')' - 1`
11846 if test $ac_mid -le $ac_hi; then
11847 ac_lo= ac_hi=
11848 break
11849 fi
11850 ac_mid=`expr 2 '*' $ac_mid`
11851fi
11852
11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11854 done
11855else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011856 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011857sed 's/^/| /' conftest.$ac_ext >&5
11858
11859 ac_lo= ac_hi=
11860fi
11861
11862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11863fi
11864
11865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866# Binary search between lo and hi bounds.
11867while test "x$ac_lo" != "x$ac_hi"; do
11868 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11869 cat >conftest.$ac_ext <<_ACEOF
11870/* confdefs.h. */
11871_ACEOF
11872cat confdefs.h >>conftest.$ac_ext
11873cat >>conftest.$ac_ext <<_ACEOF
11874/* end confdefs.h. */
11875$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011876 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011877int
11878main ()
11879{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011880static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011881test_array [0] = 0
11882
11883 ;
11884 return 0;
11885}
11886_ACEOF
11887rm -f conftest.$ac_objext
11888if { (ac_try="$ac_compile"
11889case "(($ac_try" in
11890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11891 *) ac_try_echo=$ac_try;;
11892esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011893eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011894 (eval "$ac_compile") 2>conftest.er1
11895 ac_status=$?
11896 grep -v '^ *+' conftest.er1 >conftest.err
11897 rm -f conftest.er1
11898 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011900 (exit $ac_status); } && {
11901 test -z "$ac_c_werror_flag" ||
11902 test ! -s conftest.err
11903 } && test -s conftest.$ac_objext; then
11904 ac_hi=$ac_mid
11905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011906 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011907sed 's/^/| /' conftest.$ac_ext >&5
11908
11909 ac_lo=`expr '(' $ac_mid ')' + 1`
11910fi
11911
11912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11913done
11914case $ac_lo in
11915?*) ac_cv_sizeof_long_double=$ac_lo;;
11916'') if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011917 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011918See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011919echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011920See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011921 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922 else
11923 ac_cv_sizeof_long_double=0
11924 fi ;;
11925esac
11926else
11927 cat >conftest.$ac_ext <<_ACEOF
11928/* confdefs.h. */
11929_ACEOF
11930cat confdefs.h >>conftest.$ac_ext
11931cat >>conftest.$ac_ext <<_ACEOF
11932/* end confdefs.h. */
11933$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011934 typedef long double ac__type_sizeof_;
11935static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11936static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011937#include <stdio.h>
11938#include <stdlib.h>
11939int
11940main ()
11941{
11942
11943 FILE *f = fopen ("conftest.val", "w");
11944 if (! f)
11945 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011946 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011947 {
11948 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011949 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011950 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011951 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952 }
11953 else
11954 {
11955 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011956 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011958 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 }
11960 return ferror (f) || fclose (f) != 0;
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest$ac_exeext
11967if { (ac_try="$ac_link"
11968case "(($ac_try" in
11969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11970 *) ac_try_echo=$ac_try;;
11971esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011973 (eval "$ac_link") 2>&5
11974 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11977 { (case "(($ac_try" in
11978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11979 *) ac_try_echo=$ac_try;;
11980esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011982 (eval "$ac_try") 2>&5
11983 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985 (exit $ac_status); }; }; then
11986 ac_cv_sizeof_long_double=`cat conftest.val`
11987else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011988 echo "$as_me: program exited with status $ac_status" >&5
11989echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011990sed 's/^/| /' conftest.$ac_ext >&5
11991
11992( exit $ac_status )
11993if test "$ac_cv_type_long_double" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011994 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011996echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011997See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000011998 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999 else
12000 ac_cv_sizeof_long_double=0
12001 fi
12002fi
12003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12004fi
12005rm -f conftest.val
12006fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012007{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12008echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009
12010
12011
12012cat >>confdefs.h <<_ACEOF
12013#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12014_ACEOF
12015
12016
12017fi
12018
12019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012020{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12021echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012022have_c99_bool=no
12023cat >conftest.$ac_ext <<_ACEOF
12024/* confdefs.h. */
12025_ACEOF
12026cat confdefs.h >>conftest.$ac_ext
12027cat >>conftest.$ac_ext <<_ACEOF
12028/* end confdefs.h. */
12029
12030int
12031main ()
12032{
12033_Bool x; x = (_Bool)0;
12034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039if { (ac_try="$ac_compile"
12040case "(($ac_try" in
12041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12042 *) ac_try_echo=$ac_try;;
12043esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012046 ac_status=$?
12047 grep -v '^ *+' conftest.er1 >conftest.err
12048 rm -f conftest.er1
12049 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012051 (exit $ac_status); } && {
12052 test -z "$ac_c_werror_flag" ||
12053 test ! -s conftest.err
12054 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012055
12056
12057cat >>confdefs.h <<\_ACEOF
12058#define HAVE_C99_BOOL 1
12059_ACEOF
12060
12061 have_c99_bool=yes
12062
12063else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012064 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012065sed 's/^/| /' conftest.$ac_ext >&5
12066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067
Thomas Woutersb2137042007-02-01 18:02:27 +000012068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069
12070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012071{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12072echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012073if test "$have_c99_bool" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012074{ echo "$as_me:$LINENO: checking for _Bool" >&5
12075echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12076if test "${ac_cv_type__Bool+set}" = set; then
12077 echo $ECHO_N "(cached) $ECHO_C" >&6
12078else
12079 cat >conftest.$ac_ext <<_ACEOF
12080/* confdefs.h. */
12081_ACEOF
12082cat confdefs.h >>conftest.$ac_ext
12083cat >>conftest.$ac_ext <<_ACEOF
12084/* end confdefs.h. */
12085$ac_includes_default
12086typedef _Bool ac__type_new_;
12087int
12088main ()
12089{
12090if ((ac__type_new_ *) 0)
12091 return 0;
12092if (sizeof (ac__type_new_))
12093 return 0;
12094 ;
12095 return 0;
12096}
12097_ACEOF
12098rm -f conftest.$ac_objext
12099if { (ac_try="$ac_compile"
12100case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
12104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12105 (eval "$ac_compile") 2>conftest.er1
12106 ac_status=$?
12107 grep -v '^ *+' conftest.er1 >conftest.err
12108 rm -f conftest.er1
12109 cat conftest.err >&5
12110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12111 (exit $ac_status); } && {
12112 test -z "$ac_c_werror_flag" ||
12113 test ! -s conftest.err
12114 } && test -s conftest.$ac_objext; then
12115 ac_cv_type__Bool=yes
12116else
12117 echo "$as_me: failed program was:" >&5
12118sed 's/^/| /' conftest.$ac_ext >&5
12119
12120 ac_cv_type__Bool=no
12121fi
12122
12123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124fi
12125{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12126echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128# The cast to long int works around a bug in the HP C Compiler
12129# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12130# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12131# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012132{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12133echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012134if test "${ac_cv_sizeof__Bool+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012135 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012136else
12137 if test "$cross_compiling" = yes; then
12138 # Depending upon the size, compute the lo and hi bounds.
12139cat >conftest.$ac_ext <<_ACEOF
12140/* confdefs.h. */
12141_ACEOF
12142cat confdefs.h >>conftest.$ac_ext
12143cat >>conftest.$ac_ext <<_ACEOF
12144/* end confdefs.h. */
12145$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012146 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012147int
12148main ()
12149{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012150static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012151test_array [0] = 0
12152
12153 ;
12154 return 0;
12155}
12156_ACEOF
12157rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158if { (ac_try="$ac_compile"
12159case "(($ac_try" in
12160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12161 *) ac_try_echo=$ac_try;;
12162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012165 ac_status=$?
12166 grep -v '^ *+' conftest.er1 >conftest.err
12167 rm -f conftest.er1
12168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170 (exit $ac_status); } && {
12171 test -z "$ac_c_werror_flag" ||
12172 test ! -s conftest.err
12173 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012174 ac_lo=0 ac_mid=0
12175 while :; do
12176 cat >conftest.$ac_ext <<_ACEOF
12177/* confdefs.h. */
12178_ACEOF
12179cat confdefs.h >>conftest.$ac_ext
12180cat >>conftest.$ac_ext <<_ACEOF
12181/* end confdefs.h. */
12182$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012183 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012184int
12185main ()
12186{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012187static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012188test_array [0] = 0
12189
12190 ;
12191 return 0;
12192}
12193_ACEOF
12194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195if { (ac_try="$ac_compile"
12196case "(($ac_try" in
12197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12198 *) ac_try_echo=$ac_try;;
12199esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012202 ac_status=$?
12203 grep -v '^ *+' conftest.er1 >conftest.err
12204 rm -f conftest.er1
12205 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012207 (exit $ac_status); } && {
12208 test -z "$ac_c_werror_flag" ||
12209 test ! -s conftest.err
12210 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012211 ac_hi=$ac_mid; break
12212else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012213 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012214sed 's/^/| /' conftest.$ac_ext >&5
12215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 ac_lo=`expr $ac_mid + 1`
12217 if test $ac_lo -le $ac_mid; then
12218 ac_lo= ac_hi=
12219 break
12220 fi
12221 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223
12224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012225 done
12226else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012227 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012228sed 's/^/| /' conftest.$ac_ext >&5
12229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012231/* confdefs.h. */
12232_ACEOF
12233cat confdefs.h >>conftest.$ac_ext
12234cat >>conftest.$ac_ext <<_ACEOF
12235/* end confdefs.h. */
12236$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012237 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012238int
12239main ()
12240{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012242test_array [0] = 0
12243
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249if { (ac_try="$ac_compile"
12250case "(($ac_try" in
12251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12252 *) ac_try_echo=$ac_try;;
12253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012256 ac_status=$?
12257 grep -v '^ *+' conftest.er1 >conftest.err
12258 rm -f conftest.er1
12259 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261 (exit $ac_status); } && {
12262 test -z "$ac_c_werror_flag" ||
12263 test ! -s conftest.err
12264 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012265 ac_hi=-1 ac_mid=-1
12266 while :; do
12267 cat >conftest.$ac_ext <<_ACEOF
12268/* confdefs.h. */
12269_ACEOF
12270cat confdefs.h >>conftest.$ac_ext
12271cat >>conftest.$ac_ext <<_ACEOF
12272/* end confdefs.h. */
12273$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012274 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012275int
12276main ()
12277{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012278static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012279test_array [0] = 0
12280
12281 ;
12282 return 0;
12283}
12284_ACEOF
12285rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286if { (ac_try="$ac_compile"
12287case "(($ac_try" in
12288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12289 *) ac_try_echo=$ac_try;;
12290esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012293 ac_status=$?
12294 grep -v '^ *+' conftest.er1 >conftest.err
12295 rm -f conftest.er1
12296 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298 (exit $ac_status); } && {
12299 test -z "$ac_c_werror_flag" ||
12300 test ! -s conftest.err
12301 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012302 ac_lo=$ac_mid; break
12303else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012304 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012305sed 's/^/| /' conftest.$ac_ext >&5
12306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307 ac_hi=`expr '(' $ac_mid ')' - 1`
12308 if test $ac_mid -le $ac_hi; then
12309 ac_lo= ac_hi=
12310 break
12311 fi
12312 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314
12315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012316 done
12317else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012318 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012319sed 's/^/| /' conftest.$ac_ext >&5
12320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323
12324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326
12327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012328# Binary search between lo and hi bounds.
12329while test "x$ac_lo" != "x$ac_hi"; do
12330 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12331 cat >conftest.$ac_ext <<_ACEOF
12332/* confdefs.h. */
12333_ACEOF
12334cat confdefs.h >>conftest.$ac_ext
12335cat >>conftest.$ac_ext <<_ACEOF
12336/* end confdefs.h. */
12337$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012338 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012339int
12340main ()
12341{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012343test_array [0] = 0
12344
12345 ;
12346 return 0;
12347}
12348_ACEOF
12349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350if { (ac_try="$ac_compile"
12351case "(($ac_try" in
12352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12353 *) ac_try_echo=$ac_try;;
12354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012356 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012357 ac_status=$?
12358 grep -v '^ *+' conftest.er1 >conftest.err
12359 rm -f conftest.er1
12360 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362 (exit $ac_status); } && {
12363 test -z "$ac_c_werror_flag" ||
12364 test ! -s conftest.err
12365 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012366 ac_hi=$ac_mid
12367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012368 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012369sed 's/^/| /' conftest.$ac_ext >&5
12370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012373
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012375done
12376case $ac_lo in
12377?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378'') if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012379 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012380See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012381echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012382See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012383 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012384 else
12385 ac_cv_sizeof__Bool=0
12386 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012387esac
12388else
12389 cat >conftest.$ac_ext <<_ACEOF
12390/* confdefs.h. */
12391_ACEOF
12392cat confdefs.h >>conftest.$ac_ext
12393cat >>conftest.$ac_ext <<_ACEOF
12394/* end confdefs.h. */
12395$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012396 typedef _Bool ac__type_sizeof_;
12397static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12398static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012399#include <stdio.h>
12400#include <stdlib.h>
12401int
12402main ()
12403{
12404
12405 FILE *f = fopen ("conftest.val", "w");
12406 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012408 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012409 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012411 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012413 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012414 }
12415 else
12416 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012418 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012420 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012421 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012423
12424 ;
12425 return 0;
12426}
12427_ACEOF
12428rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429if { (ac_try="$ac_link"
12430case "(($ac_try" in
12431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12432 *) ac_try_echo=$ac_try;;
12433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012436 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439 { (case "(($ac_try" in
12440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12441 *) ac_try_echo=$ac_try;;
12442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012445 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 (exit $ac_status); }; }; then
12448 ac_cv_sizeof__Bool=`cat conftest.val`
12449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012450 echo "$as_me: program exited with status $ac_status" >&5
12451echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012452sed 's/^/| /' conftest.$ac_ext >&5
12453
12454( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455if test "$ac_cv_type__Bool" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012456 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012457See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012458echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012459See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012460 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461 else
12462 ac_cv_sizeof__Bool=0
12463 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465rm -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 +000012466fi
12467rm -f conftest.val
12468fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012469{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12470echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471
12472
12473
Thomas Woutersb2137042007-02-01 18:02:27 +000012474cat >>confdefs.h <<_ACEOF
12475#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12476_ACEOF
12477
12478
12479fi
12480
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012481{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12482echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012483if test "${ac_cv_type_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012484 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012485else
12486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012487/* confdefs.h. */
12488_ACEOF
12489cat confdefs.h >>conftest.$ac_ext
12490cat >>conftest.$ac_ext <<_ACEOF
12491/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012492#ifdef HAVE_STDINT_H
12493 #include <stdint.h>
12494 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012495
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012496typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012500if ((ac__type_new_ *) 0)
12501 return 0;
12502if (sizeof (ac__type_new_))
12503 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 ;
12505 return 0;
12506}
12507_ACEOF
12508rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012509if { (ac_try="$ac_compile"
12510case "(($ac_try" in
12511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12512 *) ac_try_echo=$ac_try;;
12513esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012517 grep -v '^ *+' conftest.er1 >conftest.err
12518 rm -f conftest.er1
12519 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012521 (exit $ac_status); } && {
12522 test -z "$ac_c_werror_flag" ||
12523 test ! -s conftest.err
12524 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012525 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012526else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012527 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012528sed 's/^/| /' conftest.$ac_ext >&5
12529
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012530 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532
12533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012534fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012535{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12536echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12537if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012538
12539cat >>confdefs.h <<_ACEOF
12540#define HAVE_UINTPTR_T 1
12541_ACEOF
12542
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012543{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12544echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12545if test "${ac_cv_type_uintptr_t+set}" = set; then
12546 echo $ECHO_N "(cached) $ECHO_C" >&6
12547else
12548 cat >conftest.$ac_ext <<_ACEOF
12549/* confdefs.h. */
12550_ACEOF
12551cat confdefs.h >>conftest.$ac_ext
12552cat >>conftest.$ac_ext <<_ACEOF
12553/* end confdefs.h. */
12554$ac_includes_default
12555typedef uintptr_t ac__type_new_;
12556int
12557main ()
12558{
12559if ((ac__type_new_ *) 0)
12560 return 0;
12561if (sizeof (ac__type_new_))
12562 return 0;
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567rm -f conftest.$ac_objext
12568if { (ac_try="$ac_compile"
12569case "(($ac_try" in
12570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12571 *) ac_try_echo=$ac_try;;
12572esac
12573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12574 (eval "$ac_compile") 2>conftest.er1
12575 ac_status=$?
12576 grep -v '^ *+' conftest.er1 >conftest.err
12577 rm -f conftest.er1
12578 cat conftest.err >&5
12579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12580 (exit $ac_status); } && {
12581 test -z "$ac_c_werror_flag" ||
12582 test ! -s conftest.err
12583 } && test -s conftest.$ac_objext; then
12584 ac_cv_type_uintptr_t=yes
12585else
12586 echo "$as_me: failed program was:" >&5
12587sed 's/^/| /' conftest.$ac_ext >&5
12588
12589 ac_cv_type_uintptr_t=no
12590fi
12591
12592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12593fi
12594{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12595echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597# The cast to long int works around a bug in the HP C Compiler
12598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12600# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012601{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12602echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012603if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012604 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012605else
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 if test "$cross_compiling" = yes; then
12607 # Depending upon the size, compute the lo and hi bounds.
12608cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* confdefs.h. */
12610_ACEOF
12611cat confdefs.h >>conftest.$ac_ext
12612cat >>conftest.$ac_ext <<_ACEOF
12613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012614$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012615 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012616int
12617main ()
12618{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012619static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012620test_array [0] = 0
12621
12622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627if { (ac_try="$ac_compile"
12628case "(($ac_try" in
12629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12630 *) ac_try_echo=$ac_try;;
12631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 ac_lo=0 ac_mid=0
12644 while :; do
12645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* confdefs.h. */
12647_ACEOF
12648cat confdefs.h >>conftest.$ac_ext
12649cat >>conftest.$ac_ext <<_ACEOF
12650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012651$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012652 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012656static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012657test_array [0] = 0
12658
12659 ;
12660 return 0;
12661}
12662_ACEOF
12663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664if { (ac_try="$ac_compile"
12665case "(($ac_try" in
12666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667 *) ac_try_echo=$ac_try;;
12668esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012672 grep -v '^ *+' conftest.er1 >conftest.err
12673 rm -f conftest.er1
12674 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676 (exit $ac_status); } && {
12677 test -z "$ac_c_werror_flag" ||
12678 test ! -s conftest.err
12679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_hi=$ac_mid; break
12681else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012683sed 's/^/| /' conftest.$ac_ext >&5
12684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 ac_lo=`expr $ac_mid + 1`
12686 if test $ac_lo -le $ac_mid; then
12687 ac_lo= ac_hi=
12688 break
12689 fi
12690 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692
12693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 done
12695else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012697sed 's/^/| /' conftest.$ac_ext >&5
12698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012700/* confdefs.h. */
12701_ACEOF
12702cat confdefs.h >>conftest.$ac_ext
12703cat >>conftest.$ac_ext <<_ACEOF
12704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012705$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012706 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012710static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012711test_array [0] = 0
12712
12713 ;
12714 return 0;
12715}
12716_ACEOF
12717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718if { (ac_try="$ac_compile"
12719case "(($ac_try" in
12720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12721 *) ac_try_echo=$ac_try;;
12722esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012726 grep -v '^ *+' conftest.er1 >conftest.err
12727 rm -f conftest.er1
12728 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730 (exit $ac_status); } && {
12731 test -z "$ac_c_werror_flag" ||
12732 test ! -s conftest.err
12733 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 ac_hi=-1 ac_mid=-1
12735 while :; do
12736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012737/* confdefs.h. */
12738_ACEOF
12739cat confdefs.h >>conftest.$ac_ext
12740cat >>conftest.$ac_ext <<_ACEOF
12741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012742$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012743 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012744int
12745main ()
12746{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012747static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012748test_array [0] = 0
12749
12750 ;
12751 return 0;
12752}
12753_ACEOF
12754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755if { (ac_try="$ac_compile"
12756case "(($ac_try" in
12757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12758 *) ac_try_echo=$ac_try;;
12759esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012763 grep -v '^ *+' conftest.er1 >conftest.err
12764 rm -f conftest.er1
12765 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767 (exit $ac_status); } && {
12768 test -z "$ac_c_werror_flag" ||
12769 test ! -s conftest.err
12770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_lo=$ac_mid; break
12772else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012774sed 's/^/| /' conftest.$ac_ext >&5
12775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776 ac_hi=`expr '(' $ac_mid ')' - 1`
12777 if test $ac_mid -le $ac_hi; then
12778 ac_lo= ac_hi=
12779 break
12780 fi
12781 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783
12784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012785 done
12786else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012787 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012788sed 's/^/| /' conftest.$ac_ext >&5
12789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792
12793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795
12796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012797# Binary search between lo and hi bounds.
12798while test "x$ac_lo" != "x$ac_hi"; do
12799 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012807 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012808int
12809main ()
12810{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012811static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012812test_array [0] = 0
12813
12814 ;
12815 return 0;
12816}
12817_ACEOF
12818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819if { (ac_try="$ac_compile"
12820case "(($ac_try" in
12821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12822 *) ac_try_echo=$ac_try;;
12823esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012827 grep -v '^ *+' conftest.er1 >conftest.err
12828 rm -f conftest.er1
12829 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831 (exit $ac_status); } && {
12832 test -z "$ac_c_werror_flag" ||
12833 test ! -s conftest.err
12834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_hi=$ac_mid
12836else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012838sed 's/^/| /' conftest.$ac_ext >&5
12839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012842
12843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012844done
12845case $ac_lo in
12846?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012847'') if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012848 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012849See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012850echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012851See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012852 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853 else
12854 ac_cv_sizeof_uintptr_t=0
12855 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012856esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* confdefs.h. */
12860_ACEOF
12861cat confdefs.h >>conftest.$ac_ext
12862cat >>conftest.$ac_ext <<_ACEOF
12863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012864$ac_includes_default
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012865 typedef uintptr_t ac__type_sizeof_;
12866static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12867static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012868#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
12871main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012872{
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
12874 FILE *f = fopen ("conftest.val", "w");
12875 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012877 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012880 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012882 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 }
12884 else
12885 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012887 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012889 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893 ;
12894 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012895}
Martin v. Löwis11437992002-04-12 09:54:03 +000012896_ACEOF
12897rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898if { (ac_try="$ac_link"
12899case "(($ac_try" in
12900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12901 *) ac_try_echo=$ac_try;;
12902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 { (case "(($ac_try" in
12909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12910 *) ac_try_echo=$ac_try;;
12911esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 (exit $ac_status); }; }; then
12917 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012918else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012919 echo "$as_me: program exited with status $ac_status" >&5
12920echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012921sed 's/^/| /' conftest.$ac_ext >&5
12922
Martin v. Löwis11437992002-04-12 09:54:03 +000012923( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924if test "$ac_cv_type_uintptr_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012925 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012926See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012927echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012928See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012929 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930 else
12931 ac_cv_sizeof_uintptr_t=0
12932 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934rm -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 +000012935fi
12936rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012937fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012938{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12939echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940
12941
12942
Martin v. Löwis11437992002-04-12 09:54:03 +000012943cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012944#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012945_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946
Michael W. Hudson54241132001-12-07 15:38:26 +000012947
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948fi
12949
Thomas Wouters89f507f2006-12-13 04:49:30 +000012950
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012951{ echo "$as_me:$LINENO: checking for off_t" >&5
12952echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12953if test "${ac_cv_type_off_t+set}" = set; then
12954 echo $ECHO_N "(cached) $ECHO_C" >&6
12955else
12956 cat >conftest.$ac_ext <<_ACEOF
12957/* confdefs.h. */
12958_ACEOF
12959cat confdefs.h >>conftest.$ac_ext
12960cat >>conftest.$ac_ext <<_ACEOF
12961/* end confdefs.h. */
12962
12963#ifdef HAVE_SYS_TYPES_H
12964#include <sys/types.h>
12965#endif
12966
12967
12968typedef off_t ac__type_new_;
12969int
12970main ()
12971{
12972if ((ac__type_new_ *) 0)
12973 return 0;
12974if (sizeof (ac__type_new_))
12975 return 0;
12976 ;
12977 return 0;
12978}
12979_ACEOF
12980rm -f conftest.$ac_objext
12981if { (ac_try="$ac_compile"
12982case "(($ac_try" in
12983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12984 *) ac_try_echo=$ac_try;;
12985esac
12986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12987 (eval "$ac_compile") 2>conftest.er1
12988 ac_status=$?
12989 grep -v '^ *+' conftest.er1 >conftest.err
12990 rm -f conftest.er1
12991 cat conftest.err >&5
12992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12993 (exit $ac_status); } && {
12994 test -z "$ac_c_werror_flag" ||
12995 test ! -s conftest.err
12996 } && test -s conftest.$ac_objext; then
12997 ac_cv_type_off_t=yes
12998else
12999 echo "$as_me: failed program was:" >&5
13000sed 's/^/| /' conftest.$ac_ext >&5
13001
13002 ac_cv_type_off_t=no
13003fi
13004
13005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13006fi
13007{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13008echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13009
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013010# The cast to long int works around a bug in the HP C Compiler
13011# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13012# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13013# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013014{ echo "$as_me:$LINENO: checking size of off_t" >&5
13015echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016if test "${ac_cv_sizeof_off_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013017 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018else
13019 if test "$cross_compiling" = yes; then
13020 # Depending upon the size, compute the lo and hi bounds.
13021cat >conftest.$ac_ext <<_ACEOF
13022/* confdefs.h. */
13023_ACEOF
13024cat confdefs.h >>conftest.$ac_ext
13025cat >>conftest.$ac_ext <<_ACEOF
13026/* end confdefs.h. */
13027
13028#ifdef HAVE_SYS_TYPES_H
13029#include <sys/types.h>
13030#endif
13031
13032
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013033 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013034int
13035main ()
13036{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013038test_array [0] = 0
13039
13040 ;
13041 return 0;
13042}
13043_ACEOF
13044rm -f conftest.$ac_objext
13045if { (ac_try="$ac_compile"
13046case "(($ac_try" in
13047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13048 *) ac_try_echo=$ac_try;;
13049esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013051 (eval "$ac_compile") 2>conftest.er1
13052 ac_status=$?
13053 grep -v '^ *+' conftest.er1 >conftest.err
13054 rm -f conftest.er1
13055 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013057 (exit $ac_status); } && {
13058 test -z "$ac_c_werror_flag" ||
13059 test ! -s conftest.err
13060 } && test -s conftest.$ac_objext; then
13061 ac_lo=0 ac_mid=0
13062 while :; do
13063 cat >conftest.$ac_ext <<_ACEOF
13064/* confdefs.h. */
13065_ACEOF
13066cat confdefs.h >>conftest.$ac_ext
13067cat >>conftest.$ac_ext <<_ACEOF
13068/* end confdefs.h. */
13069
13070#ifdef HAVE_SYS_TYPES_H
13071#include <sys/types.h>
13072#endif
13073
13074
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013075 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013076int
13077main ()
13078{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013080test_array [0] = 0
13081
13082 ;
13083 return 0;
13084}
13085_ACEOF
13086rm -f conftest.$ac_objext
13087if { (ac_try="$ac_compile"
13088case "(($ac_try" in
13089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13090 *) ac_try_echo=$ac_try;;
13091esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013093 (eval "$ac_compile") 2>conftest.er1
13094 ac_status=$?
13095 grep -v '^ *+' conftest.er1 >conftest.err
13096 rm -f conftest.er1
13097 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013099 (exit $ac_status); } && {
13100 test -z "$ac_c_werror_flag" ||
13101 test ! -s conftest.err
13102 } && test -s conftest.$ac_objext; then
13103 ac_hi=$ac_mid; break
13104else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013105 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013106sed 's/^/| /' conftest.$ac_ext >&5
13107
13108 ac_lo=`expr $ac_mid + 1`
13109 if test $ac_lo -le $ac_mid; then
13110 ac_lo= ac_hi=
13111 break
13112 fi
13113 ac_mid=`expr 2 '*' $ac_mid + 1`
13114fi
13115
13116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13117 done
13118else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013119 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120sed 's/^/| /' conftest.$ac_ext >&5
13121
13122 cat >conftest.$ac_ext <<_ACEOF
13123/* confdefs.h. */
13124_ACEOF
13125cat confdefs.h >>conftest.$ac_ext
13126cat >>conftest.$ac_ext <<_ACEOF
13127/* end confdefs.h. */
13128
13129#ifdef HAVE_SYS_TYPES_H
13130#include <sys/types.h>
13131#endif
13132
13133
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013134 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013135int
13136main ()
13137{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013138static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013139test_array [0] = 0
13140
13141 ;
13142 return 0;
13143}
13144_ACEOF
13145rm -f conftest.$ac_objext
13146if { (ac_try="$ac_compile"
13147case "(($ac_try" in
13148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13149 *) ac_try_echo=$ac_try;;
13150esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152 (eval "$ac_compile") 2>conftest.er1
13153 ac_status=$?
13154 grep -v '^ *+' conftest.er1 >conftest.err
13155 rm -f conftest.er1
13156 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158 (exit $ac_status); } && {
13159 test -z "$ac_c_werror_flag" ||
13160 test ! -s conftest.err
13161 } && test -s conftest.$ac_objext; then
13162 ac_hi=-1 ac_mid=-1
13163 while :; do
13164 cat >conftest.$ac_ext <<_ACEOF
13165/* confdefs.h. */
13166_ACEOF
13167cat confdefs.h >>conftest.$ac_ext
13168cat >>conftest.$ac_ext <<_ACEOF
13169/* end confdefs.h. */
13170
13171#ifdef HAVE_SYS_TYPES_H
13172#include <sys/types.h>
13173#endif
13174
13175
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013176 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177int
13178main ()
13179{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013181test_array [0] = 0
13182
13183 ;
13184 return 0;
13185}
13186_ACEOF
13187rm -f conftest.$ac_objext
13188if { (ac_try="$ac_compile"
13189case "(($ac_try" in
13190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13191 *) ac_try_echo=$ac_try;;
13192esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013194 (eval "$ac_compile") 2>conftest.er1
13195 ac_status=$?
13196 grep -v '^ *+' conftest.er1 >conftest.err
13197 rm -f conftest.er1
13198 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013200 (exit $ac_status); } && {
13201 test -z "$ac_c_werror_flag" ||
13202 test ! -s conftest.err
13203 } && test -s conftest.$ac_objext; then
13204 ac_lo=$ac_mid; break
13205else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013206 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013207sed 's/^/| /' conftest.$ac_ext >&5
13208
13209 ac_hi=`expr '(' $ac_mid ')' - 1`
13210 if test $ac_mid -le $ac_hi; then
13211 ac_lo= ac_hi=
13212 break
13213 fi
13214 ac_mid=`expr 2 '*' $ac_mid`
13215fi
13216
13217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218 done
13219else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013220 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221sed 's/^/| /' conftest.$ac_ext >&5
13222
13223 ac_lo= ac_hi=
13224fi
13225
13226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227fi
13228
13229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13230# Binary search between lo and hi bounds.
13231while test "x$ac_lo" != "x$ac_hi"; do
13232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13233 cat >conftest.$ac_ext <<_ACEOF
13234/* confdefs.h. */
13235_ACEOF
13236cat confdefs.h >>conftest.$ac_ext
13237cat >>conftest.$ac_ext <<_ACEOF
13238/* end confdefs.h. */
13239
13240#ifdef HAVE_SYS_TYPES_H
13241#include <sys/types.h>
13242#endif
13243
13244
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013245 typedef off_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246int
13247main ()
13248{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013249static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250test_array [0] = 0
13251
13252 ;
13253 return 0;
13254}
13255_ACEOF
13256rm -f conftest.$ac_objext
13257if { (ac_try="$ac_compile"
13258case "(($ac_try" in
13259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13260 *) ac_try_echo=$ac_try;;
13261esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263 (eval "$ac_compile") 2>conftest.er1
13264 ac_status=$?
13265 grep -v '^ *+' conftest.er1 >conftest.err
13266 rm -f conftest.er1
13267 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269 (exit $ac_status); } && {
13270 test -z "$ac_c_werror_flag" ||
13271 test ! -s conftest.err
13272 } && test -s conftest.$ac_objext; then
13273 ac_hi=$ac_mid
13274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013275 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013276sed 's/^/| /' conftest.$ac_ext >&5
13277
13278 ac_lo=`expr '(' $ac_mid ')' + 1`
13279fi
13280
13281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13282done
13283case $ac_lo in
13284?*) ac_cv_sizeof_off_t=$ac_lo;;
13285'') if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013286 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013288echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013289See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013290 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013291 else
13292 ac_cv_sizeof_off_t=0
13293 fi ;;
13294esac
13295else
13296 cat >conftest.$ac_ext <<_ACEOF
13297/* confdefs.h. */
13298_ACEOF
13299cat confdefs.h >>conftest.$ac_ext
13300cat >>conftest.$ac_ext <<_ACEOF
13301/* end confdefs.h. */
13302
13303#ifdef HAVE_SYS_TYPES_H
13304#include <sys/types.h>
13305#endif
13306
13307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013308 typedef off_t ac__type_sizeof_;
13309static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13310static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013311#include <stdio.h>
13312#include <stdlib.h>
13313int
13314main ()
13315{
13316
13317 FILE *f = fopen ("conftest.val", "w");
13318 if (! f)
13319 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013320 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013321 {
13322 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013323 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013324 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013325 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013326 }
13327 else
13328 {
13329 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013330 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013331 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013332 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013333 }
13334 return ferror (f) || fclose (f) != 0;
13335
13336 ;
13337 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013338}
Martin v. Löwis11437992002-04-12 09:54:03 +000013339_ACEOF
13340rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341if { (ac_try="$ac_link"
13342case "(($ac_try" in
13343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13344 *) ac_try_echo=$ac_try;;
13345esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013350 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351 { (case "(($ac_try" in
13352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13353 *) ac_try_echo=$ac_try;;
13354esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013361else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013362 echo "$as_me: program exited with status $ac_status" >&5
13363echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013364sed 's/^/| /' conftest.$ac_ext >&5
13365
Martin v. Löwis11437992002-04-12 09:54:03 +000013366( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013367if test "$ac_cv_type_off_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013368 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013370echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013371See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013372 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013373 else
13374 ac_cv_sizeof_off_t=0
13375 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377rm -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 +000013378fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013379rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013380fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013381{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13382echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013384
13385
Martin v. Löwis11437992002-04-12 09:54:03 +000013386cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013387#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013388_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389
Michael W. Hudson54241132001-12-07 15:38:26 +000013390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013391
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013392{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13393echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +000013394if test "$have_long_long" = yes
13395then
13396if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013397 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398
Martin v. Löwis11437992002-04-12 09:54:03 +000013399cat >>confdefs.h <<\_ACEOF
13400#define HAVE_LARGEFILE_SUPPORT 1
13401_ACEOF
13402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013403 { echo "$as_me:$LINENO: result: yes" >&5
13404echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013405else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013406 { echo "$as_me:$LINENO: result: no" >&5
13407echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408fi
Mark Dickinson2df5d282009-12-31 21:22:50 +000013409else
13410 { echo "$as_me:$LINENO: result: no" >&5
13411echo "${ECHO_T}no" >&6; }
13412fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013413
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013414{ echo "$as_me:$LINENO: checking for time_t" >&5
13415echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13416if test "${ac_cv_type_time_t+set}" = set; then
13417 echo $ECHO_N "(cached) $ECHO_C" >&6
13418else
13419 cat >conftest.$ac_ext <<_ACEOF
13420/* confdefs.h. */
13421_ACEOF
13422cat confdefs.h >>conftest.$ac_ext
13423cat >>conftest.$ac_ext <<_ACEOF
13424/* end confdefs.h. */
13425
13426#ifdef HAVE_SYS_TYPES_H
13427#include <sys/types.h>
13428#endif
13429#ifdef HAVE_TIME_H
13430#include <time.h>
13431#endif
13432
13433
13434typedef time_t ac__type_new_;
13435int
13436main ()
13437{
13438if ((ac__type_new_ *) 0)
13439 return 0;
13440if (sizeof (ac__type_new_))
13441 return 0;
13442 ;
13443 return 0;
13444}
13445_ACEOF
13446rm -f conftest.$ac_objext
13447if { (ac_try="$ac_compile"
13448case "(($ac_try" in
13449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13450 *) ac_try_echo=$ac_try;;
13451esac
13452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13453 (eval "$ac_compile") 2>conftest.er1
13454 ac_status=$?
13455 grep -v '^ *+' conftest.er1 >conftest.err
13456 rm -f conftest.er1
13457 cat conftest.err >&5
13458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13459 (exit $ac_status); } && {
13460 test -z "$ac_c_werror_flag" ||
13461 test ! -s conftest.err
13462 } && test -s conftest.$ac_objext; then
13463 ac_cv_type_time_t=yes
13464else
13465 echo "$as_me: failed program was:" >&5
13466sed 's/^/| /' conftest.$ac_ext >&5
13467
13468 ac_cv_type_time_t=no
13469fi
13470
13471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13472fi
13473{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13474echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13475
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013476# The cast to long int works around a bug in the HP C Compiler
13477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13479# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013480{ echo "$as_me:$LINENO: checking size of time_t" >&5
13481echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013482if test "${ac_cv_sizeof_time_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013483 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013484else
13485 if test "$cross_compiling" = yes; then
13486 # Depending upon the size, compute the lo and hi bounds.
13487cat >conftest.$ac_ext <<_ACEOF
13488/* confdefs.h. */
13489_ACEOF
13490cat confdefs.h >>conftest.$ac_ext
13491cat >>conftest.$ac_ext <<_ACEOF
13492/* end confdefs.h. */
13493
13494#ifdef HAVE_SYS_TYPES_H
13495#include <sys/types.h>
13496#endif
13497#ifdef HAVE_TIME_H
13498#include <time.h>
13499#endif
13500
13501
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013502 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013503int
13504main ()
13505{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013506static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013507test_array [0] = 0
13508
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513rm -f conftest.$ac_objext
13514if { (ac_try="$ac_compile"
13515case "(($ac_try" in
13516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13517 *) ac_try_echo=$ac_try;;
13518esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013520 (eval "$ac_compile") 2>conftest.er1
13521 ac_status=$?
13522 grep -v '^ *+' conftest.er1 >conftest.err
13523 rm -f conftest.er1
13524 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013526 (exit $ac_status); } && {
13527 test -z "$ac_c_werror_flag" ||
13528 test ! -s conftest.err
13529 } && test -s conftest.$ac_objext; then
13530 ac_lo=0 ac_mid=0
13531 while :; do
13532 cat >conftest.$ac_ext <<_ACEOF
13533/* confdefs.h. */
13534_ACEOF
13535cat confdefs.h >>conftest.$ac_ext
13536cat >>conftest.$ac_ext <<_ACEOF
13537/* end confdefs.h. */
13538
13539#ifdef HAVE_SYS_TYPES_H
13540#include <sys/types.h>
13541#endif
13542#ifdef HAVE_TIME_H
13543#include <time.h>
13544#endif
13545
13546
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013547 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013548int
13549main ()
13550{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013551static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013552test_array [0] = 0
13553
13554 ;
13555 return 0;
13556}
13557_ACEOF
13558rm -f conftest.$ac_objext
13559if { (ac_try="$ac_compile"
13560case "(($ac_try" in
13561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13562 *) ac_try_echo=$ac_try;;
13563esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013565 (eval "$ac_compile") 2>conftest.er1
13566 ac_status=$?
13567 grep -v '^ *+' conftest.er1 >conftest.err
13568 rm -f conftest.er1
13569 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013571 (exit $ac_status); } && {
13572 test -z "$ac_c_werror_flag" ||
13573 test ! -s conftest.err
13574 } && test -s conftest.$ac_objext; then
13575 ac_hi=$ac_mid; break
13576else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013577 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578sed 's/^/| /' conftest.$ac_ext >&5
13579
13580 ac_lo=`expr $ac_mid + 1`
13581 if test $ac_lo -le $ac_mid; then
13582 ac_lo= ac_hi=
13583 break
13584 fi
13585 ac_mid=`expr 2 '*' $ac_mid + 1`
13586fi
13587
13588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13589 done
13590else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013591 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013592sed 's/^/| /' conftest.$ac_ext >&5
13593
13594 cat >conftest.$ac_ext <<_ACEOF
13595/* confdefs.h. */
13596_ACEOF
13597cat confdefs.h >>conftest.$ac_ext
13598cat >>conftest.$ac_ext <<_ACEOF
13599/* end confdefs.h. */
13600
13601#ifdef HAVE_SYS_TYPES_H
13602#include <sys/types.h>
13603#endif
13604#ifdef HAVE_TIME_H
13605#include <time.h>
13606#endif
13607
13608
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013609 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013610int
13611main ()
13612{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013613static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013614test_array [0] = 0
13615
13616 ;
13617 return 0;
13618}
13619_ACEOF
13620rm -f conftest.$ac_objext
13621if { (ac_try="$ac_compile"
13622case "(($ac_try" in
13623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13624 *) ac_try_echo=$ac_try;;
13625esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013627 (eval "$ac_compile") 2>conftest.er1
13628 ac_status=$?
13629 grep -v '^ *+' conftest.er1 >conftest.err
13630 rm -f conftest.er1
13631 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013633 (exit $ac_status); } && {
13634 test -z "$ac_c_werror_flag" ||
13635 test ! -s conftest.err
13636 } && test -s conftest.$ac_objext; then
13637 ac_hi=-1 ac_mid=-1
13638 while :; do
13639 cat >conftest.$ac_ext <<_ACEOF
13640/* confdefs.h. */
13641_ACEOF
13642cat confdefs.h >>conftest.$ac_ext
13643cat >>conftest.$ac_ext <<_ACEOF
13644/* end confdefs.h. */
13645
13646#ifdef HAVE_SYS_TYPES_H
13647#include <sys/types.h>
13648#endif
13649#ifdef HAVE_TIME_H
13650#include <time.h>
13651#endif
13652
13653
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013654 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655int
13656main ()
13657{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013658static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659test_array [0] = 0
13660
13661 ;
13662 return 0;
13663}
13664_ACEOF
13665rm -f conftest.$ac_objext
13666if { (ac_try="$ac_compile"
13667case "(($ac_try" in
13668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13669 *) ac_try_echo=$ac_try;;
13670esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013672 (eval "$ac_compile") 2>conftest.er1
13673 ac_status=$?
13674 grep -v '^ *+' conftest.er1 >conftest.err
13675 rm -f conftest.er1
13676 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013678 (exit $ac_status); } && {
13679 test -z "$ac_c_werror_flag" ||
13680 test ! -s conftest.err
13681 } && test -s conftest.$ac_objext; then
13682 ac_lo=$ac_mid; break
13683else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013684 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013685sed 's/^/| /' conftest.$ac_ext >&5
13686
13687 ac_hi=`expr '(' $ac_mid ')' - 1`
13688 if test $ac_mid -le $ac_hi; then
13689 ac_lo= ac_hi=
13690 break
13691 fi
13692 ac_mid=`expr 2 '*' $ac_mid`
13693fi
13694
13695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13696 done
13697else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013698 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013699sed 's/^/| /' conftest.$ac_ext >&5
13700
13701 ac_lo= ac_hi=
13702fi
13703
13704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13705fi
13706
13707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13708# Binary search between lo and hi bounds.
13709while test "x$ac_lo" != "x$ac_hi"; do
13710 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13711 cat >conftest.$ac_ext <<_ACEOF
13712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
13717
13718#ifdef HAVE_SYS_TYPES_H
13719#include <sys/types.h>
13720#endif
13721#ifdef HAVE_TIME_H
13722#include <time.h>
13723#endif
13724
13725
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013726 typedef time_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013727int
13728main ()
13729{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013730static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013731test_array [0] = 0
13732
13733 ;
13734 return 0;
13735}
13736_ACEOF
13737rm -f conftest.$ac_objext
13738if { (ac_try="$ac_compile"
13739case "(($ac_try" in
13740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13741 *) ac_try_echo=$ac_try;;
13742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013744 (eval "$ac_compile") 2>conftest.er1
13745 ac_status=$?
13746 grep -v '^ *+' conftest.er1 >conftest.err
13747 rm -f conftest.er1
13748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013750 (exit $ac_status); } && {
13751 test -z "$ac_c_werror_flag" ||
13752 test ! -s conftest.err
13753 } && test -s conftest.$ac_objext; then
13754 ac_hi=$ac_mid
13755else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013756 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013757sed 's/^/| /' conftest.$ac_ext >&5
13758
13759 ac_lo=`expr '(' $ac_mid ')' + 1`
13760fi
13761
13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763done
13764case $ac_lo in
13765?*) ac_cv_sizeof_time_t=$ac_lo;;
13766'') if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013767 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013769echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013771 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013772 else
13773 ac_cv_sizeof_time_t=0
13774 fi ;;
13775esac
13776else
13777 cat >conftest.$ac_ext <<_ACEOF
13778/* confdefs.h. */
13779_ACEOF
13780cat confdefs.h >>conftest.$ac_ext
13781cat >>conftest.$ac_ext <<_ACEOF
13782/* end confdefs.h. */
13783
13784#ifdef HAVE_SYS_TYPES_H
13785#include <sys/types.h>
13786#endif
13787#ifdef HAVE_TIME_H
13788#include <time.h>
13789#endif
13790
13791
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013792 typedef time_t ac__type_sizeof_;
13793static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13794static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013795#include <stdio.h>
13796#include <stdlib.h>
13797int
13798main ()
13799{
13800
13801 FILE *f = fopen ("conftest.val", "w");
13802 if (! f)
13803 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013804 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013805 {
13806 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013807 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013808 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013809 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013810 }
13811 else
13812 {
13813 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013814 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013816 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013817 }
13818 return ferror (f) || fclose (f) != 0;
13819
13820 ;
13821 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013822}
Martin v. Löwis11437992002-04-12 09:54:03 +000013823_ACEOF
13824rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825if { (ac_try="$ac_link"
13826case "(($ac_try" in
13827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13828 *) ac_try_echo=$ac_try;;
13829esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013831 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 { (case "(($ac_try" in
13836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13837 *) ac_try_echo=$ac_try;;
13838esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013844 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013845else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013846 echo "$as_me: program exited with status $ac_status" >&5
13847echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013848sed 's/^/| /' conftest.$ac_ext >&5
13849
Martin v. Löwis11437992002-04-12 09:54:03 +000013850( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013851if test "$ac_cv_type_time_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013853See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013854echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013855See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013856 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013857 else
13858 ac_cv_sizeof_time_t=0
13859 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861rm -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 +000013862fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013863rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013864fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013865{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13866echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013868
13869
Martin v. Löwis11437992002-04-12 09:54:03 +000013870cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013871#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013872_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013873
Michael W. Hudson54241132001-12-07 15:38:26 +000013874
13875
Trent Mick635f6fb2000-08-23 21:33:05 +000013876# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013877ac_save_cc="$CC"
13878if test "$ac_cv_kpthread" = "yes"
13879then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013880elif test "$ac_cv_kthread" = "yes"
13881then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013882elif test "$ac_cv_pthread" = "yes"
13883then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013884fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013885
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013886{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13887echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013888have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013890/* confdefs.h. */
13891_ACEOF
13892cat confdefs.h >>conftest.$ac_ext
13893cat >>conftest.$ac_ext <<_ACEOF
13894/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013895#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013896int
13897main ()
13898{
Guido van Rossum12580492000-09-24 16:47:19 +000013899pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 ;
13901 return 0;
13902}
13903_ACEOF
13904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905if { (ac_try="$ac_compile"
13906case "(($ac_try" in
13907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13908 *) ac_try_echo=$ac_try;;
13909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013913 grep -v '^ *+' conftest.er1 >conftest.err
13914 rm -f conftest.er1
13915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 (exit $ac_status); } && {
13918 test -z "$ac_c_werror_flag" ||
13919 test ! -s conftest.err
13920 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013921 have_pthread_t=yes
13922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013924sed 's/^/| /' conftest.$ac_ext >&5
13925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013926
Trent Mick635f6fb2000-08-23 21:33:05 +000013927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928
13929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013930{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13931echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013932if test "$have_pthread_t" = yes ; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013933 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13934echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13935if test "${ac_cv_type_pthread_t+set}" = set; then
13936 echo $ECHO_N "(cached) $ECHO_C" >&6
13937else
13938 cat >conftest.$ac_ext <<_ACEOF
13939/* confdefs.h. */
13940_ACEOF
13941cat confdefs.h >>conftest.$ac_ext
13942cat >>conftest.$ac_ext <<_ACEOF
13943/* end confdefs.h. */
13944
13945#ifdef HAVE_PTHREAD_H
13946#include <pthread.h>
13947#endif
13948
13949
13950typedef pthread_t ac__type_new_;
13951int
13952main ()
13953{
13954if ((ac__type_new_ *) 0)
13955 return 0;
13956if (sizeof (ac__type_new_))
13957 return 0;
13958 ;
13959 return 0;
13960}
13961_ACEOF
13962rm -f conftest.$ac_objext
13963if { (ac_try="$ac_compile"
13964case "(($ac_try" in
13965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13966 *) ac_try_echo=$ac_try;;
13967esac
13968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13969 (eval "$ac_compile") 2>conftest.er1
13970 ac_status=$?
13971 grep -v '^ *+' conftest.er1 >conftest.err
13972 rm -f conftest.er1
13973 cat conftest.err >&5
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); } && {
13976 test -z "$ac_c_werror_flag" ||
13977 test ! -s conftest.err
13978 } && test -s conftest.$ac_objext; then
13979 ac_cv_type_pthread_t=yes
13980else
13981 echo "$as_me: failed program was:" >&5
13982sed 's/^/| /' conftest.$ac_ext >&5
13983
13984 ac_cv_type_pthread_t=no
13985fi
13986
13987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13988fi
13989{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13990echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13991
13992# The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13995# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013996{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
13997echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013998if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013999 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014000else
14001 if test "$cross_compiling" = yes; then
14002 # Depending upon the size, compute the lo and hi bounds.
14003cat >conftest.$ac_ext <<_ACEOF
14004/* confdefs.h. */
14005_ACEOF
14006cat confdefs.h >>conftest.$ac_ext
14007cat >>conftest.$ac_ext <<_ACEOF
14008/* end confdefs.h. */
14009
14010#ifdef HAVE_PTHREAD_H
14011#include <pthread.h>
14012#endif
14013
14014
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014015 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016int
14017main ()
14018{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014020test_array [0] = 0
14021
14022 ;
14023 return 0;
14024}
14025_ACEOF
14026rm -f conftest.$ac_objext
14027if { (ac_try="$ac_compile"
14028case "(($ac_try" in
14029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14030 *) ac_try_echo=$ac_try;;
14031esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014033 (eval "$ac_compile") 2>conftest.er1
14034 ac_status=$?
14035 grep -v '^ *+' conftest.er1 >conftest.err
14036 rm -f conftest.er1
14037 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014039 (exit $ac_status); } && {
14040 test -z "$ac_c_werror_flag" ||
14041 test ! -s conftest.err
14042 } && test -s conftest.$ac_objext; then
14043 ac_lo=0 ac_mid=0
14044 while :; do
14045 cat >conftest.$ac_ext <<_ACEOF
14046/* confdefs.h. */
14047_ACEOF
14048cat confdefs.h >>conftest.$ac_ext
14049cat >>conftest.$ac_ext <<_ACEOF
14050/* end confdefs.h. */
14051
14052#ifdef HAVE_PTHREAD_H
14053#include <pthread.h>
14054#endif
14055
14056
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014057 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014058int
14059main ()
14060{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014061static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014062test_array [0] = 0
14063
14064 ;
14065 return 0;
14066}
14067_ACEOF
14068rm -f conftest.$ac_objext
14069if { (ac_try="$ac_compile"
14070case "(($ac_try" in
14071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14072 *) ac_try_echo=$ac_try;;
14073esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014075 (eval "$ac_compile") 2>conftest.er1
14076 ac_status=$?
14077 grep -v '^ *+' conftest.er1 >conftest.err
14078 rm -f conftest.er1
14079 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014081 (exit $ac_status); } && {
14082 test -z "$ac_c_werror_flag" ||
14083 test ! -s conftest.err
14084 } && test -s conftest.$ac_objext; then
14085 ac_hi=$ac_mid; break
14086else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014087 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014088sed 's/^/| /' conftest.$ac_ext >&5
14089
14090 ac_lo=`expr $ac_mid + 1`
14091 if test $ac_lo -le $ac_mid; then
14092 ac_lo= ac_hi=
14093 break
14094 fi
14095 ac_mid=`expr 2 '*' $ac_mid + 1`
14096fi
14097
14098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14099 done
14100else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014101 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102sed 's/^/| /' conftest.$ac_ext >&5
14103
14104 cat >conftest.$ac_ext <<_ACEOF
14105/* confdefs.h. */
14106_ACEOF
14107cat confdefs.h >>conftest.$ac_ext
14108cat >>conftest.$ac_ext <<_ACEOF
14109/* end confdefs.h. */
14110
14111#ifdef HAVE_PTHREAD_H
14112#include <pthread.h>
14113#endif
14114
14115
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014116 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117int
14118main ()
14119{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014120static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014121test_array [0] = 0
14122
14123 ;
14124 return 0;
14125}
14126_ACEOF
14127rm -f conftest.$ac_objext
14128if { (ac_try="$ac_compile"
14129case "(($ac_try" in
14130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14131 *) ac_try_echo=$ac_try;;
14132esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134 (eval "$ac_compile") 2>conftest.er1
14135 ac_status=$?
14136 grep -v '^ *+' conftest.er1 >conftest.err
14137 rm -f conftest.er1
14138 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014140 (exit $ac_status); } && {
14141 test -z "$ac_c_werror_flag" ||
14142 test ! -s conftest.err
14143 } && test -s conftest.$ac_objext; then
14144 ac_hi=-1 ac_mid=-1
14145 while :; do
14146 cat >conftest.$ac_ext <<_ACEOF
14147/* confdefs.h. */
14148_ACEOF
14149cat confdefs.h >>conftest.$ac_ext
14150cat >>conftest.$ac_ext <<_ACEOF
14151/* end confdefs.h. */
14152
14153#ifdef HAVE_PTHREAD_H
14154#include <pthread.h>
14155#endif
14156
14157
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014158 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159int
14160main ()
14161{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014162static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014163test_array [0] = 0
14164
14165 ;
14166 return 0;
14167}
14168_ACEOF
14169rm -f conftest.$ac_objext
14170if { (ac_try="$ac_compile"
14171case "(($ac_try" in
14172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14173 *) ac_try_echo=$ac_try;;
14174esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176 (eval "$ac_compile") 2>conftest.er1
14177 ac_status=$?
14178 grep -v '^ *+' conftest.er1 >conftest.err
14179 rm -f conftest.er1
14180 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 (exit $ac_status); } && {
14183 test -z "$ac_c_werror_flag" ||
14184 test ! -s conftest.err
14185 } && test -s conftest.$ac_objext; then
14186 ac_lo=$ac_mid; break
14187else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014188 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014189sed 's/^/| /' conftest.$ac_ext >&5
14190
14191 ac_hi=`expr '(' $ac_mid ')' - 1`
14192 if test $ac_mid -le $ac_hi; then
14193 ac_lo= ac_hi=
14194 break
14195 fi
14196 ac_mid=`expr 2 '*' $ac_mid`
14197fi
14198
14199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14200 done
14201else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014202 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014203sed 's/^/| /' conftest.$ac_ext >&5
14204
14205 ac_lo= ac_hi=
14206fi
14207
14208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209fi
14210
14211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14212# Binary search between lo and hi bounds.
14213while test "x$ac_lo" != "x$ac_hi"; do
14214 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14215 cat >conftest.$ac_ext <<_ACEOF
14216/* confdefs.h. */
14217_ACEOF
14218cat confdefs.h >>conftest.$ac_ext
14219cat >>conftest.$ac_ext <<_ACEOF
14220/* end confdefs.h. */
14221
14222#ifdef HAVE_PTHREAD_H
14223#include <pthread.h>
14224#endif
14225
14226
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014227 typedef pthread_t ac__type_sizeof_;
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014228int
14229main ()
14230{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232test_array [0] = 0
14233
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext
14239if { (ac_try="$ac_compile"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245 (eval "$ac_compile") 2>conftest.er1
14246 ac_status=$?
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest.$ac_objext; then
14255 ac_hi=$ac_mid
14256else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014257 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_lo=`expr '(' $ac_mid ')' + 1`
14261fi
14262
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264done
14265case $ac_lo in
14266?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14267'') if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014268 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014270echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014271See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014272 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273 else
14274 ac_cv_sizeof_pthread_t=0
14275 fi ;;
14276esac
14277else
14278 cat >conftest.$ac_ext <<_ACEOF
14279/* confdefs.h. */
14280_ACEOF
14281cat confdefs.h >>conftest.$ac_ext
14282cat >>conftest.$ac_ext <<_ACEOF
14283/* end confdefs.h. */
14284
14285#ifdef HAVE_PTHREAD_H
14286#include <pthread.h>
14287#endif
14288
14289
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014290 typedef pthread_t ac__type_sizeof_;
14291static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14292static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014293#include <stdio.h>
14294#include <stdlib.h>
14295int
14296main ()
14297{
14298
14299 FILE *f = fopen ("conftest.val", "w");
14300 if (! f)
14301 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014302 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014303 {
14304 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014305 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014306 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014307 fprintf (f, "%ld\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014308 }
14309 else
14310 {
14311 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014312 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014313 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014314 fprintf (f, "%lu\n", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014315 }
14316 return ferror (f) || fclose (f) != 0;
14317
14318 ;
14319 return 0;
14320}
Martin v. Löwis11437992002-04-12 09:54:03 +000014321_ACEOF
14322rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014323if { (ac_try="$ac_link"
14324case "(($ac_try" in
14325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14326 *) ac_try_echo=$ac_try;;
14327esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014330 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 { (case "(($ac_try" in
14334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14335 *) ac_try_echo=$ac_try;;
14336esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014338 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014341 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014342 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014344 echo "$as_me: program exited with status $ac_status" >&5
14345echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014346sed 's/^/| /' conftest.$ac_ext >&5
14347
Martin v. Löwis11437992002-04-12 09:54:03 +000014348( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014349if test "$ac_cv_type_pthread_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014350 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014352echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014354 { (exit 77); exit 77; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014355 else
14356 ac_cv_sizeof_pthread_t=0
14357 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359rm -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 +000014360fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014361rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014362fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014363{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14364echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014365
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014366
14367
Martin v. Löwis11437992002-04-12 09:54:03 +000014368cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014369#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014370_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014371
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014372
Trent Mick635f6fb2000-08-23 21:33:05 +000014373fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014374CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014375
Michael W. Hudson54241132001-12-07 15:38:26 +000014376
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014377case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014378 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014379 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14380 ;;
14381 Darwin/*)
14382 OTHER_LIBTOOL_OPT=""
14383 ;;
14384esac
14385
14386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014387ARCH_RUN_32BIT=""
14388
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014389case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014390 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014391 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14392 if test "${enable_universalsdk}"; then
14393 :
14394 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014395 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014396 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014397 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014398 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014399 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014400 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14401 if test ${gcc_version} '<' 4.0
14402 then
14403 LIBTOOL_CRUFT="-lcc_dynamic"
14404 else
14405 LIBTOOL_CRUFT=""
14406 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014407 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014408 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014409else
14410 cat >conftest.$ac_ext <<_ACEOF
14411/* confdefs.h. */
14412_ACEOF
14413cat confdefs.h >>conftest.$ac_ext
14414cat >>conftest.$ac_ext <<_ACEOF
14415/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014416
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014417 #include <unistd.h>
14418 int main(int argc, char*argv[])
14419 {
14420 if (sizeof(long) == 4) {
14421 return 0;
14422 } else {
14423 return 1;
14424 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014425 }
14426
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014427_ACEOF
14428rm -f conftest$ac_exeext
14429if { (ac_try="$ac_link"
14430case "(($ac_try" in
14431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14432 *) ac_try_echo=$ac_try;;
14433esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014435 (eval "$ac_link") 2>&5
14436 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014438 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14439 { (case "(($ac_try" in
14440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14441 *) ac_try_echo=$ac_try;;
14442esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014444 (eval "$ac_try") 2>&5
14445 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014447 (exit $ac_status); }; }; then
14448 ac_osx_32bit=yes
14449else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014450 echo "$as_me: program exited with status $ac_status" >&5
14451echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014452sed 's/^/| /' conftest.$ac_ext >&5
14453
14454( exit $ac_status )
14455ac_osx_32bit=no
14456fi
14457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14458fi
14459
14460
14461
14462 if test "${ac_osx_32bit}" = "yes"; then
14463 case `arch` in
14464 i386)
14465 MACOSX_DEFAULT_ARCH="i386"
14466 ;;
14467 ppc)
14468 MACOSX_DEFAULT_ARCH="ppc"
14469 ;;
14470 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014471 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14472echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014473 { (exit 1); exit 1; }; }
14474 ;;
14475 esac
14476 else
14477 case `arch` in
14478 i386)
14479 MACOSX_DEFAULT_ARCH="x86_64"
14480 ;;
14481 ppc)
14482 MACOSX_DEFAULT_ARCH="ppc64"
14483 ;;
14484 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014485 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14486echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014487 { (exit 1); exit 1; }; }
14488 ;;
14489 esac
14490
14491 #ARCH_RUN_32BIT="true"
14492 fi
14493
14494 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014495 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014496 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014497esac
14498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014499{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14500echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014501if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014502then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014503 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014505 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014506
Martin v. Löwis11437992002-04-12 09:54:03 +000014507cat >>confdefs.h <<\_ACEOF
14508#define WITH_NEXT_FRAMEWORK 1
14509_ACEOF
14510
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014511 { echo "$as_me:$LINENO: result: yes" >&5
14512echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014513 if test $enable_shared = "yes"
14514 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014515 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14516echo "$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 +000014517 { (exit 1); exit 1; }; }
14518 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014519else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520 { echo "$as_me:$LINENO: result: no" >&5
14521echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014522fi
14523
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014524{ echo "$as_me:$LINENO: checking for dyld" >&5
14525echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014526case $ac_sys_system/$ac_sys_release in
14527 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529cat >>confdefs.h <<\_ACEOF
14530#define WITH_DYLD 1
14531_ACEOF
14532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014533 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14534echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014535 ;;
14536 *)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014537 { echo "$as_me:$LINENO: result: no" >&5
14538echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014539 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014540esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014541
Guido van Rossum0a516c91994-09-12 10:58:40 +000014542# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014543
Michael W. Hudson54241132001-12-07 15:38:26 +000014544
14545
14546
14547
Guido van Rossum0a516c91994-09-12 10:58:40 +000014548# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014549# -- usually .so, .sl on HP-UX, .dll on Cygwin
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014550{ echo "$as_me:$LINENO: checking SO" >&5
14551echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014552if test -z "$SO"
14553then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014554 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014555 hp*|HP*)
14556 case `uname -m` in
14557 ia64) SO=.so;;
14558 *) SO=.sl;;
14559 esac
14560 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014561 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014562 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014563 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014564else
14565 # this might also be a termcap variable, see #610332
14566 echo
14567 echo '====================================================================='
14568 echo '+ +'
14569 echo '+ WARNING: You have set SO in your environment. +'
14570 echo '+ Do you really mean to change the extension for shared libraries? +'
14571 echo '+ Continuing in 10 seconds to let you to ponder. +'
14572 echo '+ +'
14573 echo '====================================================================='
14574 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014575fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014576{ echo "$as_me:$LINENO: result: $SO" >&5
14577echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014578
Georg Brandlb1441c72009-01-03 22:33:39 +000014579
Thomas Wouters477c8d52006-05-27 19:21:47 +000014580cat >>confdefs.h <<_ACEOF
14581#define SHLIB_EXT "$SO"
14582_ACEOF
14583
Guido van Rossum0a516c91994-09-12 10:58:40 +000014584# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014585# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014586# (Shared libraries in this instance are shared modules to be loaded into
14587# Python, as opposed to building Python itself as a shared library.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014588{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14589echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014590if test -z "$LDSHARED"
14591then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014592 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014593 AIX*)
14594 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014595 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014596 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014597 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014598 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014599 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014600 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014601 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014602 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014603 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014604 hp*|HP*)
14605 if test "$GCC" = "yes"
14606 then LDSHARED='$(CC) -shared'
14607 else LDSHARED='ld -b';
14608 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014609 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014610 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014611 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14612 if test "$enable_framework" ; then
14613 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014614 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14615 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014616 else
14617 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014618 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014619 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014620 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014621 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14622 if test "$enable_framework" ; then
14623 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014624 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14625 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014626 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014627 # No framework, use the Python app as bundle-loader
14628 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014629 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014630 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014631 Darwin/*)
14632 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14633 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014634
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014635 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014636 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014637 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014638 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014639 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014640 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14641 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014642 else
14643 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14644 if test "$enable_framework" ; then
14645 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014646 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14647 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014648 else
14649 # No framework, use the Python app as bundle-loader
14650 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14651 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14652 fi
14653 fi
14654 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014655 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014656 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014657 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014658 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014659 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014660 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014661 else
14662 LDSHARED="ld -Bshareable ${LDFLAGS}"
14663 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014664 OpenBSD*)
14665 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14666 then
14667 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14668 else
14669 case `uname -r` in
14670 [01].* | 2.[0-7] | 2.[0-7].*)
14671 LDSHARED="ld -Bshareable ${LDFLAGS}"
14672 ;;
14673 *)
14674 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14675 ;;
14676 esac
14677 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014678 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014679 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014680 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014681 then LDSHARED='$(CC) -shared'
14682 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014683 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014684 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014685 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014686 *) LDSHARED="ld";;
14687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014689{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14690echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014691BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014692# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014693# library (module) -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014694{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14695echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014696if test -z "$CCSHARED"
14697then
Guido van Rossum07397971997-04-29 21:49:50 +000014698 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014699 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014700 then CCSHARED="-fPIC";
14701 elif test `uname -p` = sparc;
14702 then CCSHARED="-xcode=pic32";
14703 else CCSHARED="-Kpic";
14704 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014705 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014706 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014707 else CCSHARED="+z";
14708 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014709 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014710 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014711 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014712 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014713 if test "$GCC" = "yes"
14714 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014715 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014716 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014717 SCO_SV*)
14718 if test "$GCC" = "yes"
14719 then CCSHARED="-fPIC"
14720 else CCSHARED="-Kpic -belf"
14721 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014722 IRIX*/6*) case $CC in
14723 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014724 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014725 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014726 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014727fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014728{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14729echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014730# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014731# the python executable -- this is only needed for a few systems
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014732{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14733echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014734if test -z "$LINKFORSHARED"
14735then
Guido van Rossum07397971997-04-29 21:49:50 +000014736 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014737 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014738 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014739 LINKFORSHARED="-Wl,-E -Wl,+s";;
14740# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014741 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014742 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014743 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014744 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014745 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014746 if test "$enable_framework"
14747 then
Jack Jansenda49e192005-01-07 13:08:22 +000014748 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014749 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014750 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014751 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014752 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014753 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014754 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014755 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14756 then
14757 LINKFORSHARED="-Wl,--export-dynamic"
14758 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014759 SunOS/5*) case $CC in
14760 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014761 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014762 then
14763 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014764 fi;;
14765 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014766 CYGWIN*)
14767 if test $enable_shared = "no"
14768 then
14769 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14770 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014771 QNX*)
14772 # -Wl,-E causes the symbols to be added to the dynamic
14773 # symbol table so that they can be found when a module
14774 # is loaded. -N 2048K causes the stack size to be set
14775 # to 2048 kilobytes so that the stack doesn't overflow
14776 # when running test_compile.py.
14777 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014778 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014779fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014780{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14781echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014782
Michael W. Hudson54241132001-12-07 15:38:26 +000014783
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014784
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014785{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14786echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014787if test ! "$LIBRARY" = "$LDLIBRARY"
14788then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014789 case $ac_sys_system in
14790 CYGWIN*)
14791 # Cygwin needs CCSHARED when building extension DLLs
14792 # but not when building the interpreter DLL.
14793 CFLAGSFORSHARED='';;
14794 *)
14795 CFLAGSFORSHARED='$(CCSHARED)'
14796 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014797fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014798{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14799echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014800
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014801# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14802# library (with --enable-shared).
14803# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014804# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14805# if it is not required, since it creates a dependency of the shared library
14806# to LIBS. This, in turn, means that applications linking the shared libpython
14807# don't need to link LIBS explicitly. The default should be only changed
14808# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014809
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014810{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14811echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014812case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014813 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014814 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014815esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014816{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14817echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014818
14819
Guido van Rossum627b2d71993-12-24 10:39:16 +000014820# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014821
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014822{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14823echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014824if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014825 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014828LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014830/* confdefs.h. */
14831_ACEOF
14832cat confdefs.h >>conftest.$ac_ext
14833cat >>conftest.$ac_ext <<_ACEOF
14834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836/* Override any GCC internal prototype to avoid an error.
14837 Use char because int might match the return type of a GCC
14838 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014839#ifdef __cplusplus
14840extern "C"
14841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014842char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014843int
14844main ()
14845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014846return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ;
14848 return 0;
14849}
14850_ACEOF
14851rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852if { (ac_try="$ac_link"
14853case "(($ac_try" in
14854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14855 *) ac_try_echo=$ac_try;;
14856esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014860 grep -v '^ *+' conftest.er1 >conftest.err
14861 rm -f conftest.er1
14862 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 (exit $ac_status); } && {
14865 test -z "$ac_c_werror_flag" ||
14866 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014867 } && test -s conftest$ac_exeext &&
14868 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014870else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014876
14877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014879LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014880fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014881{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14882echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14883if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014884 cat >>confdefs.h <<_ACEOF
14885#define HAVE_LIBDL 1
14886_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014887
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014888 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014889
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014890fi
14891 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014892
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014893{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14894echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014895if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014896 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014897else
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014899LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014900cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014901/* confdefs.h. */
14902_ACEOF
14903cat confdefs.h >>conftest.$ac_ext
14904cat >>conftest.$ac_ext <<_ACEOF
14905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014907/* Override any GCC internal prototype to avoid an error.
14908 Use char because int might match the return type of a GCC
14909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014910#ifdef __cplusplus
14911extern "C"
14912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014913char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 ;
14919 return 0;
14920}
14921_ACEOF
14922rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923if { (ac_try="$ac_link"
14924case "(($ac_try" in
14925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14926 *) ac_try_echo=$ac_try;;
14927esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014931 grep -v '^ *+' conftest.er1 >conftest.err
14932 rm -f conftest.er1
14933 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 (exit $ac_status); } && {
14936 test -z "$ac_c_werror_flag" ||
14937 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014938 } && test -s conftest$ac_exeext &&
14939 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014941else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014943sed 's/^/| /' conftest.$ac_ext >&5
14944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947
14948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014950LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014951fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014952{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14953echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14954if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 cat >>confdefs.h <<_ACEOF
14956#define HAVE_LIBDLD 1
14957_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014958
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014959 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014960
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014961fi
14962 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014963
Georg Brandlb1441c72009-01-03 22:33:39 +000014964# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014965if test "$with_threads" = "yes" -o -z "$with_threads"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014966 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14967echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014968if test "${ac_cv_search_sem_init+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014969 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014970else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014971 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014973/* confdefs.h. */
14974_ACEOF
14975cat confdefs.h >>conftest.$ac_ext
14976cat >>conftest.$ac_ext <<_ACEOF
14977/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979/* Override any GCC internal prototype to avoid an error.
14980 Use char because int might match the return type of a GCC
14981 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014982#ifdef __cplusplus
14983extern "C"
14984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014985char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014986int
14987main ()
14988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014989return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014990 ;
14991 return 0;
14992}
14993_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994for ac_lib in '' pthread rt posix4; do
14995 if test -z "$ac_lib"; then
14996 ac_res="none required"
14997 else
14998 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014999 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000 fi
15001 rm -f conftest.$ac_objext conftest$ac_exeext
15002if { (ac_try="$ac_link"
15003case "(($ac_try" in
15004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15005 *) ac_try_echo=$ac_try;;
15006esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015009 ac_status=$?
15010 grep -v '^ *+' conftest.er1 >conftest.err
15011 rm -f conftest.er1
15012 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014 (exit $ac_status); } && {
15015 test -z "$ac_c_werror_flag" ||
15016 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015017 } && test -s conftest$ac_exeext &&
15018 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015020else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015021 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015022sed 's/^/| /' conftest.$ac_ext >&5
15023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024
Thomas Wouters477c8d52006-05-27 19:21:47 +000015025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026
15027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15028 conftest$ac_exeext
15029 if test "${ac_cv_search_sem_init+set}" = set; then
15030 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032done
15033if test "${ac_cv_search_sem_init+set}" = set; then
15034 :
15035else
15036 ac_cv_search_sem_init=no
15037fi
15038rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015039LIBS=$ac_func_search_save_LIBS
15040fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015041{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15042echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043ac_res=$ac_cv_search_sem_init
15044if test "$ac_res" != no; then
15045 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015046
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015047fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015048 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015049 # posix4 on Solaris 2.6
15050 # pthread (first!) on Linux
15051fi
15052
Martin v. Löwis19d17342003-06-14 21:03:05 +000015053# check if we need libintl for locale functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015054{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15055echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015056if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015058else
15059 ac_check_lib_save_LIBS=$LIBS
15060LIBS="-lintl $LIBS"
15061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* confdefs.h. */
15063_ACEOF
15064cat confdefs.h >>conftest.$ac_ext
15065cat >>conftest.$ac_ext <<_ACEOF
15066/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068/* Override any GCC internal prototype to avoid an error.
15069 Use char because int might match the return type of a GCC
15070 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071#ifdef __cplusplus
15072extern "C"
15073#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015074char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075int
15076main ()
15077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015079 ;
15080 return 0;
15081}
15082_ACEOF
15083rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084if { (ac_try="$ac_link"
15085case "(($ac_try" in
15086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15087 *) ac_try_echo=$ac_try;;
15088esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015092 grep -v '^ *+' conftest.er1 >conftest.err
15093 rm -f conftest.er1
15094 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096 (exit $ac_status); } && {
15097 test -z "$ac_c_werror_flag" ||
15098 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015099 } && test -s conftest$ac_exeext &&
15100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015101 ac_cv_lib_intl_textdomain=yes
15102else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108
15109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015111LIBS=$ac_check_lib_save_LIBS
15112fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015113{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15114echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15115if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015116
15117cat >>confdefs.h <<\_ACEOF
15118#define WITH_LIBINTL 1
15119_ACEOF
15120
Brett Cannonc6d936e2009-06-07 20:09:53 +000015121 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015122fi
15123
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015124
15125# checks for system dependent C++ extensions support
15126case "$ac_sys_system" in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015127 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15128echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* confdefs.h. */
15131_ACEOF
15132cat confdefs.h >>conftest.$ac_ext
15133cat >>conftest.$ac_ext <<_ACEOF
15134/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015135#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015136int
15137main ()
15138{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015139loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015140 ;
15141 return 0;
15142}
15143_ACEOF
15144rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145if { (ac_try="$ac_link"
15146case "(($ac_try" in
15147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15148 *) ac_try_echo=$ac_try;;
15149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015153 grep -v '^ *+' conftest.er1 >conftest.err
15154 rm -f conftest.er1
15155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157 (exit $ac_status); } && {
15158 test -z "$ac_c_werror_flag" ||
15159 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015160 } && test -s conftest$ac_exeext &&
15161 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015162
Martin v. Löwis11437992002-04-12 09:54:03 +000015163cat >>confdefs.h <<\_ACEOF
15164#define AIX_GENUINE_CPLUSPLUS 1
15165_ACEOF
15166
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015167 { echo "$as_me:$LINENO: result: yes" >&5
15168echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015169else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015171sed 's/^/| /' conftest.$ac_ext >&5
15172
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015173 { echo "$as_me:$LINENO: result: no" >&5
15174echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176
15177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015178 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015179 *) ;;
15180esac
15181
Guido van Rossum70c7f481998-03-26 18:44:10 +000015182# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015183{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15184echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015185if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015186 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015187else
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015189LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015191/* confdefs.h. */
15192_ACEOF
15193cat confdefs.h >>conftest.$ac_ext
15194cat >>conftest.$ac_ext <<_ACEOF
15195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197/* Override any GCC internal prototype to avoid an error.
15198 Use char because int might match the return type of a GCC
15199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015200#ifdef __cplusplus
15201extern "C"
15202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015203char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015204int
15205main ()
15206{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 ;
15209 return 0;
15210}
15211_ACEOF
15212rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213if { (ac_try="$ac_link"
15214case "(($ac_try" in
15215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15216 *) ac_try_echo=$ac_try;;
15217esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015221 grep -v '^ *+' conftest.er1 >conftest.err
15222 rm -f conftest.er1
15223 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225 (exit $ac_status); } && {
15226 test -z "$ac_c_werror_flag" ||
15227 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015228 } && test -s conftest$ac_exeext &&
15229 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015231else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015233sed 's/^/| /' conftest.$ac_ext >&5
15234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015237
15238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015241fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015242{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15243echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15244if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015245 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015246fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015247 # SVR4
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015248{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15249echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015250if test "${ac_cv_lib_socket_socket+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015251 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015252else
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015254LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015255cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* confdefs.h. */
15257_ACEOF
15258cat confdefs.h >>conftest.$ac_ext
15259cat >>conftest.$ac_ext <<_ACEOF
15260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015262/* Override any GCC internal prototype to avoid an error.
15263 Use char because int might match the return type of a GCC
15264 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015265#ifdef __cplusplus
15266extern "C"
15267#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015268char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015269int
15270main ()
15271{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 ;
15274 return 0;
15275}
15276_ACEOF
15277rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278if { (ac_try="$ac_link"
15279case "(($ac_try" in
15280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15281 *) ac_try_echo=$ac_try;;
15282esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015283eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015286 grep -v '^ *+' conftest.er1 >conftest.err
15287 rm -f conftest.er1
15288 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 (exit $ac_status); } && {
15291 test -z "$ac_c_werror_flag" ||
15292 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015293 } && test -s conftest$ac_exeext &&
15294 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015295 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015296else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015297 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015298sed 's/^/| /' conftest.$ac_ext >&5
15299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302
15303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015305LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015306fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015307{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15308echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15309if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015310 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015311fi
15312 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015313
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015314{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15315echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015318if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319 withval=$with_libs;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015320{ echo "$as_me:$LINENO: result: $withval" >&5
15321echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015322LIBS="$withval $LIBS"
15323
15324else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015325 { echo "$as_me:$LINENO: result: no" >&5
15326echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327fi
15328
Guido van Rossum7f43da71994-08-01 12:15:30 +000015329
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015330# Check for use of the system expat library
15331{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15332echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15333
15334# Check whether --with-system_expat was given.
15335if test "${with_system_expat+set}" = set; then
15336 withval=$with_system_expat;
15337fi
15338
15339
15340{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15341echo "${ECHO_T}$with_system_expat" >&6; }
15342
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015343# Check for use of the system libffi library
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015344{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15345echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015348if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349 withval=$with_system_ffi;
15350fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015352
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015353{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15354echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015355
Matthias Klose55708cc2009-04-30 08:06:49 +000015356# Check for --with-dbmliborder
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015357{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15358echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015359
15360# Check whether --with-dbmliborder was given.
15361if test "${with_dbmliborder+set}" = set; then
15362 withval=$with_dbmliborder;
15363if test x$with_dbmliborder = xyes
15364then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015365{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15366echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015367 { (exit 1); exit 1; }; }
15368else
15369 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15370 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15371 then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015372 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15373echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015374 { (exit 1); exit 1; }; }
15375 fi
15376 done
15377fi
15378fi
15379
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015380{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15381echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015382
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015383# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015384
15385
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015386{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15387echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015390if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015391 withval=$with_signal_module;
15392fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015393
15394
15395if test -z "$with_signal_module"
15396then with_signal_module="yes"
15397fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015398{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15399echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015400
15401if test "${with_signal_module}" = "yes"; then
15402 USE_SIGNAL_MODULE=""
15403 SIGNAL_OBJS=""
15404else
15405 USE_SIGNAL_MODULE="#"
15406 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15407fi
15408
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015409# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015410
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015411USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015412
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015413{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15414echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015415
Guido van Rossumec2f0731997-01-22 20:54:01 +000015416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015418if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015419 withval=$with_dec_threads;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015420{ echo "$as_me:$LINENO: result: $withval" >&5
15421echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015422LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015423if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015424 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015425fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015426else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015427 { echo "$as_me:$LINENO: result: no" >&5
15428echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429fi
15430
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432# Templates for things AC_DEFINEd more than once.
15433# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015434
15435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436
15437
15438
15439
15440
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015441{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15442echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015445if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446 withval=$with_threads;
15447fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015448
15449
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015450# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015453if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454 withval=$with_thread; with_threads=$with_thread
15455fi
15456
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015457
15458if test -z "$with_threads"
15459then with_threads="yes"
15460fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015461{ echo "$as_me:$LINENO: result: $with_threads" >&5
15462echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015463
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015464
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015465if test "$with_threads" = "no"
15466then
15467 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015468elif test "$ac_cv_pthread_is_default" = yes
15469then
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015471#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015472_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015473
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015474 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015476#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015477_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015478
15479 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015481elif test "$ac_cv_kpthread" = "yes"
15482then
15483 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015484 if test "$ac_cv_cxx_thread" = "yes"; then
15485 CXX="$CXX -Kpthread"
15486 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015488#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015489_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015491 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015492 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015493elif test "$ac_cv_kthread" = "yes"
15494then
15495 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015496 if test "$ac_cv_cxx_thread" = "yes"; then
15497 CXX="$CXX -Kthread"
15498 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015499 cat >>confdefs.h <<\_ACEOF
15500#define WITH_THREAD 1
15501_ACEOF
15502
15503 posix_threads=yes
15504 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015505elif test "$ac_cv_pthread" = "yes"
15506then
15507 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015508 if test "$ac_cv_cxx_thread" = "yes"; then
15509 CXX="$CXX -pthread"
15510 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015511 cat >>confdefs.h <<\_ACEOF
15512#define WITH_THREAD 1
15513_ACEOF
15514
15515 posix_threads=yes
15516 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015517else
15518 if test ! -z "$with_threads" -a -d "$with_threads"
15519 then LDFLAGS="$LDFLAGS -L$with_threads"
15520 fi
15521 if test ! -z "$withval" -a -d "$withval"
15522 then LDFLAGS="$LDFLAGS -L$withval"
15523 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015524
15525 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015526 # define _POSIX_THREADS in unistd.h. Some apparently don't
15527 # (e.g. gnu pth with pthread emulation)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015528 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15529echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015531/* confdefs.h. */
15532_ACEOF
15533cat confdefs.h >>conftest.$ac_ext
15534cat >>conftest.$ac_ext <<_ACEOF
15535/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015536
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015537#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015538#ifdef _POSIX_THREADS
15539yes
15540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015541
15542_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015544 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015545 unistd_defines_pthreads=yes
15546else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015547 unistd_defines_pthreads=no
15548fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000015549rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015550
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015551 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15552echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015555#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015556_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015559 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15560echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015561if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015563fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015564{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15565echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015566else
Martin v. Löwis11437992002-04-12 09:54:03 +000015567 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015568{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15569echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015571/* confdefs.h. */
15572_ACEOF
15573cat confdefs.h >>conftest.$ac_ext
15574cat >>conftest.$ac_ext <<_ACEOF
15575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015576$ac_includes_default
15577#include <cthreads.h>
15578_ACEOF
15579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580if { (ac_try="$ac_compile"
15581case "(($ac_try" in
15582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15583 *) ac_try_echo=$ac_try;;
15584esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015588 grep -v '^ *+' conftest.er1 >conftest.err
15589 rm -f conftest.er1
15590 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592 (exit $ac_status); } && {
15593 test -z "$ac_c_werror_flag" ||
15594 test ! -s conftest.err
15595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 ac_header_compiler=yes
15597else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015599sed 's/^/| /' conftest.$ac_ext >&5
15600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015601 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015603
15604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015605{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15606echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015609{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15610echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015612/* confdefs.h. */
15613_ACEOF
15614cat confdefs.h >>conftest.$ac_ext
15615cat >>conftest.$ac_ext <<_ACEOF
15616/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015617#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015618_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619if { (ac_try="$ac_cpp conftest.$ac_ext"
15620case "(($ac_try" in
15621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15622 *) ac_try_echo=$ac_try;;
15623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015626 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015627 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 rm -f conftest.er1
15629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631 (exit $ac_status); } >/dev/null && {
15632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15633 test ! -s conftest.err
15634 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 ac_header_preproc=yes
15636else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015638sed 's/^/| /' conftest.$ac_ext >&5
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642
Martin v. Löwis11437992002-04-12 09:54:03 +000015643rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015644{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15645echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
15647# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015648case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15649 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015650 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15651echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15652 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15653echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015654 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015655 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015656 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015657 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15658echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15659 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15660echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15661 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15662echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15663 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15664echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15665 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15666echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15667 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15668echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015670## -------------------------------------- ##
15671## Report this to http://bugs.python.org/ ##
15672## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015673_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015674 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015675 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015676esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015677{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15678echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015679if test "${ac_cv_header_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015680 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015681else
15682 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015683fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015684{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15685echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
15687fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015688if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015690#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015691_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015692
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015694#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015695_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015699#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015700_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015701
15702 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015703 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015704else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015705
Martin v. Löwis11437992002-04-12 09:54:03 +000015706 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015707 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15708echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015709if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015710 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015711fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015712{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15713echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015714else
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015716{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15717echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015718cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015719/* confdefs.h. */
15720_ACEOF
15721cat confdefs.h >>conftest.$ac_ext
15722cat >>conftest.$ac_ext <<_ACEOF
15723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015724$ac_includes_default
15725#include <mach/cthreads.h>
15726_ACEOF
15727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728if { (ac_try="$ac_compile"
15729case "(($ac_try" in
15730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15731 *) ac_try_echo=$ac_try;;
15732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015736 grep -v '^ *+' conftest.er1 >conftest.err
15737 rm -f conftest.er1
15738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015740 (exit $ac_status); } && {
15741 test -z "$ac_c_werror_flag" ||
15742 test ! -s conftest.err
15743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 ac_header_compiler=yes
15745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015747sed 's/^/| /' conftest.$ac_ext >&5
15748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751
15752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015753{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15754echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
15756# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015757{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15758echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015760/* confdefs.h. */
15761_ACEOF
15762cat confdefs.h >>conftest.$ac_ext
15763cat >>conftest.$ac_ext <<_ACEOF
15764/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015765#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015766_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767if { (ac_try="$ac_cpp conftest.$ac_ext"
15768case "(($ac_try" in
15769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15770 *) ac_try_echo=$ac_try;;
15771esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015775 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 rm -f conftest.er1
15777 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 (exit $ac_status); } >/dev/null && {
15780 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15781 test ! -s conftest.err
15782 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 ac_header_preproc=yes
15784else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015786sed 's/^/| /' conftest.$ac_ext >&5
15787
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790
Martin v. Löwis11437992002-04-12 09:54:03 +000015791rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015792{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15793echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
15795# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015796case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15797 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015798 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15799echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15800 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15801echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015802 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015803 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015804 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015805 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15806echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15807 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15808echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15809 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15810echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15811 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15812echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15813 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15814echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15815 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15816echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015818## -------------------------------------- ##
15819## Report this to http://bugs.python.org/ ##
15820## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015821_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015823 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015824esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015825{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15826echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015827if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015828 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015829else
15830 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015831fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015832{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15833echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
15835fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015836if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015837 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015838#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015839_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015840
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015842#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
15846cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015847#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015848_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015849
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015850 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015851else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015852
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015853 # Just looking for pthread_create in libpthread is not enough:
15854 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15855 # So we really have to include pthread.h, and then link.
15856 _libs=$LIBS
15857 LIBS="$LIBS -lpthread"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015858 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15859echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015861/* confdefs.h. */
15862_ACEOF
15863cat confdefs.h >>conftest.$ac_ext
15864cat >>conftest.$ac_ext <<_ACEOF
15865/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015866#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015867
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015868void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015869int
15870main ()
15871{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015872
15873pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 ;
15875 return 0;
15876}
15877_ACEOF
15878rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879if { (ac_try="$ac_link"
15880case "(($ac_try" in
15881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15882 *) ac_try_echo=$ac_try;;
15883esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015887 grep -v '^ *+' conftest.er1 >conftest.err
15888 rm -f conftest.er1
15889 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891 (exit $ac_status); } && {
15892 test -z "$ac_c_werror_flag" ||
15893 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015894 } && test -s conftest$ac_exeext &&
15895 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015897 { echo "$as_me:$LINENO: result: yes" >&5
15898echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015900#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015901_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015902
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015903 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015904 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015905else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015906 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015907sed 's/^/| /' conftest.$ac_ext >&5
15908
Martin v. Löwis11437992002-04-12 09:54:03 +000015909
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015910 LIBS=$_libs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015911 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15912echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015913if test "${ac_cv_func_pthread_detach+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015915else
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015917/* confdefs.h. */
15918_ACEOF
15919cat confdefs.h >>conftest.$ac_ext
15920cat >>conftest.$ac_ext <<_ACEOF
15921/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015922/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15923 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15924#define pthread_detach innocuous_pthread_detach
15925
Guido van Rossumad678af1998-10-02 14:42:15 +000015926/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015927 which can conflict with char pthread_detach (); below.
15928 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015929 <limits.h> exists even on freestanding compilers. */
15930
15931#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015932# include <limits.h>
15933#else
15934# include <assert.h>
15935#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015936
15937#undef pthread_detach
15938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939/* Override any GCC internal prototype to avoid an error.
15940 Use char because int might match the return type of a GCC
15941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015942#ifdef __cplusplus
15943extern "C"
15944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015945char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015946/* The GNU C library defines this for functions which it implements
15947 to always fail with ENOSYS. Some functions are actually named
15948 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015949#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015950choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015951#endif
15952
Skip Montanaro6dead952003-09-25 14:50:04 +000015953int
15954main ()
15955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 ;
15958 return 0;
15959}
15960_ACEOF
15961rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962if { (ac_try="$ac_link"
15963case "(($ac_try" in
15964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15965 *) ac_try_echo=$ac_try;;
15966esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015970 grep -v '^ *+' conftest.er1 >conftest.err
15971 rm -f conftest.er1
15972 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974 (exit $ac_status); } && {
15975 test -z "$ac_c_werror_flag" ||
15976 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015977 } && test -s conftest$ac_exeext &&
15978 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015980else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015982sed 's/^/| /' conftest.$ac_ext >&5
15983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986
15987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015988 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015989fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015990{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15991echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15992if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015994#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015995_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015996
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015997 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015998 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015999else
Guido van Rossumad678af1998-10-02 14:42:15 +000016000
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016001 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16002echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016003if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016004 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016005else
Martin v. Löwis11437992002-04-12 09:54:03 +000016006 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016007LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016009/* confdefs.h. */
16010_ACEOF
16011cat confdefs.h >>conftest.$ac_ext
16012cat >>conftest.$ac_ext <<_ACEOF
16013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016015/* Override any GCC internal prototype to avoid an error.
16016 Use char because int might match the return type of a GCC
16017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016018#ifdef __cplusplus
16019extern "C"
16020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016021char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016022int
16023main ()
16024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 ;
16027 return 0;
16028}
16029_ACEOF
16030rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031if { (ac_try="$ac_link"
16032case "(($ac_try" in
16033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16034 *) ac_try_echo=$ac_try;;
16035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016039 grep -v '^ *+' conftest.er1 >conftest.err
16040 rm -f conftest.er1
16041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043 (exit $ac_status); } && {
16044 test -z "$ac_c_werror_flag" ||
16045 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016046 } && test -s conftest$ac_exeext &&
16047 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016049else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016050 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016051sed 's/^/| /' conftest.$ac_ext >&5
16052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055
16056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016058LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016059fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016060{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16061echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16062if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016064#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016065_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016067 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016068 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016069 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016070else
Greg Steinadf63d62000-07-05 10:38:09 +000016071
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016072 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16073echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016075 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016076else
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016078LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016080/* confdefs.h. */
16081_ACEOF
16082cat confdefs.h >>conftest.$ac_ext
16083cat >>conftest.$ac_ext <<_ACEOF
16084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086/* Override any GCC internal prototype to avoid an error.
16087 Use char because int might match the return type of a GCC
16088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016089#ifdef __cplusplus
16090extern "C"
16091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016092char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016093int
16094main ()
16095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 ;
16098 return 0;
16099}
16100_ACEOF
16101rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016102if { (ac_try="$ac_link"
16103case "(($ac_try" in
16104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16105 *) ac_try_echo=$ac_try;;
16106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016110 grep -v '^ *+' conftest.er1 >conftest.err
16111 rm -f conftest.er1
16112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114 (exit $ac_status); } && {
16115 test -z "$ac_c_werror_flag" ||
16116 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016117 } && test -s conftest$ac_exeext &&
16118 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016119 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016120else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016122sed 's/^/| /' conftest.$ac_ext >&5
16123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126
16127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016129LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016130fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016131{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16132echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16133if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016135#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016136_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016137
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016138 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016139 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016140 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016141else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016142
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016143 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16144echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016145if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016149LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016150cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016151/* confdefs.h. */
16152_ACEOF
16153cat confdefs.h >>conftest.$ac_ext
16154cat >>conftest.$ac_ext <<_ACEOF
16155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157/* Override any GCC internal prototype to avoid an error.
16158 Use char because int might match the return type of a GCC
16159 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016160#ifdef __cplusplus
16161extern "C"
16162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016163char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016164int
16165main ()
16166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016168 ;
16169 return 0;
16170}
16171_ACEOF
16172rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173if { (ac_try="$ac_link"
16174case "(($ac_try" in
16175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16176 *) ac_try_echo=$ac_try;;
16177esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016181 grep -v '^ *+' conftest.er1 >conftest.err
16182 rm -f conftest.er1
16183 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185 (exit $ac_status); } && {
16186 test -z "$ac_c_werror_flag" ||
16187 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016188 } && test -s conftest$ac_exeext &&
16189 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016191else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016193sed 's/^/| /' conftest.$ac_ext >&5
16194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197
16198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016200LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016201fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016202{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16203echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16204if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016206#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016207_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016208
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016209 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016210 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016211 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016212else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016213
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016214 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16215echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016216if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016218else
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016220LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016222/* confdefs.h. */
16223_ACEOF
16224cat confdefs.h >>conftest.$ac_ext
16225cat >>conftest.$ac_ext <<_ACEOF
16226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228/* Override any GCC internal prototype to avoid an error.
16229 Use char because int might match the return type of a GCC
16230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016231#ifdef __cplusplus
16232extern "C"
16233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016234char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016235int
16236main ()
16237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 ;
16240 return 0;
16241}
16242_ACEOF
16243rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244if { (ac_try="$ac_link"
16245case "(($ac_try" in
16246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16247 *) ac_try_echo=$ac_try;;
16248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016252 grep -v '^ *+' conftest.er1 >conftest.err
16253 rm -f conftest.er1
16254 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 (exit $ac_status); } && {
16257 test -z "$ac_c_werror_flag" ||
16258 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016259 } && test -s conftest$ac_exeext &&
16260 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016262else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016264sed 's/^/| /' conftest.$ac_ext >&5
16265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268
16269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016271LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016272fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016273{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16274echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16275if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016277#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016278_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016279
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016280 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016281 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016282 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016283else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016284
Martin v. Löwis130fb172001-07-19 11:00:41 +000016285 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016286fi
16287
Guido van Rossum627b2d71993-12-24 10:39:16 +000016288
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016289fi
16290
Guido van Rossum0be3e491997-05-22 20:33:33 +000016291fi
16292
Guido van Rossum49545951997-12-02 19:28:29 +000016293fi
16294
Guido van Rossumb93a8621998-05-07 13:27:32 +000016295fi
16296
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298
16299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016300 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301fi
16302
Martin v. Löwis11437992002-04-12 09:54:03 +000016303
16304fi
16305
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016306
Michael W. Hudson54241132001-12-07 15:38:26 +000016307
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016308 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16309echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016310if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016311 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016312else
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016314LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016315cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016316/* confdefs.h. */
16317_ACEOF
16318cat confdefs.h >>conftest.$ac_ext
16319cat >>conftest.$ac_ext <<_ACEOF
16320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322/* Override any GCC internal prototype to avoid an error.
16323 Use char because int might match the return type of a GCC
16324 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016325#ifdef __cplusplus
16326extern "C"
16327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016328char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016329int
16330main ()
16331{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016332return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016333 ;
16334 return 0;
16335}
16336_ACEOF
16337rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338if { (ac_try="$ac_link"
16339case "(($ac_try" in
16340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16341 *) ac_try_echo=$ac_try;;
16342esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016346 grep -v '^ *+' conftest.er1 >conftest.err
16347 rm -f conftest.er1
16348 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350 (exit $ac_status); } && {
16351 test -z "$ac_c_werror_flag" ||
16352 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016353 } && test -s conftest$ac_exeext &&
16354 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016356else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016358sed 's/^/| /' conftest.$ac_ext >&5
16359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362
16363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016365LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016366fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016367{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16368echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16369if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016371#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016372_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016373
Martin v. Löwis130fb172001-07-19 11:00:41 +000016374 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016375 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016376 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016377fi
16378
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016379
Neal Norwitza978ab02002-11-02 16:58:05 +000016380 if test "$posix_threads" != "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016381 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16382echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016383if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016384 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016385else
Martin v. Löwis11437992002-04-12 09:54:03 +000016386 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016387LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016389/* confdefs.h. */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395/* Override any GCC internal prototype to avoid an error.
16396 Use char because int might match the return type of a GCC
16397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016398#ifdef __cplusplus
16399extern "C"
16400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016401char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016402int
16403main ()
16404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 ;
16407 return 0;
16408}
16409_ACEOF
16410rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016411if { (ac_try="$ac_link"
16412case "(($ac_try" in
16413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16414 *) ac_try_echo=$ac_try;;
16415esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016419 grep -v '^ *+' conftest.er1 >conftest.err
16420 rm -f conftest.er1
16421 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423 (exit $ac_status); } && {
16424 test -z "$ac_c_werror_flag" ||
16425 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016426 } && test -s conftest$ac_exeext &&
16427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016429else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016430 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016431sed 's/^/| /' conftest.$ac_ext >&5
16432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435
16436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016438LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016440{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16441echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16442if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016443 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016444#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016445_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016446
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016447 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016448 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016449 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016450fi
16451
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016452 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016453
Martin v. Löwis130fb172001-07-19 11:00:41 +000016454 if test "$USE_THREAD_MODULE" != "#"
16455 then
16456 # If the above checks didn't disable threads, (at least) OSF1
16457 # needs this '-threads' argument during linking.
16458 case $ac_sys_system in
16459 OSF1) LDLAST=-threads;;
16460 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016461 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016462fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016463
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016464if test "$posix_threads" = "yes"; then
16465 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016466
16467cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016468#define _POSIX_THREADS 1
16469_ACEOF
16470
16471 fi
16472
16473 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16474 case $ac_sys_system/$ac_sys_release in
16475 SunOS/5.6)
16476cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016477#define HAVE_PTHREAD_DESTRUCTOR 1
16478_ACEOF
16479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016480 ;;
16481 SunOS/5.8)
16482cat >>confdefs.h <<\_ACEOF
16483#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16484_ACEOF
16485
16486 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016487 AIX/5)
16488cat >>confdefs.h <<\_ACEOF
16489#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16490_ACEOF
16491
16492 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016493 esac
16494
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016495 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16496echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016497 if test "${ac_cv_pthread_system_supported+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016498 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016499else
16500 if test "$cross_compiling" = yes; then
16501 ac_cv_pthread_system_supported=no
16502else
16503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016504/* confdefs.h. */
16505_ACEOF
16506cat confdefs.h >>conftest.$ac_ext
16507cat >>conftest.$ac_ext <<_ACEOF
16508/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016509#include <pthread.h>
16510 void *foo(void *parm) {
16511 return NULL;
16512 }
16513 main() {
16514 pthread_attr_t attr;
16515 pthread_t id;
16516 if (pthread_attr_init(&attr)) exit(-1);
16517 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16518 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16519 exit(0);
16520 }
16521_ACEOF
16522rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523if { (ac_try="$ac_link"
16524case "(($ac_try" in
16525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16526 *) ac_try_echo=$ac_try;;
16527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016530 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016532 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 { (case "(($ac_try" in
16534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16535 *) ac_try_echo=$ac_try;;
16536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016539 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016541 (exit $ac_status); }; }; then
16542 ac_cv_pthread_system_supported=yes
16543else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016544 echo "$as_me: program exited with status $ac_status" >&5
16545echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016546sed 's/^/| /' conftest.$ac_ext >&5
16547
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016548( exit $ac_status )
16549ac_cv_pthread_system_supported=no
16550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016551rm -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 +000016552fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554
16555
Guido van Rossum627b2d71993-12-24 10:39:16 +000016556fi
16557
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016558 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16559echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016560 if test "$ac_cv_pthread_system_supported" = "yes"; then
16561
16562cat >>confdefs.h <<\_ACEOF
16563#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16564_ACEOF
16565
16566 fi
16567
16568for ac_func in pthread_sigmask
16569do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016570as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16571{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16572echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016575else
16576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016577/* confdefs.h. */
16578_ACEOF
16579cat confdefs.h >>conftest.$ac_ext
16580cat >>conftest.$ac_ext <<_ACEOF
16581/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016582/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16583 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16584#define $ac_func innocuous_$ac_func
16585
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016586/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016587 which can conflict with char $ac_func (); below.
16588 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016589 <limits.h> exists even on freestanding compilers. */
16590
16591#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016592# include <limits.h>
16593#else
16594# include <assert.h>
16595#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016596
16597#undef $ac_func
16598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599/* Override any GCC internal prototype to avoid an error.
16600 Use char because int might match the return type of a GCC
16601 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016602#ifdef __cplusplus
16603extern "C"
16604#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016605char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016606/* The GNU C library defines this for functions which it implements
16607 to always fail with ENOSYS. Some functions are actually named
16608 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016610choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016611#endif
16612
Skip Montanaro6dead952003-09-25 14:50:04 +000016613int
16614main ()
16615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016617 ;
16618 return 0;
16619}
16620_ACEOF
16621rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622if { (ac_try="$ac_link"
16623case "(($ac_try" in
16624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16625 *) ac_try_echo=$ac_try;;
16626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016630 grep -v '^ *+' conftest.er1 >conftest.err
16631 rm -f conftest.er1
16632 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016634 (exit $ac_status); } && {
16635 test -z "$ac_c_werror_flag" ||
16636 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016637 } && test -s conftest$ac_exeext &&
16638 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016639 eval "$as_ac_var=yes"
16640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016642sed 's/^/| /' conftest.$ac_ext >&5
16643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646
16647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016648 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016649fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016650ac_res=`eval echo '${'$as_ac_var'}'`
16651 { echo "$as_me:$LINENO: result: $ac_res" >&5
16652echo "${ECHO_T}$ac_res" >&6; }
16653if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016654 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016655#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016656_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016657 case $ac_sys_system in
16658 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016659
Jason Tishlerfac083d2003-07-22 15:20:49 +000016660cat >>confdefs.h <<\_ACEOF
16661#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16662_ACEOF
16663
16664 ;;
16665 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016666fi
16667done
16668
16669fi
16670
16671
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016672# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016673
16674
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016675{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16676echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016677# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016678if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016680 no)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016681 { echo "$as_me:$LINENO: result: no" >&5
16682echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016683 ipv6=no
16684 ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016685 *) { echo "$as_me:$LINENO: result: yes" >&5
16686echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016687 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016688#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016689_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016690
16691 ipv6=yes
16692 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016694else
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016696 if test "$cross_compiling" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016697 { echo "$as_me:$LINENO: result: no" >&5
16698echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016699 ipv6=no
16700
16701else
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016703/* confdefs.h. */
16704_ACEOF
16705cat confdefs.h >>conftest.$ac_ext
16706cat >>conftest.$ac_ext <<_ACEOF
16707/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016708 /* AF_INET6 available check */
16709#include <sys/types.h>
16710#include <sys/socket.h>
16711main()
16712{
16713 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16714 exit(1);
16715 else
16716 exit(0);
16717}
16718
Martin v. Löwis11437992002-04-12 09:54:03 +000016719_ACEOF
16720rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721if { (ac_try="$ac_link"
16722case "(($ac_try" in
16723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16724 *) ac_try_echo=$ac_try;;
16725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016728 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016731 { (case "(($ac_try" in
16732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16733 *) ac_try_echo=$ac_try;;
16734esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016739 (exit $ac_status); }; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016740 { echo "$as_me:$LINENO: result: yes" >&5
16741echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016742 ipv6=yes
16743else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016744 echo "$as_me: program exited with status $ac_status" >&5
16745echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016746sed 's/^/| /' conftest.$ac_ext >&5
16747
Martin v. Löwis11437992002-04-12 09:54:03 +000016748( exit $ac_status )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016749{ echo "$as_me:$LINENO: result: no" >&5
16750echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016751 ipv6=no
16752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753rm -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 +000016754fi
16755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016756
16757
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016758if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016759 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16760echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016762/* confdefs.h. */
16763_ACEOF
16764cat confdefs.h >>conftest.$ac_ext
16765cat >>conftest.$ac_ext <<_ACEOF
16766/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016767#include <sys/types.h>
16768#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016769int
16770main ()
16771{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016772struct sockaddr_in6 x;
16773x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016774 ;
16775 return 0;
16776}
16777_ACEOF
16778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016779if { (ac_try="$ac_compile"
16780case "(($ac_try" in
16781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16782 *) ac_try_echo=$ac_try;;
16783esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016787 grep -v '^ *+' conftest.er1 >conftest.err
16788 rm -f conftest.er1
16789 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016791 (exit $ac_status); } && {
16792 test -z "$ac_c_werror_flag" ||
16793 test ! -s conftest.err
16794 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016795 { echo "$as_me:$LINENO: result: yes" >&5
16796echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016797 ipv6=yes
16798else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016800sed 's/^/| /' conftest.$ac_ext >&5
16801
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016802 { echo "$as_me:$LINENO: result: no" >&5
16803echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016804 ipv6=no
16805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806
16807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016808fi
16809
16810if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016811 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016812#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016813_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016814
16815fi
16816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016817fi
16818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016819
16820ipv6type=unknown
16821ipv6lib=none
16822ipv6trylibc=no
16823
16824if test "$ipv6" = "yes"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016825 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16826echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016827 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16828 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016829 case $i in
16830 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016832/* confdefs.h. */
16833_ACEOF
16834cat confdefs.h >>conftest.$ac_ext
16835cat >>conftest.$ac_ext <<_ACEOF
16836/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016837
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016838#include <netinet/in.h>
16839#ifdef IPV6_INRIA_VERSION
16840yes
16841#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016842_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016844 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016845 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016847rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016848
16849 ;;
16850 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016852/* confdefs.h. */
16853_ACEOF
16854cat confdefs.h >>conftest.$ac_ext
16855cat >>conftest.$ac_ext <<_ACEOF
16856/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016857
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016858#include <netinet/in.h>
16859#ifdef __KAME__
16860yes
16861#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016862_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016863if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016864 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016865 ipv6type=$i;
16866 ipv6lib=inet6
16867 ipv6libdir=/usr/local/v6/lib
16868 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016869fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016870rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016871
16872 ;;
16873 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016875/* confdefs.h. */
16876_ACEOF
16877cat confdefs.h >>conftest.$ac_ext
16878cat >>conftest.$ac_ext <<_ACEOF
16879/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016880
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016881#include <features.h>
16882#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16883yes
16884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016885_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016887 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016888 ipv6type=$i;
16889 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016890fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016892
16893 ;;
16894 linux-inet6)
16895 if test -d /usr/inet6; then
16896 ipv6type=$i
16897 ipv6lib=inet6
16898 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016899 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016900 fi
16901 ;;
16902 solaris)
16903 if test -f /etc/netconfig; then
16904 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16905 ipv6type=$i
16906 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016907 fi
16908 fi
16909 ;;
16910 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016912/* confdefs.h. */
16913_ACEOF
16914cat confdefs.h >>conftest.$ac_ext
16915cat >>conftest.$ac_ext <<_ACEOF
16916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016918#include <sys/param.h>
16919#ifdef _TOSHIBA_INET6
16920yes
16921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016924 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925 ipv6type=$i;
16926 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016927 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016929rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930
16931 ;;
16932 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016934/* confdefs.h. */
16935_ACEOF
16936cat confdefs.h >>conftest.$ac_ext
16937cat >>conftest.$ac_ext <<_ACEOF
16938/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016940#include </usr/local/v6/include/sys/v6config.h>
16941#ifdef __V6D__
16942yes
16943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016944_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016946 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016947 ipv6type=$i;
16948 ipv6lib=v6;
16949 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016950 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016951fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016952rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016953
16954 ;;
16955 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016957/* confdefs.h. */
16958_ACEOF
16959cat confdefs.h >>conftest.$ac_ext
16960cat >>conftest.$ac_ext <<_ACEOF
16961/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016962
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016963#include <sys/param.h>
16964#ifdef _ZETA_MINAMI_INET6
16965yes
16966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016967_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016969 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016970 ipv6type=$i;
16971 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016972 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016973fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000016974rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016975
16976 ;;
16977 esac
16978 if test "$ipv6type" != "unknown"; then
16979 break
16980 fi
16981 done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016982 { echo "$as_me:$LINENO: result: $ipv6type" >&5
16983echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016984fi
16985
16986if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16987 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16988 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16989 echo "using lib$ipv6lib"
16990 else
16991 if test $ipv6trylibc = "yes"; then
16992 echo "using libc"
16993 else
16994 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16995 echo "You need to fetch lib$ipv6lib.a from appropriate"
16996 echo 'ipv6 kit and compile beforehand.'
16997 exit 1
16998 fi
16999 fi
17000fi
17001
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017002{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17003echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017004cat >conftest.$ac_ext <<_ACEOF
17005/* confdefs.h. */
17006_ACEOF
17007cat confdefs.h >>conftest.$ac_ext
17008cat >>conftest.$ac_ext <<_ACEOF
17009/* end confdefs.h. */
17010#include <Carbon/Carbon.h>
17011int
17012main ()
17013{
17014FSIORefNum fRef = 0
17015 ;
17016 return 0;
17017}
17018_ACEOF
17019rm -f conftest.$ac_objext
17020if { (ac_try="$ac_compile"
17021case "(($ac_try" in
17022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17023 *) ac_try_echo=$ac_try;;
17024esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017026 (eval "$ac_compile") 2>conftest.er1
17027 ac_status=$?
17028 grep -v '^ *+' conftest.er1 >conftest.err
17029 rm -f conftest.er1
17030 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017032 (exit $ac_status); } && {
17033 test -z "$ac_c_werror_flag" ||
17034 test ! -s conftest.err
17035 } && test -s conftest.$ac_objext; then
17036
17037cat >>confdefs.h <<\_ACEOF
17038#define HAVE_OSX105_SDK 1
17039_ACEOF
17040
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017041 { echo "$as_me:$LINENO: result: yes" >&5
17042echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017043else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017044 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017045sed 's/^/| /' conftest.$ac_ext >&5
17046
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017047 { echo "$as_me:$LINENO: result: no" >&5
17048echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017049
17050fi
17051
17052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17053
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017054# Check for --with-doc-strings
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017055{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17056echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017059if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060 withval=$with_doc_strings;
17061fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017062
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017063
17064if test -z "$with_doc_strings"
17065then with_doc_strings="yes"
17066fi
17067if test "$with_doc_strings" != "no"
17068then
17069
17070cat >>confdefs.h <<\_ACEOF
17071#define WITH_DOC_STRINGS 1
17072_ACEOF
17073
17074fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017075{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17076echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017077
Neil Schemenauera35c6882001-02-27 04:45:05 +000017078# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017079{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17080echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017083if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017085if test "$withval" != no
17086then
17087
17088cat >>confdefs.h <<\_ACEOF
17089#define WITH_TSC 1
17090_ACEOF
17091
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017092 { echo "$as_me:$LINENO: result: yes" >&5
17093echo "${ECHO_T}yes" >&6; }
17094else { echo "$as_me:$LINENO: result: no" >&5
17095echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017096fi
17097else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017098 { echo "$as_me:$LINENO: result: no" >&5
17099echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017100fi
17101
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017102
17103# Check for Python-specific malloc support
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017104{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17105echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017107# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017108if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017109 withval=$with_pymalloc;
17110fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017111
Neil Schemenauera35c6882001-02-27 04:45:05 +000017112
Neil Schemenauer16c22972002-03-22 15:34:49 +000017113if test -z "$with_pymalloc"
17114then with_pymalloc="yes"
17115fi
17116if test "$with_pymalloc" != "no"
17117then
Martin v. Löwis11437992002-04-12 09:54:03 +000017118
17119cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017120#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017121_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017122
17123fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017124{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17125echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017126
Benjamin Peterson05159c42009-12-03 03:01:27 +000017127# Check for Valgrind support
17128{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17129echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17130
17131# Check whether --with-valgrind was given.
17132if test "${with_valgrind+set}" = set; then
17133 withval=$with_valgrind;
17134else
17135 with_valgrind=no
17136fi
17137
17138{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17139echo "${ECHO_T}$with_valgrind" >&6; }
17140if test "$with_valgrind" != no; then
17141 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17142 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17143echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17144if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17145 echo $ECHO_N "(cached) $ECHO_C" >&6
17146fi
17147{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17148echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17149else
17150 # Is the header compilable?
17151{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17152echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17153cat >conftest.$ac_ext <<_ACEOF
17154/* confdefs.h. */
17155_ACEOF
17156cat confdefs.h >>conftest.$ac_ext
17157cat >>conftest.$ac_ext <<_ACEOF
17158/* end confdefs.h. */
17159$ac_includes_default
17160#include <valgrind/valgrind.h>
17161_ACEOF
17162rm -f conftest.$ac_objext
17163if { (ac_try="$ac_compile"
17164case "(($ac_try" in
17165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17166 *) ac_try_echo=$ac_try;;
17167esac
17168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17169 (eval "$ac_compile") 2>conftest.er1
17170 ac_status=$?
17171 grep -v '^ *+' conftest.er1 >conftest.err
17172 rm -f conftest.er1
17173 cat conftest.err >&5
17174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175 (exit $ac_status); } && {
17176 test -z "$ac_c_werror_flag" ||
17177 test ! -s conftest.err
17178 } && test -s conftest.$ac_objext; then
17179 ac_header_compiler=yes
17180else
17181 echo "$as_me: failed program was:" >&5
17182sed 's/^/| /' conftest.$ac_ext >&5
17183
17184 ac_header_compiler=no
17185fi
17186
17187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17188{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17189echo "${ECHO_T}$ac_header_compiler" >&6; }
17190
17191# Is the header present?
17192{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17193echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17194cat >conftest.$ac_ext <<_ACEOF
17195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
17200#include <valgrind/valgrind.h>
17201_ACEOF
17202if { (ac_try="$ac_cpp conftest.$ac_ext"
17203case "(($ac_try" in
17204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17205 *) ac_try_echo=$ac_try;;
17206esac
17207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17208 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17209 ac_status=$?
17210 grep -v '^ *+' conftest.er1 >conftest.err
17211 rm -f conftest.er1
17212 cat conftest.err >&5
17213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17214 (exit $ac_status); } >/dev/null && {
17215 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17216 test ! -s conftest.err
17217 }; then
17218 ac_header_preproc=yes
17219else
17220 echo "$as_me: failed program was:" >&5
17221sed 's/^/| /' conftest.$ac_ext >&5
17222
17223 ac_header_preproc=no
17224fi
17225
17226rm -f conftest.err conftest.$ac_ext
17227{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17228echo "${ECHO_T}$ac_header_preproc" >&6; }
17229
17230# So? What about this header?
17231case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17232 yes:no: )
17233 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
17234echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17235 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
17236echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
17237 ac_header_preproc=yes
17238 ;;
17239 no:yes:* )
17240 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
17241echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
17242 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
17243echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
17244 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
17245echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
17246 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
17247echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
17248 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
17249echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
17250 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
17251echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
17252 ( cat <<\_ASBOX
17253## -------------------------------------- ##
17254## Report this to http://bugs.python.org/ ##
17255## -------------------------------------- ##
17256_ASBOX
17257 ) | sed "s/^/$as_me: WARNING: /" >&2
17258 ;;
17259esac
17260{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17261echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17262if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17263 echo $ECHO_N "(cached) $ECHO_C" >&6
17264else
17265 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
17266fi
17267{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17268echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17269
17270fi
17271if test $ac_cv_header_valgrind_valgrind_h = yes; then
17272
17273cat >>confdefs.h <<\_ACEOF
17274#define WITH_VALGRIND 1
17275_ACEOF
17276
17277else
17278 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
17279echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
17280 { (exit 1); exit 1; }; }
17281
17282fi
17283
17284
17285fi
17286
Barry Warsawef82cd72000-06-30 16:21:01 +000017287# Check for --with-wctype-functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017288{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17289echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017291# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017292if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017293 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017294if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017295then
17296
17297cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017298#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017299_ACEOF
17300
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017301 { echo "$as_me:$LINENO: result: yes" >&5
17302echo "${ECHO_T}yes" >&6; }
17303else { echo "$as_me:$LINENO: result: no" >&5
17304echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017305fi
17306else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017307 { echo "$as_me:$LINENO: result: no" >&5
17308echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309fi
17310
Barry Warsawef82cd72000-06-30 16:21:01 +000017311
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017312# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017313
Guido van Rossum98935bf2001-09-05 19:13:16 +000017314DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017315
Guido van Rossume97ee181999-12-20 21:27:22 +000017316# the dlopen() function means we might want to use dynload_shlib.o. some
17317# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017318
Thomas Wouters3a584202000-08-05 23:28:51 +000017319for ac_func in dlopen
17320do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17322{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017326else
Martin v. Löwis11437992002-04-12 09:54:03 +000017327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017328/* confdefs.h. */
17329_ACEOF
17330cat confdefs.h >>conftest.$ac_ext
17331cat >>conftest.$ac_ext <<_ACEOF
17332/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17335#define $ac_func innocuous_$ac_func
17336
Guido van Rossume97ee181999-12-20 21:27:22 +000017337/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017338 which can conflict with char $ac_func (); below.
17339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017340 <limits.h> exists even on freestanding compilers. */
17341
17342#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017343# include <limits.h>
17344#else
17345# include <assert.h>
17346#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017347
17348#undef $ac_func
17349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350/* Override any GCC internal prototype to avoid an error.
17351 Use char because int might match the return type of a GCC
17352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017353#ifdef __cplusplus
17354extern "C"
17355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017356char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017357/* The GNU C library defines this for functions which it implements
17358 to always fail with ENOSYS. Some functions are actually named
17359 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017361choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017362#endif
17363
Skip Montanaro6dead952003-09-25 14:50:04 +000017364int
17365main ()
17366{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017368 ;
17369 return 0;
17370}
17371_ACEOF
17372rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373if { (ac_try="$ac_link"
17374case "(($ac_try" in
17375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17376 *) ac_try_echo=$ac_try;;
17377esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017381 grep -v '^ *+' conftest.er1 >conftest.err
17382 rm -f conftest.er1
17383 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 (exit $ac_status); } && {
17386 test -z "$ac_c_werror_flag" ||
17387 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017388 } && test -s conftest$ac_exeext &&
17389 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017390 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017391else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017393sed 's/^/| /' conftest.$ac_ext >&5
17394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017397
17398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017399 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017400fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017401ac_res=`eval echo '${'$as_ac_var'}'`
17402 { echo "$as_me:$LINENO: result: $ac_res" >&5
17403echo "${ECHO_T}$ac_res" >&6; }
17404if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017405 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017407_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017408
Guido van Rossume97ee181999-12-20 21:27:22 +000017409fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017410done
Guido van Rossume97ee181999-12-20 21:27:22 +000017411
Michael W. Hudson54241132001-12-07 15:38:26 +000017412
Guido van Rossume97ee181999-12-20 21:27:22 +000017413# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17414# loading of modules.
17415
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017416{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17417echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017418if test -z "$DYNLOADFILE"
17419then
17420 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017421 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17422 if test "$ac_cv_func_dlopen" = yes
17423 then DYNLOADFILE="dynload_shlib.o"
17424 else DYNLOADFILE="dynload_aix.o"
17425 fi
17426 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017427 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017428 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17429 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017430 *)
17431 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17432 # out any dynamic loading
17433 if test "$ac_cv_func_dlopen" = yes
17434 then DYNLOADFILE="dynload_shlib.o"
17435 else DYNLOADFILE="dynload_stub.o"
17436 fi
17437 ;;
17438 esac
17439fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017440{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17441echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017442if test "$DYNLOADFILE" != "dynload_stub.o"
17443then
Martin v. Löwis11437992002-04-12 09:54:03 +000017444
17445cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017446#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017447_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017448
17449fi
17450
Neil Schemenauer4e425612001-06-19 15:44:15 +000017451# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17452
Michael W. Hudson54241132001-12-07 15:38:26 +000017453
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017454{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17455echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017456if test -z "$MACHDEP_OBJS"
17457then
Jack Jansene578a632001-08-15 01:27:14 +000017458 MACHDEP_OBJS=$extra_machdep_objs
17459else
17460 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017461fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017462{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17463echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017464
Guido van Rossum627b2d71993-12-24 10:39:16 +000017465# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
Martin v. Löwisd6320502004-08-12 13:45:08 +000017537
Martin v. Löwisc3001752005-01-23 09:27:24 +000017538
17539
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017540
17541
Thomas Wouterscf297e42007-02-23 15:07:44 +000017542
17543
Gregory P. Smith25523d22007-09-03 16:44:55 +000017544
Christian Heimes4e30a842007-11-30 22:12:06 +000017545
Martin v. Löwis92fab752008-03-08 10:40:41 +000017546
Martin v. Löwis823725e2008-03-24 13:39:54 +000017547
17548
Benjamin Peterson965ce872009-04-05 21:24:58 +000017549
17550
17551
17552
Martin v. Löwis011e8422009-05-05 04:43:17 +000017553
Martin v. Löwis113a0852009-05-29 17:25:39 +000017554
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017555
17556
17557
17558
Antoine Pitroub7572f02009-12-02 20:46:48 +000017559
Martin v. Löwis823725e2008-03-24 13:39:54 +000017560for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17561 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017562 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017563 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitroub7572f02009-12-02 20:46:48 +000017564 initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017565 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017566 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017567 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17568 setgid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000017569 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setuid setvbuf \
17570 sigaction siginterrupt sigrelse snprintf strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017571 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017572 truncate uname unsetenv utimes waitpid wait3 wait4 \
17573 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017574do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017575as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17576{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17577echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017579 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017580else
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017582/* confdefs.h. */
17583_ACEOF
17584cat confdefs.h >>conftest.$ac_ext
17585cat >>conftest.$ac_ext <<_ACEOF
17586/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017587/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17588 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17589#define $ac_func innocuous_$ac_func
17590
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017591/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017592 which can conflict with char $ac_func (); below.
17593 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017594 <limits.h> exists even on freestanding compilers. */
17595
17596#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017597# include <limits.h>
17598#else
17599# include <assert.h>
17600#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017601
17602#undef $ac_func
17603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017604/* Override any GCC internal prototype to avoid an error.
17605 Use char because int might match the return type of a GCC
17606 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017607#ifdef __cplusplus
17608extern "C"
17609#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017610char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017611/* The GNU C library defines this for functions which it implements
17612 to always fail with ENOSYS. Some functions are actually named
17613 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017615choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017616#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017617
Skip Montanaro6dead952003-09-25 14:50:04 +000017618int
17619main ()
17620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017621return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 ;
17623 return 0;
17624}
17625_ACEOF
17626rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627if { (ac_try="$ac_link"
17628case "(($ac_try" in
17629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17630 *) ac_try_echo=$ac_try;;
17631esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017635 grep -v '^ *+' conftest.er1 >conftest.err
17636 rm -f conftest.er1
17637 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017639 (exit $ac_status); } && {
17640 test -z "$ac_c_werror_flag" ||
17641 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017642 } && test -s conftest$ac_exeext &&
17643 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017645else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017647sed 's/^/| /' conftest.$ac_ext >&5
17648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017651
17652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017653 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017654fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017655ac_res=`eval echo '${'$as_ac_var'}'`
17656 { echo "$as_me:$LINENO: result: $ac_res" >&5
17657echo "${ECHO_T}$ac_res" >&6; }
17658if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017660#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017661_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017662
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017663fi
17664done
17665
Michael W. Hudson54241132001-12-07 15:38:26 +000017666
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017667# For some functions, having a definition is not sufficient, since
17668# we want to take their address.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017669{ echo "$as_me:$LINENO: checking for chroot" >&5
17670echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017672/* confdefs.h. */
17673_ACEOF
17674cat confdefs.h >>conftest.$ac_ext
17675cat >>conftest.$ac_ext <<_ACEOF
17676/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017677#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017678int
17679main ()
17680{
17681void *x=chroot
17682 ;
17683 return 0;
17684}
17685_ACEOF
17686rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687if { (ac_try="$ac_compile"
17688case "(($ac_try" in
17689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17690 *) ac_try_echo=$ac_try;;
17691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017695 grep -v '^ *+' conftest.er1 >conftest.err
17696 rm -f conftest.er1
17697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699 (exit $ac_status); } && {
17700 test -z "$ac_c_werror_flag" ||
17701 test ! -s conftest.err
17702 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017703
17704cat >>confdefs.h <<\_ACEOF
17705#define HAVE_CHROOT 1
17706_ACEOF
17707
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017708 { echo "$as_me:$LINENO: result: yes" >&5
17709echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017710else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017712sed 's/^/| /' conftest.$ac_ext >&5
17713
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017714 { echo "$as_me:$LINENO: result: no" >&5
17715echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017716
17717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718
17719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017720{ echo "$as_me:$LINENO: checking for link" >&5
17721echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017723/* confdefs.h. */
17724_ACEOF
17725cat confdefs.h >>conftest.$ac_ext
17726cat >>conftest.$ac_ext <<_ACEOF
17727/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017728#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017729int
17730main ()
17731{
17732void *x=link
17733 ;
17734 return 0;
17735}
17736_ACEOF
17737rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017738if { (ac_try="$ac_compile"
17739case "(($ac_try" in
17740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17741 *) ac_try_echo=$ac_try;;
17742esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017746 grep -v '^ *+' conftest.er1 >conftest.err
17747 rm -f conftest.er1
17748 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017750 (exit $ac_status); } && {
17751 test -z "$ac_c_werror_flag" ||
17752 test ! -s conftest.err
17753 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017754
17755cat >>confdefs.h <<\_ACEOF
17756#define HAVE_LINK 1
17757_ACEOF
17758
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017759 { echo "$as_me:$LINENO: result: yes" >&5
17760echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017761else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017763sed 's/^/| /' conftest.$ac_ext >&5
17764
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017765 { echo "$as_me:$LINENO: result: no" >&5
17766echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017767
17768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769
17770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017771{ echo "$as_me:$LINENO: checking for symlink" >&5
17772echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017774/* confdefs.h. */
17775_ACEOF
17776cat confdefs.h >>conftest.$ac_ext
17777cat >>conftest.$ac_ext <<_ACEOF
17778/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017779#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017780int
17781main ()
17782{
17783void *x=symlink
17784 ;
17785 return 0;
17786}
17787_ACEOF
17788rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789if { (ac_try="$ac_compile"
17790case "(($ac_try" in
17791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17792 *) ac_try_echo=$ac_try;;
17793esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017797 grep -v '^ *+' conftest.er1 >conftest.err
17798 rm -f conftest.er1
17799 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801 (exit $ac_status); } && {
17802 test -z "$ac_c_werror_flag" ||
17803 test ! -s conftest.err
17804 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017805
17806cat >>confdefs.h <<\_ACEOF
17807#define HAVE_SYMLINK 1
17808_ACEOF
17809
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017810 { echo "$as_me:$LINENO: result: yes" >&5
17811echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017812else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017814sed 's/^/| /' conftest.$ac_ext >&5
17815
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017816 { echo "$as_me:$LINENO: result: no" >&5
17817echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017818
17819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820
17821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017822{ echo "$as_me:$LINENO: checking for fchdir" >&5
17823echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017825/* confdefs.h. */
17826_ACEOF
17827cat confdefs.h >>conftest.$ac_ext
17828cat >>conftest.$ac_ext <<_ACEOF
17829/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017830#include <unistd.h>
17831int
17832main ()
17833{
17834void *x=fchdir
17835 ;
17836 return 0;
17837}
17838_ACEOF
17839rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840if { (ac_try="$ac_compile"
17841case "(($ac_try" in
17842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17843 *) ac_try_echo=$ac_try;;
17844esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017848 grep -v '^ *+' conftest.er1 >conftest.err
17849 rm -f conftest.er1
17850 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017852 (exit $ac_status); } && {
17853 test -z "$ac_c_werror_flag" ||
17854 test ! -s conftest.err
17855 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017856
17857cat >>confdefs.h <<\_ACEOF
17858#define HAVE_FCHDIR 1
17859_ACEOF
17860
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017861 { echo "$as_me:$LINENO: result: yes" >&5
17862echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017863else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017865sed 's/^/| /' conftest.$ac_ext >&5
17866
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017867 { echo "$as_me:$LINENO: result: no" >&5
17868echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017869
17870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871
17872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017873{ echo "$as_me:$LINENO: checking for fsync" >&5
17874echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017876/* confdefs.h. */
17877_ACEOF
17878cat confdefs.h >>conftest.$ac_ext
17879cat >>conftest.$ac_ext <<_ACEOF
17880/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017881#include <unistd.h>
17882int
17883main ()
17884{
17885void *x=fsync
17886 ;
17887 return 0;
17888}
17889_ACEOF
17890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891if { (ac_try="$ac_compile"
17892case "(($ac_try" in
17893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17894 *) ac_try_echo=$ac_try;;
17895esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017899 grep -v '^ *+' conftest.er1 >conftest.err
17900 rm -f conftest.er1
17901 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017903 (exit $ac_status); } && {
17904 test -z "$ac_c_werror_flag" ||
17905 test ! -s conftest.err
17906 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017907
17908cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017909#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017910_ACEOF
17911
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017912 { echo "$as_me:$LINENO: result: yes" >&5
17913echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017914else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017916sed 's/^/| /' conftest.$ac_ext >&5
17917
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017918 { echo "$as_me:$LINENO: result: no" >&5
17919echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017920
17921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922
17923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017924{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17925echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017927/* confdefs.h. */
17928_ACEOF
17929cat confdefs.h >>conftest.$ac_ext
17930cat >>conftest.$ac_ext <<_ACEOF
17931/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017932#include <unistd.h>
17933int
17934main ()
17935{
17936void *x=fdatasync
17937 ;
17938 return 0;
17939}
17940_ACEOF
17941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942if { (ac_try="$ac_compile"
17943case "(($ac_try" in
17944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17945 *) ac_try_echo=$ac_try;;
17946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017950 grep -v '^ *+' conftest.er1 >conftest.err
17951 rm -f conftest.er1
17952 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954 (exit $ac_status); } && {
17955 test -z "$ac_c_werror_flag" ||
17956 test ! -s conftest.err
17957 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017958
17959cat >>confdefs.h <<\_ACEOF
17960#define HAVE_FDATASYNC 1
17961_ACEOF
17962
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017963 { echo "$as_me:$LINENO: result: yes" >&5
17964echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017965else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017967sed 's/^/| /' conftest.$ac_ext >&5
17968
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017969 { echo "$as_me:$LINENO: result: no" >&5
17970echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017971
17972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973
17974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017975{ echo "$as_me:$LINENO: checking for epoll" >&5
17976echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017977cat >conftest.$ac_ext <<_ACEOF
17978/* confdefs.h. */
17979_ACEOF
17980cat confdefs.h >>conftest.$ac_ext
17981cat >>conftest.$ac_ext <<_ACEOF
17982/* end confdefs.h. */
17983#include <sys/epoll.h>
17984int
17985main ()
17986{
17987void *x=epoll_create
17988 ;
17989 return 0;
17990}
17991_ACEOF
17992rm -f conftest.$ac_objext
17993if { (ac_try="$ac_compile"
17994case "(($ac_try" in
17995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17996 *) ac_try_echo=$ac_try;;
17997esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017999 (eval "$ac_compile") 2>conftest.er1
18000 ac_status=$?
18001 grep -v '^ *+' conftest.er1 >conftest.err
18002 rm -f conftest.er1
18003 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018005 (exit $ac_status); } && {
18006 test -z "$ac_c_werror_flag" ||
18007 test ! -s conftest.err
18008 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018009
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018010cat >>confdefs.h <<\_ACEOF
18011#define HAVE_EPOLL 1
18012_ACEOF
18013
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018014 { echo "$as_me:$LINENO: result: yes" >&5
18015echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018016else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018017 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018018sed 's/^/| /' conftest.$ac_ext >&5
18019
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018020 { echo "$as_me:$LINENO: result: no" >&5
18021echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018022
18023fi
18024
18025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018026{ echo "$as_me:$LINENO: checking for kqueue" >&5
18027echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018028cat >conftest.$ac_ext <<_ACEOF
18029/* confdefs.h. */
18030_ACEOF
18031cat confdefs.h >>conftest.$ac_ext
18032cat >>conftest.$ac_ext <<_ACEOF
18033/* end confdefs.h. */
18034
18035#include <sys/types.h>
18036#include <sys/event.h>
18037
18038int
18039main ()
18040{
18041int x=kqueue()
18042 ;
18043 return 0;
18044}
18045_ACEOF
18046rm -f conftest.$ac_objext
18047if { (ac_try="$ac_compile"
18048case "(($ac_try" in
18049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18050 *) ac_try_echo=$ac_try;;
18051esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018053 (eval "$ac_compile") 2>conftest.er1
18054 ac_status=$?
18055 grep -v '^ *+' conftest.er1 >conftest.err
18056 rm -f conftest.er1
18057 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018059 (exit $ac_status); } && {
18060 test -z "$ac_c_werror_flag" ||
18061 test ! -s conftest.err
18062 } && test -s conftest.$ac_objext; then
18063
18064cat >>confdefs.h <<\_ACEOF
18065#define HAVE_KQUEUE 1
18066_ACEOF
18067
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018068 { echo "$as_me:$LINENO: result: yes" >&5
18069echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018070else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018071 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018072sed 's/^/| /' conftest.$ac_ext >&5
18073
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018074 { echo "$as_me:$LINENO: result: no" >&5
18075echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018076
18077fi
18078
18079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018080# On some systems (eg. FreeBSD 5), we would find a definition of the
18081# functions ctermid_r, setgroups in the library, but no prototype
18082# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18083# address to avoid compiler warnings and potential miscompilations
18084# because of the missing prototypes.
18085
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018086{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18087echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018089/* confdefs.h. */
18090_ACEOF
18091cat confdefs.h >>conftest.$ac_ext
18092cat >>conftest.$ac_ext <<_ACEOF
18093/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018094
18095#include "confdefs.h"
18096#include <stdio.h>
18097
Martin v. Löwisd5843682002-11-21 20:41:28 +000018098int
18099main ()
18100{
18101void* p = ctermid_r
18102 ;
18103 return 0;
18104}
18105_ACEOF
18106rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107if { (ac_try="$ac_compile"
18108case "(($ac_try" in
18109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18110 *) ac_try_echo=$ac_try;;
18111esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018115 grep -v '^ *+' conftest.er1 >conftest.err
18116 rm -f conftest.er1
18117 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 (exit $ac_status); } && {
18120 test -z "$ac_c_werror_flag" ||
18121 test ! -s conftest.err
18122 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018123
18124cat >>confdefs.h <<\_ACEOF
18125#define HAVE_CTERMID_R 1
18126_ACEOF
18127
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018128 { echo "$as_me:$LINENO: result: yes" >&5
18129echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018130else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018131 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018132sed 's/^/| /' conftest.$ac_ext >&5
18133
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018134 { echo "$as_me:$LINENO: result: no" >&5
18135echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018136
18137fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18140
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018141{ echo "$as_me:$LINENO: checking for flock" >&5
18142echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018143cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018144/* confdefs.h. */
18145_ACEOF
18146cat confdefs.h >>conftest.$ac_ext
18147cat >>conftest.$ac_ext <<_ACEOF
18148/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018149
18150#include "confdefs.h"
18151#include <sys/file.h>
18152
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018153int
18154main ()
18155{
18156void* p = flock
18157 ;
18158 return 0;
18159}
18160_ACEOF
18161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162if { (ac_try="$ac_compile"
18163case "(($ac_try" in
18164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18165 *) ac_try_echo=$ac_try;;
18166esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018168 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018170 grep -v '^ *+' conftest.er1 >conftest.err
18171 rm -f conftest.er1
18172 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174 (exit $ac_status); } && {
18175 test -z "$ac_c_werror_flag" ||
18176 test ! -s conftest.err
18177 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018178
18179cat >>confdefs.h <<\_ACEOF
18180#define HAVE_FLOCK 1
18181_ACEOF
18182
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018183 { echo "$as_me:$LINENO: result: yes" >&5
18184echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018185else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018187sed 's/^/| /' conftest.$ac_ext >&5
18188
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018189 { echo "$as_me:$LINENO: result: no" >&5
18190echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018191
18192fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18195
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018196{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18197echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018199/* confdefs.h. */
18200_ACEOF
18201cat confdefs.h >>conftest.$ac_ext
18202cat >>conftest.$ac_ext <<_ACEOF
18203/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018204
18205#include "confdefs.h"
18206#include <unistd.h>
18207
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018208int
18209main ()
18210{
18211void* p = getpagesize
18212 ;
18213 return 0;
18214}
18215_ACEOF
18216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217if { (ac_try="$ac_compile"
18218case "(($ac_try" in
18219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18220 *) ac_try_echo=$ac_try;;
18221esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018225 grep -v '^ *+' conftest.er1 >conftest.err
18226 rm -f conftest.er1
18227 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018229 (exit $ac_status); } && {
18230 test -z "$ac_c_werror_flag" ||
18231 test ! -s conftest.err
18232 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018233
18234cat >>confdefs.h <<\_ACEOF
18235#define HAVE_GETPAGESIZE 1
18236_ACEOF
18237
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018238 { echo "$as_me:$LINENO: result: yes" >&5
18239echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018242sed 's/^/| /' conftest.$ac_ext >&5
18243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018244 { echo "$as_me:$LINENO: result: no" >&5
18245echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018246
18247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018248
18249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018250
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018251for ac_prog in true
18252do
18253 # Extract the first word of "$ac_prog", so it can be a program name with args.
18254set dummy $ac_prog; ac_word=$2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018255{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018257if test "${ac_cv_prog_TRUE+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018258 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018259else
18260 if test -n "$TRUE"; then
18261 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18262else
18263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18264for as_dir in $PATH
18265do
18266 IFS=$as_save_IFS
18267 test -z "$as_dir" && as_dir=.
18268 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269 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 +000018270 ac_cv_prog_TRUE="$ac_prog"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018271 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018272 break 2
18273 fi
18274done
18275done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018277
18278fi
18279fi
18280TRUE=$ac_cv_prog_TRUE
18281if test -n "$TRUE"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018282 { echo "$as_me:$LINENO: result: $TRUE" >&5
18283echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018285 { echo "$as_me:$LINENO: result: no" >&5
18286echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018287fi
18288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018289
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018290 test -n "$TRUE" && break
18291done
18292test -n "$TRUE" || TRUE="/bin/true"
18293
18294
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018295{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18296echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018297if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018298 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018299else
18300 ac_check_lib_save_LIBS=$LIBS
18301LIBS="-lc $LIBS"
18302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018303/* confdefs.h. */
18304_ACEOF
18305cat confdefs.h >>conftest.$ac_ext
18306cat >>conftest.$ac_ext <<_ACEOF
18307/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309/* Override any GCC internal prototype to avoid an error.
18310 Use char because int might match the return type of a GCC
18311 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018312#ifdef __cplusplus
18313extern "C"
18314#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018315char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018316int
18317main ()
18318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018319return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018320 ;
18321 return 0;
18322}
18323_ACEOF
18324rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325if { (ac_try="$ac_link"
18326case "(($ac_try" in
18327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18328 *) ac_try_echo=$ac_try;;
18329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018331 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018333 grep -v '^ *+' conftest.er1 >conftest.err
18334 rm -f conftest.er1
18335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337 (exit $ac_status); } && {
18338 test -z "$ac_c_werror_flag" ||
18339 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018340 } && test -s conftest$ac_exeext &&
18341 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018342 ac_cv_lib_c_inet_aton=yes
18343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018345sed 's/^/| /' conftest.$ac_ext >&5
18346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018349
18350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018351 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018352LIBS=$ac_check_lib_save_LIBS
18353fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018354{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18355echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18356if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018357 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018358else
18359
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018360{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18361echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018362if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018363 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018364else
18365 ac_check_lib_save_LIBS=$LIBS
18366LIBS="-lresolv $LIBS"
18367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018368/* confdefs.h. */
18369_ACEOF
18370cat confdefs.h >>conftest.$ac_ext
18371cat >>conftest.$ac_ext <<_ACEOF
18372/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374/* Override any GCC internal prototype to avoid an error.
18375 Use char because int might match the return type of a GCC
18376 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018377#ifdef __cplusplus
18378extern "C"
18379#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018380char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018381int
18382main ()
18383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018385 ;
18386 return 0;
18387}
18388_ACEOF
18389rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390if { (ac_try="$ac_link"
18391case "(($ac_try" in
18392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18393 *) ac_try_echo=$ac_try;;
18394esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018398 grep -v '^ *+' conftest.er1 >conftest.err
18399 rm -f conftest.er1
18400 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 (exit $ac_status); } && {
18403 test -z "$ac_c_werror_flag" ||
18404 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018405 } && test -s conftest$ac_exeext &&
18406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018407 ac_cv_lib_resolv_inet_aton=yes
18408else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018410sed 's/^/| /' conftest.$ac_ext >&5
18411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414
18415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018417LIBS=$ac_check_lib_save_LIBS
18418fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018419{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18420echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18421if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018422 cat >>confdefs.h <<_ACEOF
18423#define HAVE_LIBRESOLV 1
18424_ACEOF
18425
18426 LIBS="-lresolv $LIBS"
18427
18428fi
18429
18430
18431fi
18432
18433
Christian Heimesd0764e22007-12-04 15:00:33 +000018434# On Tru64, chflags seems to be present, but calling it will
18435# exit Python
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018436{ echo "$as_me:$LINENO: checking for chflags" >&5
18437echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018438if test "${ac_cv_have_chflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018439 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018440else
18441 if test "$cross_compiling" = yes; then
18442 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018443else
18444 cat >conftest.$ac_ext <<_ACEOF
18445/* confdefs.h. */
18446_ACEOF
18447cat confdefs.h >>conftest.$ac_ext
18448cat >>conftest.$ac_ext <<_ACEOF
18449/* end confdefs.h. */
18450
18451#include <sys/stat.h>
18452#include <unistd.h>
18453int main(int argc, char*argv[])
18454{
18455 if(chflags(argv[0], 0) != 0)
18456 return 1;
18457 return 0;
18458}
18459
18460_ACEOF
18461rm -f conftest$ac_exeext
18462if { (ac_try="$ac_link"
18463case "(($ac_try" in
18464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18465 *) ac_try_echo=$ac_try;;
18466esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018468 (eval "$ac_link") 2>&5
18469 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018471 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18472 { (case "(($ac_try" in
18473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18474 *) ac_try_echo=$ac_try;;
18475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018477 (eval "$ac_try") 2>&5
18478 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018480 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018481 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018482else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018483 echo "$as_me: program exited with status $ac_status" >&5
18484echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018485sed 's/^/| /' conftest.$ac_ext >&5
18486
18487( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018488ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018489fi
18490rm -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 +000018491fi
18492
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018493
18494
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018495fi
18496
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018497{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18498echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018499if test $ac_cv_have_chflags = yes
18500then
18501
18502cat >>confdefs.h <<\_ACEOF
18503#define HAVE_CHFLAGS 1
18504_ACEOF
18505
18506fi
18507
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018508{ echo "$as_me:$LINENO: checking for lchflags" >&5
18509echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018510if test "${ac_cv_have_lchflags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018511 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018512else
18513 if test "$cross_compiling" = yes; then
18514 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018515else
18516 cat >conftest.$ac_ext <<_ACEOF
18517/* confdefs.h. */
18518_ACEOF
18519cat confdefs.h >>conftest.$ac_ext
18520cat >>conftest.$ac_ext <<_ACEOF
18521/* end confdefs.h. */
18522
18523#include <sys/stat.h>
18524#include <unistd.h>
18525int main(int argc, char*argv[])
18526{
18527 if(lchflags(argv[0], 0) != 0)
18528 return 1;
18529 return 0;
18530}
18531
18532_ACEOF
18533rm -f conftest$ac_exeext
18534if { (ac_try="$ac_link"
18535case "(($ac_try" in
18536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18537 *) ac_try_echo=$ac_try;;
18538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018540 (eval "$ac_link") 2>&5
18541 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018543 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18544 { (case "(($ac_try" in
18545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18546 *) ac_try_echo=$ac_try;;
18547esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018549 (eval "$ac_try") 2>&5
18550 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018552 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018553 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018554else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018555 echo "$as_me: program exited with status $ac_status" >&5
18556echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018557sed 's/^/| /' conftest.$ac_ext >&5
18558
18559( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018560ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018561fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18563fi
18564
18565
Christian Heimesd0764e22007-12-04 15:00:33 +000018566
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018567fi
18568
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018569{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18570echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018571if test $ac_cv_have_lchflags = yes
18572then
18573
18574cat >>confdefs.h <<\_ACEOF
18575#define HAVE_LCHFLAGS 1
18576_ACEOF
18577
18578fi
18579
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018580case $ac_sys_system/$ac_sys_release in
18581Darwin/*)
18582 _CUR_CFLAGS="${CFLAGS}"
18583 _CUR_LDFLAGS="${LDFLAGS}"
18584 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18585 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18586 ;;
18587esac
18588
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018589{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18590echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018591if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018592 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018593else
18594 ac_check_lib_save_LIBS=$LIBS
18595LIBS="-lz $LIBS"
18596cat >conftest.$ac_ext <<_ACEOF
18597/* confdefs.h. */
18598_ACEOF
18599cat confdefs.h >>conftest.$ac_ext
18600cat >>conftest.$ac_ext <<_ACEOF
18601/* end confdefs.h. */
18602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018603/* Override any GCC internal prototype to avoid an error.
18604 Use char because int might match the return type of a GCC
18605 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018606#ifdef __cplusplus
18607extern "C"
18608#endif
18609char inflateCopy ();
18610int
18611main ()
18612{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018614 ;
18615 return 0;
18616}
18617_ACEOF
18618rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619if { (ac_try="$ac_link"
18620case "(($ac_try" in
18621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18622 *) ac_try_echo=$ac_try;;
18623esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018625 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018626 ac_status=$?
18627 grep -v '^ *+' conftest.er1 >conftest.err
18628 rm -f conftest.er1
18629 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631 (exit $ac_status); } && {
18632 test -z "$ac_c_werror_flag" ||
18633 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018634 } && test -s conftest$ac_exeext &&
18635 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018636 ac_cv_lib_z_inflateCopy=yes
18637else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018638 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018639sed 's/^/| /' conftest.$ac_ext >&5
18640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018643
18644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018645 conftest$ac_exeext conftest.$ac_ext
18646LIBS=$ac_check_lib_save_LIBS
18647fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018648{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18649echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18650if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018651
18652cat >>confdefs.h <<\_ACEOF
18653#define HAVE_ZLIB_COPY 1
18654_ACEOF
18655
18656fi
18657
18658
18659case $ac_sys_system/$ac_sys_release in
18660Darwin/*)
18661 CFLAGS="${_CUR_CFLAGS}"
18662 LDFLAGS="${_CUR_LDFLAGS}"
18663 ;;
18664esac
18665
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018666{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18667echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018669/* confdefs.h. */
18670_ACEOF
18671cat confdefs.h >>conftest.$ac_ext
18672cat >>conftest.$ac_ext <<_ACEOF
18673/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018674
18675#include "confdefs.h"
18676#include <netdb.h>
18677
Martin v. Löwise9416172003-05-03 10:12:45 +000018678int
18679main ()
18680{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018681void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018682 ;
18683 return 0;
18684}
18685_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018686rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018687if { (ac_try="$ac_link"
18688case "(($ac_try" in
18689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18690 *) ac_try_echo=$ac_try;;
18691esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018693 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018695 grep -v '^ *+' conftest.er1 >conftest.err
18696 rm -f conftest.er1
18697 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699 (exit $ac_status); } && {
18700 test -z "$ac_c_werror_flag" ||
18701 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018702 } && test -s conftest$ac_exeext &&
18703 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018704
18705cat >>confdefs.h <<\_ACEOF
18706#define HAVE_HSTRERROR 1
18707_ACEOF
18708
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018709 { echo "$as_me:$LINENO: result: yes" >&5
18710echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018711else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018713sed 's/^/| /' conftest.$ac_ext >&5
18714
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018715 { echo "$as_me:$LINENO: result: no" >&5
18716echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018717
18718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018719
18720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018721 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018722
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018723{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18724echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018725cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018726/* confdefs.h. */
18727_ACEOF
18728cat confdefs.h >>conftest.$ac_ext
18729cat >>conftest.$ac_ext <<_ACEOF
18730/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018731
18732#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018733#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018734#include <sys/socket.h>
18735#include <netinet/in.h>
18736#include <arpa/inet.h>
18737
Martin v. Löwise9416172003-05-03 10:12:45 +000018738int
18739main ()
18740{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018741void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018742 ;
18743 return 0;
18744}
18745_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018746rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018747if { (ac_try="$ac_link"
18748case "(($ac_try" in
18749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18750 *) ac_try_echo=$ac_try;;
18751esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018755 grep -v '^ *+' conftest.er1 >conftest.err
18756 rm -f conftest.er1
18757 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759 (exit $ac_status); } && {
18760 test -z "$ac_c_werror_flag" ||
18761 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018762 } && test -s conftest$ac_exeext &&
18763 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018764
18765cat >>confdefs.h <<\_ACEOF
18766#define HAVE_INET_ATON 1
18767_ACEOF
18768
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018769 { echo "$as_me:$LINENO: result: yes" >&5
18770echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018771else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018773sed 's/^/| /' conftest.$ac_ext >&5
18774
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018775 { echo "$as_me:$LINENO: result: no" >&5
18776echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018777
18778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018779
18780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018783{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18784echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018786/* confdefs.h. */
18787_ACEOF
18788cat confdefs.h >>conftest.$ac_ext
18789cat >>conftest.$ac_ext <<_ACEOF
18790/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018791
18792#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018793#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018794#include <sys/socket.h>
18795#include <netinet/in.h>
18796#include <arpa/inet.h>
18797
Martin v. Löwise9416172003-05-03 10:12:45 +000018798int
18799main ()
18800{
18801void* p = inet_pton
18802 ;
18803 return 0;
18804}
18805_ACEOF
18806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018807if { (ac_try="$ac_compile"
18808case "(($ac_try" in
18809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18810 *) ac_try_echo=$ac_try;;
18811esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018815 grep -v '^ *+' conftest.er1 >conftest.err
18816 rm -f conftest.er1
18817 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018819 (exit $ac_status); } && {
18820 test -z "$ac_c_werror_flag" ||
18821 test ! -s conftest.err
18822 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018823
18824cat >>confdefs.h <<\_ACEOF
18825#define HAVE_INET_PTON 1
18826_ACEOF
18827
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018828 { echo "$as_me:$LINENO: result: yes" >&5
18829echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018830else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018832sed 's/^/| /' conftest.$ac_ext >&5
18833
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018834 { echo "$as_me:$LINENO: result: no" >&5
18835echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018836
18837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018838
18839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018840
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018841# On some systems, setgroups is in unistd.h, on others, in grp.h
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018842{ echo "$as_me:$LINENO: checking for setgroups" >&5
18843echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018845/* confdefs.h. */
18846_ACEOF
18847cat confdefs.h >>conftest.$ac_ext
18848cat >>conftest.$ac_ext <<_ACEOF
18849/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018850
18851#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018852#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018853#ifdef HAVE_GRP_H
18854#include <grp.h>
18855#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018856
Martin v. Löwisd5843682002-11-21 20:41:28 +000018857int
18858main ()
18859{
18860void* p = setgroups
18861 ;
18862 return 0;
18863}
18864_ACEOF
18865rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018866if { (ac_try="$ac_compile"
18867case "(($ac_try" in
18868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18869 *) ac_try_echo=$ac_try;;
18870esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018874 grep -v '^ *+' conftest.er1 >conftest.err
18875 rm -f conftest.er1
18876 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018878 (exit $ac_status); } && {
18879 test -z "$ac_c_werror_flag" ||
18880 test ! -s conftest.err
18881 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018882
18883cat >>confdefs.h <<\_ACEOF
18884#define HAVE_SETGROUPS 1
18885_ACEOF
18886
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018887 { echo "$as_me:$LINENO: result: yes" >&5
18888echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018889else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018891sed 's/^/| /' conftest.$ac_ext >&5
18892
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018893 { echo "$as_me:$LINENO: result: no" >&5
18894echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018895
18896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018897
18898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018899
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018900# check for openpty and forkpty
18901
Martin v. Löwis11437992002-04-12 09:54:03 +000018902
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018903for ac_func in openpty
18904do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018905as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18906{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18907echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018908if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018909 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018910else
Martin v. Löwis11437992002-04-12 09:54:03 +000018911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018912/* confdefs.h. */
18913_ACEOF
18914cat confdefs.h >>conftest.$ac_ext
18915cat >>conftest.$ac_ext <<_ACEOF
18916/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018917/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18918 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18919#define $ac_func innocuous_$ac_func
18920
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018921/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018922 which can conflict with char $ac_func (); below.
18923 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018924 <limits.h> exists even on freestanding compilers. */
18925
18926#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018927# include <limits.h>
18928#else
18929# include <assert.h>
18930#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018931
18932#undef $ac_func
18933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018934/* Override any GCC internal prototype to avoid an error.
18935 Use char because int might match the return type of a GCC
18936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018937#ifdef __cplusplus
18938extern "C"
18939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018940char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018941/* The GNU C library defines this for functions which it implements
18942 to always fail with ENOSYS. Some functions are actually named
18943 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018944#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018945choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018946#endif
18947
Skip Montanaro6dead952003-09-25 14:50:04 +000018948int
18949main ()
18950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018951return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018952 ;
18953 return 0;
18954}
18955_ACEOF
18956rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957if { (ac_try="$ac_link"
18958case "(($ac_try" in
18959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18960 *) ac_try_echo=$ac_try;;
18961esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018963 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018965 grep -v '^ *+' conftest.er1 >conftest.err
18966 rm -f conftest.er1
18967 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018969 (exit $ac_status); } && {
18970 test -z "$ac_c_werror_flag" ||
18971 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018972 } && test -s conftest$ac_exeext &&
18973 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018975else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018977sed 's/^/| /' conftest.$ac_ext >&5
18978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981
18982rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018983 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018984fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018985ac_res=`eval echo '${'$as_ac_var'}'`
18986 { echo "$as_me:$LINENO: result: $ac_res" >&5
18987echo "${ECHO_T}$ac_res" >&6; }
18988if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018989 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018990#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018991_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018992
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018993else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018994 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18995echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018996if test "${ac_cv_lib_util_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018997 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018998else
Martin v. Löwis11437992002-04-12 09:54:03 +000018999 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019000LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019002/* confdefs.h. */
19003_ACEOF
19004cat confdefs.h >>conftest.$ac_ext
19005cat >>conftest.$ac_ext <<_ACEOF
19006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019008/* Override any GCC internal prototype to avoid an error.
19009 Use char because int might match the return type of a GCC
19010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019011#ifdef __cplusplus
19012extern "C"
19013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019014char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019015int
19016main ()
19017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019018return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019019 ;
19020 return 0;
19021}
19022_ACEOF
19023rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019024if { (ac_try="$ac_link"
19025case "(($ac_try" in
19026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19027 *) ac_try_echo=$ac_try;;
19028esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019030 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019032 grep -v '^ *+' conftest.er1 >conftest.err
19033 rm -f conftest.er1
19034 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019036 (exit $ac_status); } && {
19037 test -z "$ac_c_werror_flag" ||
19038 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019039 } && test -s conftest$ac_exeext &&
19040 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019042else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019044sed 's/^/| /' conftest.$ac_ext >&5
19045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019048
19049rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019051LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019052fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019053{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19054echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19055if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019056 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019057#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019058_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019059 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019060else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019061 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19062echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019063if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019064 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019065else
19066 ac_check_lib_save_LIBS=$LIBS
19067LIBS="-lbsd $LIBS"
19068cat >conftest.$ac_ext <<_ACEOF
19069/* confdefs.h. */
19070_ACEOF
19071cat confdefs.h >>conftest.$ac_ext
19072cat >>conftest.$ac_ext <<_ACEOF
19073/* end confdefs.h. */
19074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019075/* Override any GCC internal prototype to avoid an error.
19076 Use char because int might match the return type of a GCC
19077 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019078#ifdef __cplusplus
19079extern "C"
19080#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019081char openpty ();
19082int
19083main ()
19084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019086 ;
19087 return 0;
19088}
19089_ACEOF
19090rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019091if { (ac_try="$ac_link"
19092case "(($ac_try" in
19093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19094 *) ac_try_echo=$ac_try;;
19095esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019098 ac_status=$?
19099 grep -v '^ *+' conftest.er1 >conftest.err
19100 rm -f conftest.er1
19101 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103 (exit $ac_status); } && {
19104 test -z "$ac_c_werror_flag" ||
19105 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019106 } && test -s conftest$ac_exeext &&
19107 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019108 ac_cv_lib_bsd_openpty=yes
19109else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019110 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019111sed 's/^/| /' conftest.$ac_ext >&5
19112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019115
19116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019117 conftest$ac_exeext conftest.$ac_ext
19118LIBS=$ac_check_lib_save_LIBS
19119fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019120{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19121echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19122if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019123 cat >>confdefs.h <<\_ACEOF
19124#define HAVE_OPENPTY 1
19125_ACEOF
19126 LIBS="$LIBS -lbsd"
19127fi
19128
19129
19130fi
19131
Fred Drake8cef4cf2000-06-28 16:40:38 +000019132
19133fi
19134done
19135
Martin v. Löwis11437992002-04-12 09:54:03 +000019136
Fred Drake8cef4cf2000-06-28 16:40:38 +000019137for ac_func in forkpty
19138do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019139as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19140{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19141echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019142if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019143 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019144else
Martin v. Löwis11437992002-04-12 09:54:03 +000019145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019146/* confdefs.h. */
19147_ACEOF
19148cat confdefs.h >>conftest.$ac_ext
19149cat >>conftest.$ac_ext <<_ACEOF
19150/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019151/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19152 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19153#define $ac_func innocuous_$ac_func
19154
Fred Drake8cef4cf2000-06-28 16:40:38 +000019155/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019156 which can conflict with char $ac_func (); below.
19157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019158 <limits.h> exists even on freestanding compilers. */
19159
19160#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019161# include <limits.h>
19162#else
19163# include <assert.h>
19164#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019165
19166#undef $ac_func
19167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019168/* Override any GCC internal prototype to avoid an error.
19169 Use char because int might match the return type of a GCC
19170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019171#ifdef __cplusplus
19172extern "C"
19173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019174char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019175/* The GNU C library defines this for functions which it implements
19176 to always fail with ENOSYS. Some functions are actually named
19177 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019179choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019180#endif
19181
Skip Montanaro6dead952003-09-25 14:50:04 +000019182int
19183main ()
19184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019185return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 ;
19187 return 0;
19188}
19189_ACEOF
19190rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019191if { (ac_try="$ac_link"
19192case "(($ac_try" in
19193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19194 *) ac_try_echo=$ac_try;;
19195esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019199 grep -v '^ *+' conftest.er1 >conftest.err
19200 rm -f conftest.er1
19201 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019203 (exit $ac_status); } && {
19204 test -z "$ac_c_werror_flag" ||
19205 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019206 } && test -s conftest$ac_exeext &&
19207 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019208 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019209else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019211sed 's/^/| /' conftest.$ac_ext >&5
19212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019213 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019215
19216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019217 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019218fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019219ac_res=`eval echo '${'$as_ac_var'}'`
19220 { echo "$as_me:$LINENO: result: $ac_res" >&5
19221echo "${ECHO_T}$ac_res" >&6; }
19222if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019223 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019224#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019225_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019226
Fred Drake8cef4cf2000-06-28 16:40:38 +000019227else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019228 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19229echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019230if test "${ac_cv_lib_util_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019231 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019232else
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019234LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019236/* confdefs.h. */
19237_ACEOF
19238cat confdefs.h >>conftest.$ac_ext
19239cat >>conftest.$ac_ext <<_ACEOF
19240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019242/* Override any GCC internal prototype to avoid an error.
19243 Use char because int might match the return type of a GCC
19244 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019245#ifdef __cplusplus
19246extern "C"
19247#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019248char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019249int
19250main ()
19251{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019252return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019253 ;
19254 return 0;
19255}
19256_ACEOF
19257rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019258if { (ac_try="$ac_link"
19259case "(($ac_try" in
19260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19261 *) ac_try_echo=$ac_try;;
19262esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019264 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019266 grep -v '^ *+' conftest.er1 >conftest.err
19267 rm -f conftest.er1
19268 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019270 (exit $ac_status); } && {
19271 test -z "$ac_c_werror_flag" ||
19272 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019273 } && test -s conftest$ac_exeext &&
19274 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019276else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019278sed 's/^/| /' conftest.$ac_ext >&5
19279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019282
19283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019285LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019286fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019287{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19288echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19289if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019290 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019291#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019292_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019293 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019294else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019295 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19296echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019297if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019298 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019299else
19300 ac_check_lib_save_LIBS=$LIBS
19301LIBS="-lbsd $LIBS"
19302cat >conftest.$ac_ext <<_ACEOF
19303/* confdefs.h. */
19304_ACEOF
19305cat confdefs.h >>conftest.$ac_ext
19306cat >>conftest.$ac_ext <<_ACEOF
19307/* end confdefs.h. */
19308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019309/* Override any GCC internal prototype to avoid an error.
19310 Use char because int might match the return type of a GCC
19311 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019312#ifdef __cplusplus
19313extern "C"
19314#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019315char forkpty ();
19316int
19317main ()
19318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019320 ;
19321 return 0;
19322}
19323_ACEOF
19324rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019325if { (ac_try="$ac_link"
19326case "(($ac_try" in
19327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19328 *) ac_try_echo=$ac_try;;
19329esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019332 ac_status=$?
19333 grep -v '^ *+' conftest.er1 >conftest.err
19334 rm -f conftest.er1
19335 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019337 (exit $ac_status); } && {
19338 test -z "$ac_c_werror_flag" ||
19339 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019340 } && test -s conftest$ac_exeext &&
19341 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019342 ac_cv_lib_bsd_forkpty=yes
19343else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019344 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019345sed 's/^/| /' conftest.$ac_ext >&5
19346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019347 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019349
19350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019351 conftest$ac_exeext conftest.$ac_ext
19352LIBS=$ac_check_lib_save_LIBS
19353fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019354{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19355echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19356if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019357 cat >>confdefs.h <<\_ACEOF
19358#define HAVE_FORKPTY 1
19359_ACEOF
19360 LIBS="$LIBS -lbsd"
19361fi
19362
19363
19364fi
19365
Fred Drake8cef4cf2000-06-28 16:40:38 +000019366
19367fi
19368done
19369
Jack Jansendd19cf82001-12-06 22:36:17 +000019370
Christian Heimesb186d002008-03-18 15:15:01 +000019371# Stuff for expat.
19372
19373for ac_func in memmove
19374do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019375as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19376{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19377echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019378if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019379 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019380else
19381 cat >conftest.$ac_ext <<_ACEOF
19382/* confdefs.h. */
19383_ACEOF
19384cat confdefs.h >>conftest.$ac_ext
19385cat >>conftest.$ac_ext <<_ACEOF
19386/* end confdefs.h. */
19387/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19388 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19389#define $ac_func innocuous_$ac_func
19390
19391/* System header to define __stub macros and hopefully few prototypes,
19392 which can conflict with char $ac_func (); below.
19393 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19394 <limits.h> exists even on freestanding compilers. */
19395
19396#ifdef __STDC__
19397# include <limits.h>
19398#else
19399# include <assert.h>
19400#endif
19401
19402#undef $ac_func
19403
19404/* Override any GCC internal prototype to avoid an error.
19405 Use char because int might match the return type of a GCC
19406 builtin and then its argument prototype would still apply. */
19407#ifdef __cplusplus
19408extern "C"
19409#endif
19410char $ac_func ();
19411/* The GNU C library defines this for functions which it implements
19412 to always fail with ENOSYS. Some functions are actually named
19413 something starting with __ and the normal name is an alias. */
19414#if defined __stub_$ac_func || defined __stub___$ac_func
19415choke me
19416#endif
19417
19418int
19419main ()
19420{
19421return $ac_func ();
19422 ;
19423 return 0;
19424}
19425_ACEOF
19426rm -f conftest.$ac_objext conftest$ac_exeext
19427if { (ac_try="$ac_link"
19428case "(($ac_try" in
19429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19430 *) ac_try_echo=$ac_try;;
19431esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019433 (eval "$ac_link") 2>conftest.er1
19434 ac_status=$?
19435 grep -v '^ *+' conftest.er1 >conftest.err
19436 rm -f conftest.er1
19437 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019439 (exit $ac_status); } && {
19440 test -z "$ac_c_werror_flag" ||
19441 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019442 } && test -s conftest$ac_exeext &&
19443 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019444 eval "$as_ac_var=yes"
19445else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019446 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019447sed 's/^/| /' conftest.$ac_ext >&5
19448
19449 eval "$as_ac_var=no"
19450fi
19451
19452rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19453 conftest$ac_exeext conftest.$ac_ext
19454fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019455ac_res=`eval echo '${'$as_ac_var'}'`
19456 { echo "$as_me:$LINENO: result: $ac_res" >&5
19457echo "${ECHO_T}$ac_res" >&6; }
19458if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019459 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019460#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019461_ACEOF
19462
19463fi
19464done
19465
19466
Michael W. Hudson54241132001-12-07 15:38:26 +000019467# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019468
19469
19470
19471
19472
19473
Fred Drake8cef4cf2000-06-28 16:40:38 +000019474for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19475do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019476as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19477{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19478echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019479if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019480 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019481else
Martin v. Löwis11437992002-04-12 09:54:03 +000019482 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019483/* confdefs.h. */
19484_ACEOF
19485cat confdefs.h >>conftest.$ac_ext
19486cat >>conftest.$ac_ext <<_ACEOF
19487/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019488/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19489 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19490#define $ac_func innocuous_$ac_func
19491
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019492/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019493 which can conflict with char $ac_func (); below.
19494 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019495 <limits.h> exists even on freestanding compilers. */
19496
19497#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019498# include <limits.h>
19499#else
19500# include <assert.h>
19501#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019502
19503#undef $ac_func
19504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019505/* Override any GCC internal prototype to avoid an error.
19506 Use char because int might match the return type of a GCC
19507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019508#ifdef __cplusplus
19509extern "C"
19510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019511char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019512/* The GNU C library defines this for functions which it implements
19513 to always fail with ENOSYS. Some functions are actually named
19514 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019515#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019516choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019517#endif
19518
Skip Montanaro6dead952003-09-25 14:50:04 +000019519int
19520main ()
19521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019522return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019523 ;
19524 return 0;
19525}
19526_ACEOF
19527rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019528if { (ac_try="$ac_link"
19529case "(($ac_try" in
19530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19531 *) ac_try_echo=$ac_try;;
19532esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019534 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019536 grep -v '^ *+' conftest.er1 >conftest.err
19537 rm -f conftest.er1
19538 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019540 (exit $ac_status); } && {
19541 test -z "$ac_c_werror_flag" ||
19542 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019543 } && test -s conftest$ac_exeext &&
19544 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019546else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019548sed 's/^/| /' conftest.$ac_ext >&5
19549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019550 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019552
19553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019554 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019555fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019556ac_res=`eval echo '${'$as_ac_var'}'`
19557 { echo "$as_me:$LINENO: result: $ac_res" >&5
19558echo "${ECHO_T}$ac_res" >&6; }
19559if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019560 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019561#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019562_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019564fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019565done
19566
Michael W. Hudson54241132001-12-07 15:38:26 +000019567
Martin v. Löwis11437992002-04-12 09:54:03 +000019568
19569
19570
Christian Heimesb186d002008-03-18 15:15:01 +000019571for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019572do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019573as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19574{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19575echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019577 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019578else
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019580/* confdefs.h. */
19581_ACEOF
19582cat confdefs.h >>conftest.$ac_ext
19583cat >>conftest.$ac_ext <<_ACEOF
19584/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019585/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19587#define $ac_func innocuous_$ac_func
19588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019589/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019590 which can conflict with char $ac_func (); below.
19591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019592 <limits.h> exists even on freestanding compilers. */
19593
19594#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019595# include <limits.h>
19596#else
19597# include <assert.h>
19598#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019599
19600#undef $ac_func
19601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019602/* Override any GCC internal prototype to avoid an error.
19603 Use char because int might match the return type of a GCC
19604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019605#ifdef __cplusplus
19606extern "C"
19607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019608char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019609/* The GNU C library defines this for functions which it implements
19610 to always fail with ENOSYS. Some functions are actually named
19611 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019613choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019614#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019615
Skip Montanaro6dead952003-09-25 14:50:04 +000019616int
19617main ()
19618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019619return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 ;
19621 return 0;
19622}
19623_ACEOF
19624rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019625if { (ac_try="$ac_link"
19626case "(($ac_try" in
19627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19628 *) ac_try_echo=$ac_try;;
19629esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019631 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019633 grep -v '^ *+' conftest.er1 >conftest.err
19634 rm -f conftest.er1
19635 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637 (exit $ac_status); } && {
19638 test -z "$ac_c_werror_flag" ||
19639 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019640 } && test -s conftest$ac_exeext &&
19641 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019643else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019645sed 's/^/| /' conftest.$ac_ext >&5
19646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019649
19650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019652fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019653ac_res=`eval echo '${'$as_ac_var'}'`
19654 { echo "$as_me:$LINENO: result: $ac_res" >&5
19655echo "${ECHO_T}$ac_res" >&6; }
19656if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019657 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019658#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019659_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019660
Martin v. Löwis1142de32002-03-29 16:28:31 +000019661else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019662 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019663 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019664 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19665 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019666esac
19667
Martin v. Löwis1142de32002-03-29 16:28:31 +000019668fi
19669done
19670
19671
Martin v. Löwis11437992002-04-12 09:54:03 +000019672
Martin v. Löwis1142de32002-03-29 16:28:31 +000019673for ac_func in getpgrp
19674do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019675as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19676{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19677echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019678if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019679 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019680else
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019682/* confdefs.h. */
19683_ACEOF
19684cat confdefs.h >>conftest.$ac_ext
19685cat >>conftest.$ac_ext <<_ACEOF
19686/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019687/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19688 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19689#define $ac_func innocuous_$ac_func
19690
Martin v. Löwis1142de32002-03-29 16:28:31 +000019691/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019692 which can conflict with char $ac_func (); below.
19693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019694 <limits.h> exists even on freestanding compilers. */
19695
19696#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019697# include <limits.h>
19698#else
19699# include <assert.h>
19700#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019701
19702#undef $ac_func
19703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019704/* Override any GCC internal prototype to avoid an error.
19705 Use char because int might match the return type of a GCC
19706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019707#ifdef __cplusplus
19708extern "C"
19709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019710char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019711/* The GNU C library defines this for functions which it implements
19712 to always fail with ENOSYS. Some functions are actually named
19713 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019714#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019715choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019716#endif
19717
Skip Montanaro6dead952003-09-25 14:50:04 +000019718int
19719main ()
19720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019721return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019722 ;
19723 return 0;
19724}
19725_ACEOF
19726rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727if { (ac_try="$ac_link"
19728case "(($ac_try" in
19729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19730 *) ac_try_echo=$ac_try;;
19731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019735 grep -v '^ *+' conftest.er1 >conftest.err
19736 rm -f conftest.er1
19737 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019739 (exit $ac_status); } && {
19740 test -z "$ac_c_werror_flag" ||
19741 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019742 } && test -s conftest$ac_exeext &&
19743 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019747sed 's/^/| /' conftest.$ac_ext >&5
19748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019751
19752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019753 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019754fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019755ac_res=`eval echo '${'$as_ac_var'}'`
19756 { echo "$as_me:$LINENO: result: $ac_res" >&5
19757echo "${ECHO_T}$ac_res" >&6; }
19758if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019759 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019761_ACEOF
19762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019763/* confdefs.h. */
19764_ACEOF
19765cat confdefs.h >>conftest.$ac_ext
19766cat >>conftest.$ac_ext <<_ACEOF
19767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019768#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019769int
19770main ()
19771{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019772getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019773 ;
19774 return 0;
19775}
19776_ACEOF
19777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019778if { (ac_try="$ac_compile"
19779case "(($ac_try" in
19780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19781 *) ac_try_echo=$ac_try;;
19782esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019786 grep -v '^ *+' conftest.er1 >conftest.err
19787 rm -f conftest.er1
19788 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790 (exit $ac_status); } && {
19791 test -z "$ac_c_werror_flag" ||
19792 test ! -s conftest.err
19793 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019794
19795cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019796#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019797_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019798
Martin v. Löwis11437992002-04-12 09:54:03 +000019799
Guido van Rossumf78abae1997-01-21 22:02:36 +000019800else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019802sed 's/^/| /' conftest.$ac_ext >&5
19803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019804
Guido van Rossum627b2d71993-12-24 10:39:16 +000019805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019806
19807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019808
Guido van Rossum627b2d71993-12-24 10:39:16 +000019809fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019810done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019811
Jack Jansen150753c2003-03-29 22:07:47 +000019812
19813for ac_func in setpgrp
19814do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019815as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19816{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19817echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019818if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019820else
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019822/* confdefs.h. */
19823_ACEOF
19824cat confdefs.h >>conftest.$ac_ext
19825cat >>conftest.$ac_ext <<_ACEOF
19826/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019827/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19828 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19829#define $ac_func innocuous_$ac_func
19830
Jack Jansen150753c2003-03-29 22:07:47 +000019831/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019832 which can conflict with char $ac_func (); below.
19833 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019834 <limits.h> exists even on freestanding compilers. */
19835
19836#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019837# include <limits.h>
19838#else
19839# include <assert.h>
19840#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019841
19842#undef $ac_func
19843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019844/* Override any GCC internal prototype to avoid an error.
19845 Use char because int might match the return type of a GCC
19846 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019847#ifdef __cplusplus
19848extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019849#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019850char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019851/* The GNU C library defines this for functions which it implements
19852 to always fail with ENOSYS. Some functions are actually named
19853 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019854#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019855choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019856#endif
19857
Skip Montanaro6dead952003-09-25 14:50:04 +000019858int
19859main ()
19860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019861return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019862 ;
19863 return 0;
19864}
19865_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019866rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019867if { (ac_try="$ac_link"
19868case "(($ac_try" in
19869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19870 *) ac_try_echo=$ac_try;;
19871esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019873 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019875 grep -v '^ *+' conftest.er1 >conftest.err
19876 rm -f conftest.er1
19877 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019879 (exit $ac_status); } && {
19880 test -z "$ac_c_werror_flag" ||
19881 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019882 } && test -s conftest$ac_exeext &&
19883 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019884 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019885else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019887sed 's/^/| /' conftest.$ac_ext >&5
19888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019891
19892rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019893 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019894fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019895ac_res=`eval echo '${'$as_ac_var'}'`
19896 { echo "$as_me:$LINENO: result: $ac_res" >&5
19897echo "${ECHO_T}$ac_res" >&6; }
19898if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019899 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019900#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019901_ACEOF
19902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019903/* confdefs.h. */
19904_ACEOF
19905cat confdefs.h >>conftest.$ac_ext
19906cat >>conftest.$ac_ext <<_ACEOF
19907/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019908#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019909int
19910main ()
19911{
19912setpgrp(0,0);
19913 ;
19914 return 0;
19915}
19916_ACEOF
19917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019918if { (ac_try="$ac_compile"
19919case "(($ac_try" in
19920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19921 *) ac_try_echo=$ac_try;;
19922esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019924 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019926 grep -v '^ *+' conftest.er1 >conftest.err
19927 rm -f conftest.er1
19928 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019930 (exit $ac_status); } && {
19931 test -z "$ac_c_werror_flag" ||
19932 test ! -s conftest.err
19933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019934
19935cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019936#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019937_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019938
Jack Jansen150753c2003-03-29 22:07:47 +000019939
19940else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019942sed 's/^/| /' conftest.$ac_ext >&5
19943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019944
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019946
19947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019948
19949fi
19950done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019951
Martin v. Löwis11437992002-04-12 09:54:03 +000019952
Thomas Wouters3a584202000-08-05 23:28:51 +000019953for ac_func in gettimeofday
19954do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019955as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19956{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19957echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019958if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000019959 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019960else
Martin v. Löwis11437992002-04-12 09:54:03 +000019961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019962/* confdefs.h. */
19963_ACEOF
19964cat confdefs.h >>conftest.$ac_ext
19965cat >>conftest.$ac_ext <<_ACEOF
19966/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019967/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19968 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19969#define $ac_func innocuous_$ac_func
19970
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019971/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019972 which can conflict with char $ac_func (); below.
19973 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019974 <limits.h> exists even on freestanding compilers. */
19975
19976#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019977# include <limits.h>
19978#else
19979# include <assert.h>
19980#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019981
19982#undef $ac_func
19983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019984/* Override any GCC internal prototype to avoid an error.
19985 Use char because int might match the return type of a GCC
19986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019987#ifdef __cplusplus
19988extern "C"
19989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019990char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019991/* The GNU C library defines this for functions which it implements
19992 to always fail with ENOSYS. Some functions are actually named
19993 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019994#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019995choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019996#endif
19997
Skip Montanaro6dead952003-09-25 14:50:04 +000019998int
19999main ()
20000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020001return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020002 ;
20003 return 0;
20004}
20005_ACEOF
20006rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020007if { (ac_try="$ac_link"
20008case "(($ac_try" in
20009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20010 *) ac_try_echo=$ac_try;;
20011esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020013 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020015 grep -v '^ *+' conftest.er1 >conftest.err
20016 rm -f conftest.er1
20017 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 (exit $ac_status); } && {
20020 test -z "$ac_c_werror_flag" ||
20021 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020022 } && test -s conftest$ac_exeext &&
20023 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020027sed 's/^/| /' conftest.$ac_ext >&5
20028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020029 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020031
20032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020033 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020034fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020035ac_res=`eval echo '${'$as_ac_var'}'`
20036 { echo "$as_me:$LINENO: result: $ac_res" >&5
20037echo "${ECHO_T}$ac_res" >&6; }
20038if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020039 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020040#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020041_ACEOF
20042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020043/* confdefs.h. */
20044_ACEOF
20045cat confdefs.h >>conftest.$ac_ext
20046cat >>conftest.$ac_ext <<_ACEOF
20047/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020048#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020049int
20050main ()
20051{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020052gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020053 ;
20054 return 0;
20055}
20056_ACEOF
20057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058if { (ac_try="$ac_compile"
20059case "(($ac_try" in
20060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20061 *) ac_try_echo=$ac_try;;
20062esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020066 grep -v '^ *+' conftest.er1 >conftest.err
20067 rm -f conftest.er1
20068 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020070 (exit $ac_status); } && {
20071 test -z "$ac_c_werror_flag" ||
20072 test ! -s conftest.err
20073 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020074 :
20075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020077sed 's/^/| /' conftest.$ac_ext >&5
20078
Martin v. Löwis11437992002-04-12 09:54:03 +000020079
20080cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020081#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020082_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020083
Martin v. Löwis11437992002-04-12 09:54:03 +000020084
Guido van Rossum627b2d71993-12-24 10:39:16 +000020085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020086
20087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020089fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020090done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020091
Michael W. Hudson54241132001-12-07 15:38:26 +000020092
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020093{ echo "$as_me:$LINENO: checking for major" >&5
20094echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020096/* confdefs.h. */
20097_ACEOF
20098cat confdefs.h >>conftest.$ac_ext
20099cat >>conftest.$ac_ext <<_ACEOF
20100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020101
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020102#if defined(MAJOR_IN_MKDEV)
20103#include <sys/mkdev.h>
20104#elif defined(MAJOR_IN_SYSMACROS)
20105#include <sys/sysmacros.h>
20106#else
20107#include <sys/types.h>
20108#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020109
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020110int
20111main ()
20112{
20113
20114 makedev(major(0),minor(0));
20115
20116 ;
20117 return 0;
20118}
20119_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020120rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020121if { (ac_try="$ac_link"
20122case "(($ac_try" in
20123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20124 *) ac_try_echo=$ac_try;;
20125esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020127 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020129 grep -v '^ *+' conftest.er1 >conftest.err
20130 rm -f conftest.er1
20131 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020133 (exit $ac_status); } && {
20134 test -z "$ac_c_werror_flag" ||
20135 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020136 } && test -s conftest$ac_exeext &&
20137 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020138
20139
20140cat >>confdefs.h <<\_ACEOF
20141#define HAVE_DEVICE_MACROS 1
20142_ACEOF
20143
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020144 { echo "$as_me:$LINENO: result: yes" >&5
20145echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020146
20147else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020149sed 's/^/| /' conftest.$ac_ext >&5
20150
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020151
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020152 { echo "$as_me:$LINENO: result: no" >&5
20153echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020154
20155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020156
20157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020158 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020159
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020160# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020161# for [no]getaddrinfo in netdb.h.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020162{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20163echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020164cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020165/* confdefs.h. */
20166_ACEOF
20167cat confdefs.h >>conftest.$ac_ext
20168cat >>conftest.$ac_ext <<_ACEOF
20169/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020170
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020171#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020172#include <sys/socket.h>
20173#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020174#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020175
Martin v. Löwis11437992002-04-12 09:54:03 +000020176int
20177main ()
20178{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020179getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 ;
20181 return 0;
20182}
20183_ACEOF
20184rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185if { (ac_try="$ac_link"
20186case "(($ac_try" in
20187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20188 *) ac_try_echo=$ac_try;;
20189esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020191 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020193 grep -v '^ *+' conftest.er1 >conftest.err
20194 rm -f conftest.er1
20195 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020197 (exit $ac_status); } && {
20198 test -z "$ac_c_werror_flag" ||
20199 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020200 } && test -s conftest$ac_exeext &&
20201 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020202 have_getaddrinfo=yes
20203else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020204 echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020205sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020207 have_getaddrinfo=no
20208fi
20209
20210rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20211 conftest$ac_exeext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020212{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20213echo "${ECHO_T}$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020214if test $have_getaddrinfo = yes
20215then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020216 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20217echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020218 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020219 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020220else
20221 if test "$cross_compiling" = yes; then
20222 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020223else
Martin v. Löwis11437992002-04-12 09:54:03 +000020224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020225/* confdefs.h. */
20226_ACEOF
20227cat confdefs.h >>conftest.$ac_ext
20228cat >>conftest.$ac_ext <<_ACEOF
20229/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020230
20231#include <sys/types.h>
20232#include <netdb.h>
20233#include <string.h>
20234#include <sys/socket.h>
20235#include <netinet/in.h>
20236
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020237int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020238{
20239 int passive, gaierr, inet4 = 0, inet6 = 0;
20240 struct addrinfo hints, *ai, *aitop;
20241 char straddr[INET6_ADDRSTRLEN], strport[16];
20242
20243 for (passive = 0; passive <= 1; passive++) {
20244 memset(&hints, 0, sizeof(hints));
20245 hints.ai_family = AF_UNSPEC;
20246 hints.ai_flags = passive ? AI_PASSIVE : 0;
20247 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020248 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020249 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20250 (void)gai_strerror(gaierr);
20251 goto bad;
20252 }
20253 for (ai = aitop; ai; ai = ai->ai_next) {
20254 if (ai->ai_addr == NULL ||
20255 ai->ai_addrlen == 0 ||
20256 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20257 straddr, sizeof(straddr), strport, sizeof(strport),
20258 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20259 goto bad;
20260 }
20261 switch (ai->ai_family) {
20262 case AF_INET:
20263 if (strcmp(strport, "54321") != 0) {
20264 goto bad;
20265 }
20266 if (passive) {
20267 if (strcmp(straddr, "0.0.0.0") != 0) {
20268 goto bad;
20269 }
20270 } else {
20271 if (strcmp(straddr, "127.0.0.1") != 0) {
20272 goto bad;
20273 }
20274 }
20275 inet4++;
20276 break;
20277 case AF_INET6:
20278 if (strcmp(strport, "54321") != 0) {
20279 goto bad;
20280 }
20281 if (passive) {
20282 if (strcmp(straddr, "::") != 0) {
20283 goto bad;
20284 }
20285 } else {
20286 if (strcmp(straddr, "::1") != 0) {
20287 goto bad;
20288 }
20289 }
20290 inet6++;
20291 break;
20292 case AF_UNSPEC:
20293 goto bad;
20294 break;
20295 default:
20296 /* another family support? */
20297 break;
20298 }
20299 }
20300 }
20301
20302 if (!(inet4 == 0 || inet4 == 2))
20303 goto bad;
20304 if (!(inet6 == 0 || inet6 == 2))
20305 goto bad;
20306
20307 if (aitop)
20308 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020309 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020310
20311 bad:
20312 if (aitop)
20313 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020314 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020315}
20316
Martin v. Löwis11437992002-04-12 09:54:03 +000020317_ACEOF
20318rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020319if { (ac_try="$ac_link"
20320case "(($ac_try" in
20321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20322 *) ac_try_echo=$ac_try;;
20323esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020325 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020326 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020328 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329 { (case "(($ac_try" in
20330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20331 *) ac_try_echo=$ac_try;;
20332esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020335 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020337 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020338 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020339else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020340 echo "$as_me: program exited with status $ac_status" >&5
20341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020342sed 's/^/| /' conftest.$ac_ext >&5
20343
Martin v. Löwis11437992002-04-12 09:54:03 +000020344( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020345ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020347rm -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 +000020348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349
20350
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020351fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020352
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020354
Mark Dickinson2df5d282009-12-31 21:22:50 +000020355if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020356then
20357 if test $ipv6 = yes
20358 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020359 echo 'Fatal: You must get working getaddrinfo() function.'
20360 echo ' or you can specify "--disable-ipv6"'.
20361 exit 1
20362 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020363else
Martin v. Löwis11437992002-04-12 09:54:03 +000020364
20365cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020366#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020367_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020368
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020370
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020371for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020372do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020378else
Martin v. Löwis11437992002-04-12 09:54:03 +000020379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020380/* confdefs.h. */
20381_ACEOF
20382cat confdefs.h >>conftest.$ac_ext
20383cat >>conftest.$ac_ext <<_ACEOF
20384/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20387#define $ac_func innocuous_$ac_func
20388
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020389/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020390 which can conflict with char $ac_func (); below.
20391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020392 <limits.h> exists even on freestanding compilers. */
20393
20394#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020395# include <limits.h>
20396#else
20397# include <assert.h>
20398#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020399
20400#undef $ac_func
20401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020402/* Override any GCC internal prototype to avoid an error.
20403 Use char because int might match the return type of a GCC
20404 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020405#ifdef __cplusplus
20406extern "C"
20407#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020408char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020409/* The GNU C library defines this for functions which it implements
20410 to always fail with ENOSYS. Some functions are actually named
20411 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020413choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020414#endif
20415
Skip Montanaro6dead952003-09-25 14:50:04 +000020416int
20417main ()
20418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020419return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020420 ;
20421 return 0;
20422}
20423_ACEOF
20424rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020425if { (ac_try="$ac_link"
20426case "(($ac_try" in
20427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20428 *) ac_try_echo=$ac_try;;
20429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020433 grep -v '^ *+' conftest.er1 >conftest.err
20434 rm -f conftest.er1
20435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020437 (exit $ac_status); } && {
20438 test -z "$ac_c_werror_flag" ||
20439 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020440 } && test -s conftest$ac_exeext &&
20441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020445sed 's/^/| /' conftest.$ac_ext >&5
20446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020449
20450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020451 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020453ac_res=`eval echo '${'$as_ac_var'}'`
20454 { echo "$as_me:$LINENO: result: $ac_res" >&5
20455echo "${ECHO_T}$ac_res" >&6; }
20456if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020459_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020460
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020461fi
20462done
20463
Michael W. Hudson54241132001-12-07 15:38:26 +000020464
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020465# checks for structures
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020466{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20467echo $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 +000020468if test "${ac_cv_header_time+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020470else
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020472/* confdefs.h. */
20473_ACEOF
20474cat confdefs.h >>conftest.$ac_ext
20475cat >>conftest.$ac_ext <<_ACEOF
20476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020477#include <sys/types.h>
20478#include <sys/time.h>
20479#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020480
Martin v. Löwis11437992002-04-12 09:54:03 +000020481int
20482main ()
20483{
20484if ((struct tm *) 0)
20485return 0;
20486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491if { (ac_try="$ac_compile"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
20506 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020507 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020508else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020510sed 's/^/| /' conftest.$ac_ext >&5
20511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020512 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020514
20515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020516fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020517{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20518echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020519if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020520
20521cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020522#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020523_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020524
20525fi
20526
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020527{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20528echo $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 +000020529if test "${ac_cv_struct_tm+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020531else
Martin v. Löwis11437992002-04-12 09:54:03 +000020532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020533/* confdefs.h. */
20534_ACEOF
20535cat confdefs.h >>conftest.$ac_ext
20536cat >>conftest.$ac_ext <<_ACEOF
20537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020538#include <sys/types.h>
20539#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020540
Martin v. Löwis11437992002-04-12 09:54:03 +000020541int
20542main ()
20543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020544struct tm tm;
20545 int *p = &tm.tm_sec;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020546 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 ;
20548 return 0;
20549}
20550_ACEOF
20551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020552if { (ac_try="$ac_compile"
20553case "(($ac_try" in
20554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20555 *) ac_try_echo=$ac_try;;
20556esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020560 grep -v '^ *+' conftest.er1 >conftest.err
20561 rm -f conftest.er1
20562 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020564 (exit $ac_status); } && {
20565 test -z "$ac_c_werror_flag" ||
20566 test ! -s conftest.err
20567 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020568 ac_cv_struct_tm=time.h
20569else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020571sed 's/^/| /' conftest.$ac_ext >&5
20572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020573 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020575
20576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020577fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020578{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20579echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020580if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020581
20582cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020583#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020585
20586fi
20587
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020588{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20589echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020590if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020591 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020592else
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020599#include <sys/types.h>
20600#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020601
20602
Martin v. Löwis11437992002-04-12 09:54:03 +000020603int
20604main ()
20605{
20606static struct tm ac_aggr;
20607if (ac_aggr.tm_zone)
20608return 0;
20609 ;
20610 return 0;
20611}
20612_ACEOF
20613rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020614if { (ac_try="$ac_compile"
20615case "(($ac_try" in
20616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20617 *) ac_try_echo=$ac_try;;
20618esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020622 grep -v '^ *+' conftest.er1 >conftest.err
20623 rm -f conftest.er1
20624 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020626 (exit $ac_status); } && {
20627 test -z "$ac_c_werror_flag" ||
20628 test ! -s conftest.err
20629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020631else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020633sed 's/^/| /' conftest.$ac_ext >&5
20634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020636/* confdefs.h. */
20637_ACEOF
20638cat confdefs.h >>conftest.$ac_ext
20639cat >>conftest.$ac_ext <<_ACEOF
20640/* end confdefs.h. */
20641#include <sys/types.h>
20642#include <$ac_cv_struct_tm>
20643
20644
20645int
20646main ()
20647{
20648static struct tm ac_aggr;
20649if (sizeof ac_aggr.tm_zone)
20650return 0;
20651 ;
20652 return 0;
20653}
20654_ACEOF
20655rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656if { (ac_try="$ac_compile"
20657case "(($ac_try" in
20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20659 *) ac_try_echo=$ac_try;;
20660esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020662 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020664 grep -v '^ *+' conftest.er1 >conftest.err
20665 rm -f conftest.er1
20666 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020668 (exit $ac_status); } && {
20669 test -z "$ac_c_werror_flag" ||
20670 test ! -s conftest.err
20671 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020672 ac_cv_member_struct_tm_tm_zone=yes
20673else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020675sed 's/^/| /' conftest.$ac_ext >&5
20676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020679
20680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020682
20683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020684fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020685{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20686echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20687if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020688
20689cat >>confdefs.h <<_ACEOF
20690#define HAVE_STRUCT_TM_TM_ZONE 1
20691_ACEOF
20692
20693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020695
Martin v. Löwis11437992002-04-12 09:54:03 +000020696if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20697
20698cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020699#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020700_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020701
20702else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020703 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20704echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020705if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020706 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020707else
20708 cat >conftest.$ac_ext <<_ACEOF
20709/* confdefs.h. */
20710_ACEOF
20711cat confdefs.h >>conftest.$ac_ext
20712cat >>conftest.$ac_ext <<_ACEOF
20713/* end confdefs.h. */
20714#include <time.h>
20715
20716int
20717main ()
20718{
20719#ifndef tzname
20720 (void) tzname;
20721#endif
20722
20723 ;
20724 return 0;
20725}
20726_ACEOF
20727rm -f conftest.$ac_objext
20728if { (ac_try="$ac_compile"
20729case "(($ac_try" in
20730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20731 *) ac_try_echo=$ac_try;;
20732esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020734 (eval "$ac_compile") 2>conftest.er1
20735 ac_status=$?
20736 grep -v '^ *+' conftest.er1 >conftest.err
20737 rm -f conftest.er1
20738 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020740 (exit $ac_status); } && {
20741 test -z "$ac_c_werror_flag" ||
20742 test ! -s conftest.err
20743 } && test -s conftest.$ac_objext; then
20744 ac_cv_have_decl_tzname=yes
20745else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020746 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020747sed 's/^/| /' conftest.$ac_ext >&5
20748
20749 ac_cv_have_decl_tzname=no
20750fi
20751
20752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20753fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020754{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20755echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20756if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757
20758cat >>confdefs.h <<_ACEOF
20759#define HAVE_DECL_TZNAME 1
20760_ACEOF
20761
20762
20763else
20764 cat >>confdefs.h <<_ACEOF
20765#define HAVE_DECL_TZNAME 0
20766_ACEOF
20767
20768
20769fi
20770
20771
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020772 { echo "$as_me:$LINENO: checking for tzname" >&5
20773echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020774if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020776else
Martin v. Löwis11437992002-04-12 09:54:03 +000020777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020778/* confdefs.h. */
20779_ACEOF
20780cat confdefs.h >>conftest.$ac_ext
20781cat >>conftest.$ac_ext <<_ACEOF
20782/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020783#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020784#if !HAVE_DECL_TZNAME
20785extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020787
Martin v. Löwis11437992002-04-12 09:54:03 +000020788int
20789main ()
20790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020791return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020792 ;
20793 return 0;
20794}
20795_ACEOF
20796rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020797if { (ac_try="$ac_link"
20798case "(($ac_try" in
20799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20800 *) ac_try_echo=$ac_try;;
20801esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020803 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020805 grep -v '^ *+' conftest.er1 >conftest.err
20806 rm -f conftest.er1
20807 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 (exit $ac_status); } && {
20810 test -z "$ac_c_werror_flag" ||
20811 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020812 } && test -s conftest$ac_exeext &&
20813 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020814 ac_cv_var_tzname=yes
20815else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020817sed 's/^/| /' conftest.$ac_ext >&5
20818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020821
20822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020823 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020824fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020825{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20826echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020827 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020828
20829cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020830#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020831_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020833 fi
20834fi
20835
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020836{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20837echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020838if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020839 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020840else
20841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020842/* confdefs.h. */
20843_ACEOF
20844cat confdefs.h >>conftest.$ac_ext
20845cat >>conftest.$ac_ext <<_ACEOF
20846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020847$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020848int
20849main ()
20850{
20851static struct stat ac_aggr;
20852if (ac_aggr.st_rdev)
20853return 0;
20854 ;
20855 return 0;
20856}
20857_ACEOF
20858rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020859if { (ac_try="$ac_compile"
20860case "(($ac_try" in
20861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20862 *) ac_try_echo=$ac_try;;
20863esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020867 grep -v '^ *+' conftest.er1 >conftest.err
20868 rm -f conftest.er1
20869 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871 (exit $ac_status); } && {
20872 test -z "$ac_c_werror_flag" ||
20873 test ! -s conftest.err
20874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 ac_cv_member_struct_stat_st_rdev=yes
20876else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020878sed 's/^/| /' conftest.$ac_ext >&5
20879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020881/* confdefs.h. */
20882_ACEOF
20883cat confdefs.h >>conftest.$ac_ext
20884cat >>conftest.$ac_ext <<_ACEOF
20885/* end confdefs.h. */
20886$ac_includes_default
20887int
20888main ()
20889{
20890static struct stat ac_aggr;
20891if (sizeof ac_aggr.st_rdev)
20892return 0;
20893 ;
20894 return 0;
20895}
20896_ACEOF
20897rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898if { (ac_try="$ac_compile"
20899case "(($ac_try" in
20900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20901 *) ac_try_echo=$ac_try;;
20902esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020906 grep -v '^ *+' conftest.er1 >conftest.err
20907 rm -f conftest.er1
20908 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910 (exit $ac_status); } && {
20911 test -z "$ac_c_werror_flag" ||
20912 test ! -s conftest.err
20913 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020914 ac_cv_member_struct_stat_st_rdev=yes
20915else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020917sed 's/^/| /' conftest.$ac_ext >&5
20918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020921
20922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924
20925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020926fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020927{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20928echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20929if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020930
20931cat >>confdefs.h <<_ACEOF
20932#define HAVE_STRUCT_STAT_ST_RDEV 1
20933_ACEOF
20934
20935
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020936fi
20937
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020938{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20939echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020940if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020941 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020942else
Martin v. Löwis11437992002-04-12 09:54:03 +000020943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020944/* confdefs.h. */
20945_ACEOF
20946cat confdefs.h >>conftest.$ac_ext
20947cat >>conftest.$ac_ext <<_ACEOF
20948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020950int
20951main ()
20952{
20953static struct stat ac_aggr;
20954if (ac_aggr.st_blksize)
20955return 0;
20956 ;
20957 return 0;
20958}
20959_ACEOF
20960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020961if { (ac_try="$ac_compile"
20962case "(($ac_try" in
20963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20964 *) ac_try_echo=$ac_try;;
20965esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020969 grep -v '^ *+' conftest.er1 >conftest.err
20970 rm -f conftest.er1
20971 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020973 (exit $ac_status); } && {
20974 test -z "$ac_c_werror_flag" ||
20975 test ! -s conftest.err
20976 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020977 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020978else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000020979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020980sed 's/^/| /' conftest.$ac_ext >&5
20981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020983/* confdefs.h. */
20984_ACEOF
20985cat confdefs.h >>conftest.$ac_ext
20986cat >>conftest.$ac_ext <<_ACEOF
20987/* end confdefs.h. */
20988$ac_includes_default
20989int
20990main ()
20991{
20992static struct stat ac_aggr;
20993if (sizeof ac_aggr.st_blksize)
20994return 0;
20995 ;
20996 return 0;
20997}
20998_ACEOF
20999rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021000if { (ac_try="$ac_compile"
21001case "(($ac_try" in
21002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21003 *) ac_try_echo=$ac_try;;
21004esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021006 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021008 grep -v '^ *+' conftest.er1 >conftest.err
21009 rm -f conftest.er1
21010 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021012 (exit $ac_status); } && {
21013 test -z "$ac_c_werror_flag" ||
21014 test ! -s conftest.err
21015 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021016 ac_cv_member_struct_stat_st_blksize=yes
21017else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021019sed 's/^/| /' conftest.$ac_ext >&5
21020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021021 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021023
21024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026
21027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021028fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021029{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21030echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21031if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021032
Martin v. Löwis11437992002-04-12 09:54:03 +000021033cat >>confdefs.h <<_ACEOF
21034#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21035_ACEOF
21036
21037
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021038fi
21039
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021040{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21041echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021042if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021043 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021044else
21045 cat >conftest.$ac_ext <<_ACEOF
21046/* confdefs.h. */
21047_ACEOF
21048cat confdefs.h >>conftest.$ac_ext
21049cat >>conftest.$ac_ext <<_ACEOF
21050/* end confdefs.h. */
21051$ac_includes_default
21052int
21053main ()
21054{
21055static struct stat ac_aggr;
21056if (ac_aggr.st_flags)
21057return 0;
21058 ;
21059 return 0;
21060}
21061_ACEOF
21062rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021063if { (ac_try="$ac_compile"
21064case "(($ac_try" in
21065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21066 *) ac_try_echo=$ac_try;;
21067esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021069 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021070 ac_status=$?
21071 grep -v '^ *+' conftest.er1 >conftest.err
21072 rm -f conftest.er1
21073 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021075 (exit $ac_status); } && {
21076 test -z "$ac_c_werror_flag" ||
21077 test ! -s conftest.err
21078 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021079 ac_cv_member_struct_stat_st_flags=yes
21080else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021081 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021082sed 's/^/| /' conftest.$ac_ext >&5
21083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021085/* confdefs.h. */
21086_ACEOF
21087cat confdefs.h >>conftest.$ac_ext
21088cat >>conftest.$ac_ext <<_ACEOF
21089/* end confdefs.h. */
21090$ac_includes_default
21091int
21092main ()
21093{
21094static struct stat ac_aggr;
21095if (sizeof ac_aggr.st_flags)
21096return 0;
21097 ;
21098 return 0;
21099}
21100_ACEOF
21101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102if { (ac_try="$ac_compile"
21103case "(($ac_try" in
21104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21105 *) ac_try_echo=$ac_try;;
21106esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021109 ac_status=$?
21110 grep -v '^ *+' conftest.er1 >conftest.err
21111 rm -f conftest.er1
21112 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021114 (exit $ac_status); } && {
21115 test -z "$ac_c_werror_flag" ||
21116 test ! -s conftest.err
21117 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021118 ac_cv_member_struct_stat_st_flags=yes
21119else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021120 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021121sed 's/^/| /' conftest.$ac_ext >&5
21122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021123 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125
21126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128
21129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021130fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021131{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21132echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21133if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021134
21135cat >>confdefs.h <<_ACEOF
21136#define HAVE_STRUCT_STAT_ST_FLAGS 1
21137_ACEOF
21138
21139
21140fi
21141
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021142{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21143echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021144if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021146else
21147 cat >conftest.$ac_ext <<_ACEOF
21148/* confdefs.h. */
21149_ACEOF
21150cat confdefs.h >>conftest.$ac_ext
21151cat >>conftest.$ac_ext <<_ACEOF
21152/* end confdefs.h. */
21153$ac_includes_default
21154int
21155main ()
21156{
21157static struct stat ac_aggr;
21158if (ac_aggr.st_gen)
21159return 0;
21160 ;
21161 return 0;
21162}
21163_ACEOF
21164rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021165if { (ac_try="$ac_compile"
21166case "(($ac_try" in
21167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21168 *) ac_try_echo=$ac_try;;
21169esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021172 ac_status=$?
21173 grep -v '^ *+' conftest.er1 >conftest.err
21174 rm -f conftest.er1
21175 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021177 (exit $ac_status); } && {
21178 test -z "$ac_c_werror_flag" ||
21179 test ! -s conftest.err
21180 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021181 ac_cv_member_struct_stat_st_gen=yes
21182else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021183 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021184sed 's/^/| /' conftest.$ac_ext >&5
21185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021186 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021187/* confdefs.h. */
21188_ACEOF
21189cat confdefs.h >>conftest.$ac_ext
21190cat >>conftest.$ac_ext <<_ACEOF
21191/* end confdefs.h. */
21192$ac_includes_default
21193int
21194main ()
21195{
21196static struct stat ac_aggr;
21197if (sizeof ac_aggr.st_gen)
21198return 0;
21199 ;
21200 return 0;
21201}
21202_ACEOF
21203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021204if { (ac_try="$ac_compile"
21205case "(($ac_try" in
21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207 *) ac_try_echo=$ac_try;;
21208esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021211 ac_status=$?
21212 grep -v '^ *+' conftest.er1 >conftest.err
21213 rm -f conftest.er1
21214 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216 (exit $ac_status); } && {
21217 test -z "$ac_c_werror_flag" ||
21218 test ! -s conftest.err
21219 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021220 ac_cv_member_struct_stat_st_gen=yes
21221else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021222 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021223sed 's/^/| /' conftest.$ac_ext >&5
21224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021225 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021227
21228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230
21231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021232fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021233{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21234echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21235if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021236
21237cat >>confdefs.h <<_ACEOF
21238#define HAVE_STRUCT_STAT_ST_GEN 1
21239_ACEOF
21240
21241
21242fi
21243
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021244{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21245echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021246if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021247 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021248else
21249 cat >conftest.$ac_ext <<_ACEOF
21250/* confdefs.h. */
21251_ACEOF
21252cat confdefs.h >>conftest.$ac_ext
21253cat >>conftest.$ac_ext <<_ACEOF
21254/* end confdefs.h. */
21255$ac_includes_default
21256int
21257main ()
21258{
21259static struct stat ac_aggr;
21260if (ac_aggr.st_birthtime)
21261return 0;
21262 ;
21263 return 0;
21264}
21265_ACEOF
21266rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021267if { (ac_try="$ac_compile"
21268case "(($ac_try" in
21269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21270 *) ac_try_echo=$ac_try;;
21271esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021274 ac_status=$?
21275 grep -v '^ *+' conftest.er1 >conftest.err
21276 rm -f conftest.er1
21277 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021279 (exit $ac_status); } && {
21280 test -z "$ac_c_werror_flag" ||
21281 test ! -s conftest.err
21282 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021283 ac_cv_member_struct_stat_st_birthtime=yes
21284else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021285 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021286sed 's/^/| /' conftest.$ac_ext >&5
21287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021288 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021289/* confdefs.h. */
21290_ACEOF
21291cat confdefs.h >>conftest.$ac_ext
21292cat >>conftest.$ac_ext <<_ACEOF
21293/* end confdefs.h. */
21294$ac_includes_default
21295int
21296main ()
21297{
21298static struct stat ac_aggr;
21299if (sizeof ac_aggr.st_birthtime)
21300return 0;
21301 ;
21302 return 0;
21303}
21304_ACEOF
21305rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021306if { (ac_try="$ac_compile"
21307case "(($ac_try" in
21308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21309 *) ac_try_echo=$ac_try;;
21310esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021313 ac_status=$?
21314 grep -v '^ *+' conftest.er1 >conftest.err
21315 rm -f conftest.er1
21316 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318 (exit $ac_status); } && {
21319 test -z "$ac_c_werror_flag" ||
21320 test ! -s conftest.err
21321 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021322 ac_cv_member_struct_stat_st_birthtime=yes
21323else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021324 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021325sed 's/^/| /' conftest.$ac_ext >&5
21326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021327 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021329
21330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021332
21333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021334fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021335{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21336echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21337if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021338
21339cat >>confdefs.h <<_ACEOF
21340#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21341_ACEOF
21342
21343
21344fi
21345
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021346{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21347echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021348if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021350else
Martin v. Löwis11437992002-04-12 09:54:03 +000021351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021352/* confdefs.h. */
21353_ACEOF
21354cat confdefs.h >>conftest.$ac_ext
21355cat >>conftest.$ac_ext <<_ACEOF
21356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021358int
21359main ()
21360{
21361static struct stat ac_aggr;
21362if (ac_aggr.st_blocks)
21363return 0;
21364 ;
21365 return 0;
21366}
21367_ACEOF
21368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021369if { (ac_try="$ac_compile"
21370case "(($ac_try" in
21371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21372 *) ac_try_echo=$ac_try;;
21373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021377 grep -v '^ *+' conftest.er1 >conftest.err
21378 rm -f conftest.er1
21379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381 (exit $ac_status); } && {
21382 test -z "$ac_c_werror_flag" ||
21383 test ! -s conftest.err
21384 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021385 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021386else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021388sed 's/^/| /' conftest.$ac_ext >&5
21389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021391/* confdefs.h. */
21392_ACEOF
21393cat confdefs.h >>conftest.$ac_ext
21394cat >>conftest.$ac_ext <<_ACEOF
21395/* end confdefs.h. */
21396$ac_includes_default
21397int
21398main ()
21399{
21400static struct stat ac_aggr;
21401if (sizeof ac_aggr.st_blocks)
21402return 0;
21403 ;
21404 return 0;
21405}
21406_ACEOF
21407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021408if { (ac_try="$ac_compile"
21409case "(($ac_try" in
21410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21411 *) ac_try_echo=$ac_try;;
21412esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021416 grep -v '^ *+' conftest.er1 >conftest.err
21417 rm -f conftest.er1
21418 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420 (exit $ac_status); } && {
21421 test -z "$ac_c_werror_flag" ||
21422 test ! -s conftest.err
21423 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021424 ac_cv_member_struct_stat_st_blocks=yes
21425else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021427sed 's/^/| /' conftest.$ac_ext >&5
21428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431
21432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021434
21435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021436fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021437{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21438echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21439if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021440
Martin v. Löwis11437992002-04-12 09:54:03 +000021441cat >>confdefs.h <<_ACEOF
21442#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21443_ACEOF
21444
21445
21446cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021447#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021448_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021449
21450else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021451 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021452 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021453 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21454 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021455esac
21456
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021457fi
21458
Michael W. Hudson54241132001-12-07 15:38:26 +000021459
Martin v. Löwis11437992002-04-12 09:54:03 +000021460
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021461{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21462echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021463if test "${ac_cv_header_time_altzone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021464 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021465else
Martin v. Löwis11437992002-04-12 09:54:03 +000021466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021472#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021473int
21474main ()
21475{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021476return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021477 ;
21478 return 0;
21479}
21480_ACEOF
21481rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021482if { (ac_try="$ac_compile"
21483case "(($ac_try" in
21484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21485 *) ac_try_echo=$ac_try;;
21486esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021490 grep -v '^ *+' conftest.er1 >conftest.err
21491 rm -f conftest.er1
21492 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021494 (exit $ac_status); } && {
21495 test -z "$ac_c_werror_flag" ||
21496 test ! -s conftest.err
21497 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021498 ac_cv_header_time_altzone=yes
21499else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021501sed 's/^/| /' conftest.$ac_ext >&5
21502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021503 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021504fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21507fi
21508
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021509{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21510echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021511if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021512
21513cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021514#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021515_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021516
21517fi
21518
Guido van Rossumda88dad1995-01-26 00:46:29 +000021519was_it_defined=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021520{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21521echo $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 +000021522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021523/* confdefs.h. */
21524_ACEOF
21525cat confdefs.h >>conftest.$ac_ext
21526cat >>conftest.$ac_ext <<_ACEOF
21527/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021528
21529#include <sys/types.h>
21530#include <sys/select.h>
21531#include <sys/time.h>
21532
Martin v. Löwis11437992002-04-12 09:54:03 +000021533int
21534main ()
21535{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021536;
Martin v. Löwis11437992002-04-12 09:54:03 +000021537 ;
21538 return 0;
21539}
21540_ACEOF
21541rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021542if { (ac_try="$ac_compile"
21543case "(($ac_try" in
21544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21545 *) ac_try_echo=$ac_try;;
21546esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021550 grep -v '^ *+' conftest.er1 >conftest.err
21551 rm -f conftest.er1
21552 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021554 (exit $ac_status); } && {
21555 test -z "$ac_c_werror_flag" ||
21556 test ! -s conftest.err
21557 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021558
21559
21560cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021561#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021562_ACEOF
21563
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021564 was_it_defined=yes
21565
Guido van Rossumf78abae1997-01-21 22:02:36 +000021566else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021568sed 's/^/| /' conftest.$ac_ext >&5
21569
Thomas Wouters477c8d52006-05-27 19:21:47 +000021570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021571fi
21572
21573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021574{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21575echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021577{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21578echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021579if test "${ac_cv_struct_addrinfo+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021581else
Martin v. Löwis11437992002-04-12 09:54:03 +000021582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021588
21589# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021590int
21591main ()
21592{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021593struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021594 ;
21595 return 0;
21596}
21597_ACEOF
21598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599if { (ac_try="$ac_compile"
21600case "(($ac_try" in
21601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21602 *) ac_try_echo=$ac_try;;
21603esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021607 grep -v '^ *+' conftest.er1 >conftest.err
21608 rm -f conftest.er1
21609 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021611 (exit $ac_status); } && {
21612 test -z "$ac_c_werror_flag" ||
21613 test ! -s conftest.err
21614 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021615 ac_cv_struct_addrinfo=yes
21616else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021618sed 's/^/| /' conftest.$ac_ext >&5
21619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021620 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021621fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21624fi
21625
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021626{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21627echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021628if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021629
21630cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021631#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021632_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021633
21634fi
21635
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021636{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21637echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021638if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021639 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021640else
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021642/* confdefs.h. */
21643_ACEOF
21644cat confdefs.h >>conftest.$ac_ext
21645cat >>conftest.$ac_ext <<_ACEOF
21646/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021647
21648# include <sys/types.h>
21649# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021650int
21651main ()
21652{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021653struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021654 ;
21655 return 0;
21656}
21657_ACEOF
21658rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021659if { (ac_try="$ac_compile"
21660case "(($ac_try" in
21661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21662 *) ac_try_echo=$ac_try;;
21663esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021667 grep -v '^ *+' conftest.er1 >conftest.err
21668 rm -f conftest.er1
21669 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021671 (exit $ac_status); } && {
21672 test -z "$ac_c_werror_flag" ||
21673 test ! -s conftest.err
21674 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021675 ac_cv_struct_sockaddr_storage=yes
21676else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021678sed 's/^/| /' conftest.$ac_ext >&5
21679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021680 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021681fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21684fi
21685
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021686{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21687echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021688if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021689
21690cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021691#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021692_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021693
21694fi
21695
Guido van Rossum627b2d71993-12-24 10:39:16 +000021696# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021697
Michael W. Hudson54241132001-12-07 15:38:26 +000021698
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021699{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21700echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021701if test "${ac_cv_c_char_unsigned+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021702 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021703else
Martin v. Löwis11437992002-04-12 09:54:03 +000021704 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021705/* confdefs.h. */
21706_ACEOF
21707cat confdefs.h >>conftest.$ac_ext
21708cat >>conftest.$ac_ext <<_ACEOF
21709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021710$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021711int
21712main ()
21713{
21714static int test_array [1 - 2 * !(((char) -1) < 0)];
21715test_array [0] = 0
21716
21717 ;
21718 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021719}
Martin v. Löwis11437992002-04-12 09:54:03 +000021720_ACEOF
21721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021722if { (ac_try="$ac_compile"
21723case "(($ac_try" in
21724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21725 *) ac_try_echo=$ac_try;;
21726esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021730 grep -v '^ *+' conftest.er1 >conftest.err
21731 rm -f conftest.er1
21732 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021734 (exit $ac_status); } && {
21735 test -z "$ac_c_werror_flag" ||
21736 test ! -s conftest.err
21737 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021738 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021739else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021741sed 's/^/| /' conftest.$ac_ext >&5
21742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021743 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021745
21746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021747fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021748{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21749echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021750if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021751 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021752#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021753_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021754
21755fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021756
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021757{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21758echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021759if test "${ac_cv_c_const+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021760 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021761else
21762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021763/* confdefs.h. */
21764_ACEOF
21765cat confdefs.h >>conftest.$ac_ext
21766cat >>conftest.$ac_ext <<_ACEOF
21767/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021768
Martin v. Löwis11437992002-04-12 09:54:03 +000021769int
21770main ()
21771{
21772/* FIXME: Include the comments suggested by Paul. */
21773#ifndef __cplusplus
21774 /* Ultrix mips cc rejects this. */
21775 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021776 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021777 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778 char const *const *pcpcc;
21779 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021780 /* NEC SVR4.0.2 mips cc rejects this. */
21781 struct point {int x, y;};
21782 static struct point const zero = {0,0};
21783 /* AIX XL C 1.02.0.0 rejects this.
21784 It does not let you subtract one const X* pointer from another in
21785 an arm of an if-expression whose if-part is not a constant
21786 expression */
21787 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021789 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021790 ++pcpcc;
21791 ppc = (char**) pcpcc;
21792 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021793 { /* SCO 3.2v4 cc rejects this. */
21794 char *t;
21795 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021796
Martin v. Löwis11437992002-04-12 09:54:03 +000021797 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 }
21800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21801 int x[] = {25, 17};
21802 const int *foo = &x[0];
21803 ++foo;
21804 }
21805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21806 typedef const int *iptr;
21807 iptr p = 0;
21808 ++p;
21809 }
21810 { /* AIX XL C 1.02.0.0 rejects this saying
21811 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21812 struct s { int j; const int *ap[3]; };
21813 struct s *b; b->j = 5;
21814 }
21815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21816 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021817 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021818 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021819 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021820#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021821
Martin v. Löwis11437992002-04-12 09:54:03 +000021822 ;
21823 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021824}
Martin v. Löwis11437992002-04-12 09:54:03 +000021825_ACEOF
21826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021827if { (ac_try="$ac_compile"
21828case "(($ac_try" in
21829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21830 *) ac_try_echo=$ac_try;;
21831esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021834 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021835 grep -v '^ *+' conftest.er1 >conftest.err
21836 rm -f conftest.er1
21837 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839 (exit $ac_status); } && {
21840 test -z "$ac_c_werror_flag" ||
21841 test ! -s conftest.err
21842 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021843 ac_cv_c_const=yes
21844else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021846sed 's/^/| /' conftest.$ac_ext >&5
21847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021848 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021850
21851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021852fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021853{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21854echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021855if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021856
21857cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021858#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021859_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021860
21861fi
21862
Michael W. Hudson54241132001-12-07 15:38:26 +000021863
Guido van Rossumda88dad1995-01-26 00:46:29 +000021864works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021865{ echo "$as_me:$LINENO: checking for working volatile" >&5
21866echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021868/* confdefs.h. */
21869_ACEOF
21870cat confdefs.h >>conftest.$ac_ext
21871cat >>conftest.$ac_ext <<_ACEOF
21872/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021873
Martin v. Löwis11437992002-04-12 09:54:03 +000021874int
21875main ()
21876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021877volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021878 ;
21879 return 0;
21880}
21881_ACEOF
21882rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021883if { (ac_try="$ac_compile"
21884case "(($ac_try" in
21885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21886 *) ac_try_echo=$ac_try;;
21887esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021891 grep -v '^ *+' conftest.er1 >conftest.err
21892 rm -f conftest.er1
21893 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021895 (exit $ac_status); } && {
21896 test -z "$ac_c_werror_flag" ||
21897 test ! -s conftest.err
21898 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021899 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021902sed 's/^/| /' conftest.$ac_ext >&5
21903
Martin v. Löwis11437992002-04-12 09:54:03 +000021904
21905cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021906#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021909
Guido van Rossum627b2d71993-12-24 10:39:16 +000021910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911
21912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021913{ echo "$as_me:$LINENO: result: $works" >&5
21914echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021915
Guido van Rossumda88dad1995-01-26 00:46:29 +000021916works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021917{ echo "$as_me:$LINENO: checking for working signed char" >&5
21918echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021920/* confdefs.h. */
21921_ACEOF
21922cat confdefs.h >>conftest.$ac_ext
21923cat >>conftest.$ac_ext <<_ACEOF
21924/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021925
Martin v. Löwis11437992002-04-12 09:54:03 +000021926int
21927main ()
21928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021929signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021930 ;
21931 return 0;
21932}
21933_ACEOF
21934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021935if { (ac_try="$ac_compile"
21936case "(($ac_try" in
21937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21938 *) ac_try_echo=$ac_try;;
21939esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021943 grep -v '^ *+' conftest.er1 >conftest.err
21944 rm -f conftest.er1
21945 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021947 (exit $ac_status); } && {
21948 test -z "$ac_c_werror_flag" ||
21949 test ! -s conftest.err
21950 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021951 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021952else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021954sed 's/^/| /' conftest.$ac_ext >&5
21955
Martin v. Löwis11437992002-04-12 09:54:03 +000021956
21957cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021958#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021959_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021960
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021961
Guido van Rossum7f43da71994-08-01 12:15:30 +000021962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963
21964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021965{ echo "$as_me:$LINENO: result: $works" >&5
21966echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021967
Guido van Rossumda88dad1995-01-26 00:46:29 +000021968have_prototypes=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021969{ echo "$as_me:$LINENO: checking for prototypes" >&5
21970echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021972/* confdefs.h. */
21973_ACEOF
21974cat confdefs.h >>conftest.$ac_ext
21975cat >>conftest.$ac_ext <<_ACEOF
21976/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021977int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021978int
21979main ()
21980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021981return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021982 ;
21983 return 0;
21984}
21985_ACEOF
21986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021987if { (ac_try="$ac_compile"
21988case "(($ac_try" in
21989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21990 *) ac_try_echo=$ac_try;;
21991esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021995 grep -v '^ *+' conftest.er1 >conftest.err
21996 rm -f conftest.er1
21997 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000021998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021999 (exit $ac_status); } && {
22000 test -z "$ac_c_werror_flag" ||
22001 test ! -s conftest.err
22002 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022003
22004
22005cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022006#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022007_ACEOF
22008
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022009 have_prototypes=yes
22010
Guido van Rossumf78abae1997-01-21 22:02:36 +000022011else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022013sed 's/^/| /' conftest.$ac_ext >&5
22014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022015
Guido van Rossum7f43da71994-08-01 12:15:30 +000022016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022017
22018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022019{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22020echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022021
Guido van Rossumda88dad1995-01-26 00:46:29 +000022022works=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022023{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22024echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022025cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022026/* confdefs.h. */
22027_ACEOF
22028cat confdefs.h >>conftest.$ac_ext
22029cat >>conftest.$ac_ext <<_ACEOF
22030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022031
22032#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022033int foo(int x, ...) {
22034 va_list va;
22035 va_start(va, x);
22036 va_arg(va, int);
22037 va_arg(va, char *);
22038 va_arg(va, double);
22039 return 0;
22040}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022041
Martin v. Löwis11437992002-04-12 09:54:03 +000022042int
22043main ()
22044{
Guido van Rossum90eea071996-08-30 20:58:57 +000022045return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022046 ;
22047 return 0;
22048}
22049_ACEOF
22050rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022051if { (ac_try="$ac_compile"
22052case "(($ac_try" in
22053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22054 *) ac_try_echo=$ac_try;;
22055esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022059 grep -v '^ *+' conftest.er1 >conftest.err
22060 rm -f conftest.er1
22061 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022063 (exit $ac_status); } && {
22064 test -z "$ac_c_werror_flag" ||
22065 test ! -s conftest.err
22066 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022067
22068
22069cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022070#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022071_ACEOF
22072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022073 works=yes
22074
Guido van Rossumf78abae1997-01-21 22:02:36 +000022075else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022076 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022077sed 's/^/| /' conftest.$ac_ext >&5
22078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022079
Guido van Rossum627b2d71993-12-24 10:39:16 +000022080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022081
22082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022083{ echo "$as_me:$LINENO: result: $works" >&5
22084echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022085
Martin v. Löwisd6320502004-08-12 13:45:08 +000022086# check for socketpair
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022087{ echo "$as_me:$LINENO: checking for socketpair" >&5
22088echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022089cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022090/* confdefs.h. */
22091_ACEOF
22092cat confdefs.h >>conftest.$ac_ext
22093cat >>conftest.$ac_ext <<_ACEOF
22094/* end confdefs.h. */
22095
22096#include <sys/types.h>
22097#include <sys/socket.h>
22098
22099int
22100main ()
22101{
22102void *x=socketpair
22103 ;
22104 return 0;
22105}
22106_ACEOF
22107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022108if { (ac_try="$ac_compile"
22109case "(($ac_try" in
22110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22111 *) ac_try_echo=$ac_try;;
22112esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022115 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022116 grep -v '^ *+' conftest.er1 >conftest.err
22117 rm -f conftest.er1
22118 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022120 (exit $ac_status); } && {
22121 test -z "$ac_c_werror_flag" ||
22122 test ! -s conftest.err
22123 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022124
22125cat >>confdefs.h <<\_ACEOF
22126#define HAVE_SOCKETPAIR 1
22127_ACEOF
22128
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022129 { echo "$as_me:$LINENO: result: yes" >&5
22130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022131else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022132 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022133sed 's/^/| /' conftest.$ac_ext >&5
22134
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022135 { echo "$as_me:$LINENO: result: no" >&5
22136echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022137
22138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022139
22140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022141
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022142# check if sockaddr has sa_len member
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022143{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22144echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022146/* confdefs.h. */
22147_ACEOF
22148cat confdefs.h >>conftest.$ac_ext
22149cat >>conftest.$ac_ext <<_ACEOF
22150/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022151#include <sys/types.h>
22152#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022153int
22154main ()
22155{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022156struct sockaddr x;
22157x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 ;
22159 return 0;
22160}
22161_ACEOF
22162rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022163if { (ac_try="$ac_compile"
22164case "(($ac_try" in
22165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22166 *) ac_try_echo=$ac_try;;
22167esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022171 grep -v '^ *+' conftest.er1 >conftest.err
22172 rm -f conftest.er1
22173 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022175 (exit $ac_status); } && {
22176 test -z "$ac_c_werror_flag" ||
22177 test ! -s conftest.err
22178 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022179 { echo "$as_me:$LINENO: result: yes" >&5
22180echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022181
22182cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022183#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022184_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022185
22186else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022188sed 's/^/| /' conftest.$ac_ext >&5
22189
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022190 { echo "$as_me:$LINENO: result: no" >&5
22191echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022193
22194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022195
Guido van Rossumda88dad1995-01-26 00:46:29 +000022196va_list_is_array=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022197{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22198echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022199cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022200/* confdefs.h. */
22201_ACEOF
22202cat confdefs.h >>conftest.$ac_ext
22203cat >>conftest.$ac_ext <<_ACEOF
22204/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022205
22206#ifdef HAVE_STDARG_PROTOTYPES
22207#include <stdarg.h>
22208#else
22209#include <varargs.h>
22210#endif
22211
Martin v. Löwis11437992002-04-12 09:54:03 +000022212int
22213main ()
22214{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022215va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022216 ;
22217 return 0;
22218}
22219_ACEOF
22220rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022221if { (ac_try="$ac_compile"
22222case "(($ac_try" in
22223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22224 *) ac_try_echo=$ac_try;;
22225esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022229 grep -v '^ *+' conftest.er1 >conftest.err
22230 rm -f conftest.er1
22231 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022233 (exit $ac_status); } && {
22234 test -z "$ac_c_werror_flag" ||
22235 test ! -s conftest.err
22236 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022237 :
22238else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022240sed 's/^/| /' conftest.$ac_ext >&5
22241
Martin v. Löwis11437992002-04-12 09:54:03 +000022242
22243
22244cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022245#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022246_ACEOF
22247
Guido van Rossumda88dad1995-01-26 00:46:29 +000022248 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022251
22252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022253{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22254echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022255
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022256# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022257
22258
22259
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022260{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22261echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022262if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022263 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022264else
Martin v. Löwis11437992002-04-12 09:54:03 +000022265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022266/* confdefs.h. */
22267_ACEOF
22268cat confdefs.h >>conftest.$ac_ext
22269cat >>conftest.$ac_ext <<_ACEOF
22270/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022271/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22272 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22273#define gethostbyname_r innocuous_gethostbyname_r
22274
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022275/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022276 which can conflict with char gethostbyname_r (); below.
22277 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022278 <limits.h> exists even on freestanding compilers. */
22279
22280#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022281# include <limits.h>
22282#else
22283# include <assert.h>
22284#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022285
22286#undef gethostbyname_r
22287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022288/* Override any GCC internal prototype to avoid an error.
22289 Use char because int might match the return type of a GCC
22290 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022291#ifdef __cplusplus
22292extern "C"
22293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022294char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022295/* The GNU C library defines this for functions which it implements
22296 to always fail with ENOSYS. Some functions are actually named
22297 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022298#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022299choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022300#endif
22301
Skip Montanaro6dead952003-09-25 14:50:04 +000022302int
22303main ()
22304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022305return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 ;
22307 return 0;
22308}
22309_ACEOF
22310rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022311if { (ac_try="$ac_link"
22312case "(($ac_try" in
22313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22314 *) ac_try_echo=$ac_try;;
22315esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022317 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022319 grep -v '^ *+' conftest.er1 >conftest.err
22320 rm -f conftest.er1
22321 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022323 (exit $ac_status); } && {
22324 test -z "$ac_c_werror_flag" ||
22325 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022326 } && test -s conftest$ac_exeext &&
22327 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022329else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022331sed 's/^/| /' conftest.$ac_ext >&5
22332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022333 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022335
22336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022337 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022338fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022339{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22340echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22341if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022342
Martin v. Löwis11437992002-04-12 09:54:03 +000022343 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022344#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022345_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022346
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022347 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22348echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022349 OLD_CFLAGS=$CFLAGS
22350 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022352/* confdefs.h. */
22353_ACEOF
22354cat confdefs.h >>conftest.$ac_ext
22355cat >>conftest.$ac_ext <<_ACEOF
22356/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022357
22358# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022359
Martin v. Löwis11437992002-04-12 09:54:03 +000022360int
22361main ()
22362{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022363
22364 char *name;
22365 struct hostent *he, *res;
22366 char buffer[2048];
22367 int buflen = 2048;
22368 int h_errnop;
22369
22370 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022371
22372 ;
22373 return 0;
22374}
22375_ACEOF
22376rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022377if { (ac_try="$ac_compile"
22378case "(($ac_try" in
22379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22380 *) ac_try_echo=$ac_try;;
22381esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022385 grep -v '^ *+' conftest.er1 >conftest.err
22386 rm -f conftest.er1
22387 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022389 (exit $ac_status); } && {
22390 test -z "$ac_c_werror_flag" ||
22391 test ! -s conftest.err
22392 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022393
22394 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022395#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022396_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022397
Martin v. Löwis11437992002-04-12 09:54:03 +000022398
22399cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022400#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022401_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022402
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022403 { echo "$as_me:$LINENO: result: yes" >&5
22404echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022406else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022408sed 's/^/| /' conftest.$ac_ext >&5
22409
Martin v. Löwis11437992002-04-12 09:54:03 +000022410
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022411 { echo "$as_me:$LINENO: result: no" >&5
22412echo "${ECHO_T}no" >&6; }
22413 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22414echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022416/* confdefs.h. */
22417_ACEOF
22418cat confdefs.h >>conftest.$ac_ext
22419cat >>conftest.$ac_ext <<_ACEOF
22420/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022421
22422# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022423
Martin v. Löwis11437992002-04-12 09:54:03 +000022424int
22425main ()
22426{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022427
22428 char *name;
22429 struct hostent *he;
22430 char buffer[2048];
22431 int buflen = 2048;
22432 int h_errnop;
22433
22434 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022435
22436 ;
22437 return 0;
22438}
22439_ACEOF
22440rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022441if { (ac_try="$ac_compile"
22442case "(($ac_try" in
22443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22444 *) ac_try_echo=$ac_try;;
22445esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022447 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022448 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022449 grep -v '^ *+' conftest.er1 >conftest.err
22450 rm -f conftest.er1
22451 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022453 (exit $ac_status); } && {
22454 test -z "$ac_c_werror_flag" ||
22455 test ! -s conftest.err
22456 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022457
22458 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022459#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022460_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022461
Martin v. Löwis11437992002-04-12 09:54:03 +000022462
22463cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022464#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022465_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022466
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022467 { echo "$as_me:$LINENO: result: yes" >&5
22468echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022470else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022471 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022472sed 's/^/| /' conftest.$ac_ext >&5
22473
Martin v. Löwis11437992002-04-12 09:54:03 +000022474
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022475 { echo "$as_me:$LINENO: result: no" >&5
22476echo "${ECHO_T}no" >&6; }
22477 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22478echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022480/* confdefs.h. */
22481_ACEOF
22482cat confdefs.h >>conftest.$ac_ext
22483cat >>conftest.$ac_ext <<_ACEOF
22484/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022485
22486# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022487
Martin v. Löwis11437992002-04-12 09:54:03 +000022488int
22489main ()
22490{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022491
22492 char *name;
22493 struct hostent *he;
22494 struct hostent_data data;
22495
22496 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022497
22498 ;
22499 return 0;
22500}
22501_ACEOF
22502rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022503if { (ac_try="$ac_compile"
22504case "(($ac_try" in
22505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22506 *) ac_try_echo=$ac_try;;
22507esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022511 grep -v '^ *+' conftest.er1 >conftest.err
22512 rm -f conftest.er1
22513 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022515 (exit $ac_status); } && {
22516 test -z "$ac_c_werror_flag" ||
22517 test ! -s conftest.err
22518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022519
22520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022521#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022522_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022523
Martin v. Löwis11437992002-04-12 09:54:03 +000022524
22525cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022526#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022527_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022528
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022529 { echo "$as_me:$LINENO: result: yes" >&5
22530echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022532else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022534sed 's/^/| /' conftest.$ac_ext >&5
22535
Martin v. Löwis11437992002-04-12 09:54:03 +000022536
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022537 { echo "$as_me:$LINENO: result: no" >&5
22538echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022541
22542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022545
22546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022549
22550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022551 CFLAGS=$OLD_CFLAGS
22552
22553else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022554
Martin v. Löwis11437992002-04-12 09:54:03 +000022555
22556for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022557do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22559{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022561if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022563else
Martin v. Löwis11437992002-04-12 09:54:03 +000022564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022565/* confdefs.h. */
22566_ACEOF
22567cat confdefs.h >>conftest.$ac_ext
22568cat >>conftest.$ac_ext <<_ACEOF
22569/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022570/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22572#define $ac_func innocuous_$ac_func
22573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022574/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022575 which can conflict with char $ac_func (); below.
22576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022577 <limits.h> exists even on freestanding compilers. */
22578
22579#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022580# include <limits.h>
22581#else
22582# include <assert.h>
22583#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022584
22585#undef $ac_func
22586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022587/* Override any GCC internal prototype to avoid an error.
22588 Use char because int might match the return type of a GCC
22589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022590#ifdef __cplusplus
22591extern "C"
22592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022593char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022594/* The GNU C library defines this for functions which it implements
22595 to always fail with ENOSYS. Some functions are actually named
22596 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022597#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022598choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022599#endif
22600
Skip Montanaro6dead952003-09-25 14:50:04 +000022601int
22602main ()
22603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022604return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022605 ;
22606 return 0;
22607}
22608_ACEOF
22609rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022610if { (ac_try="$ac_link"
22611case "(($ac_try" in
22612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22613 *) ac_try_echo=$ac_try;;
22614esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022616 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022618 grep -v '^ *+' conftest.er1 >conftest.err
22619 rm -f conftest.er1
22620 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022622 (exit $ac_status); } && {
22623 test -z "$ac_c_werror_flag" ||
22624 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022625 } && test -s conftest$ac_exeext &&
22626 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022627 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022628else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022630sed 's/^/| /' conftest.$ac_ext >&5
22631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022632 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022634
22635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022636 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022637fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022638ac_res=`eval echo '${'$as_ac_var'}'`
22639 { echo "$as_me:$LINENO: result: $ac_res" >&5
22640echo "${ECHO_T}$ac_res" >&6; }
22641if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022643#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022644_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022645
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022646fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022647done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022648
Michael W. Hudson54241132001-12-07 15:38:26 +000022649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650fi
22651
Michael W. Hudson54241132001-12-07 15:38:26 +000022652
22653
22654
22655
22656
22657
Guido van Rossum627b2d71993-12-24 10:39:16 +000022658# checks for system services
22659# (none yet)
22660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022661# Linux requires this for correct f.p. operations
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022662{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22663echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022664if test "${ac_cv_func___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022665 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022666else
Martin v. Löwis11437992002-04-12 09:54:03 +000022667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022668/* confdefs.h. */
22669_ACEOF
22670cat confdefs.h >>conftest.$ac_ext
22671cat >>conftest.$ac_ext <<_ACEOF
22672/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022673/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22674 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22675#define __fpu_control innocuous___fpu_control
22676
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022677/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022678 which can conflict with char __fpu_control (); below.
22679 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022680 <limits.h> exists even on freestanding compilers. */
22681
22682#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022683# include <limits.h>
22684#else
22685# include <assert.h>
22686#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022687
22688#undef __fpu_control
22689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022690/* Override any GCC internal prototype to avoid an error.
22691 Use char because int might match the return type of a GCC
22692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022693#ifdef __cplusplus
22694extern "C"
22695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022696char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022697/* The GNU C library defines this for functions which it implements
22698 to always fail with ENOSYS. Some functions are actually named
22699 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022701choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022702#endif
22703
Skip Montanaro6dead952003-09-25 14:50:04 +000022704int
22705main ()
22706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022707return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 ;
22709 return 0;
22710}
22711_ACEOF
22712rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022713if { (ac_try="$ac_link"
22714case "(($ac_try" in
22715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22716 *) ac_try_echo=$ac_try;;
22717esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022719 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022721 grep -v '^ *+' conftest.er1 >conftest.err
22722 rm -f conftest.er1
22723 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022725 (exit $ac_status); } && {
22726 test -z "$ac_c_werror_flag" ||
22727 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022728 } && test -s conftest$ac_exeext &&
22729 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022730 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022731else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022733sed 's/^/| /' conftest.$ac_ext >&5
22734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022737
22738rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022739 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022740fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022741{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22742echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22743if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022744 :
22745else
Martin v. Löwis11437992002-04-12 09:54:03 +000022746
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022747{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22748echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022749if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022751else
Martin v. Löwis11437992002-04-12 09:54:03 +000022752 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022753LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022755/* confdefs.h. */
22756_ACEOF
22757cat confdefs.h >>conftest.$ac_ext
22758cat >>conftest.$ac_ext <<_ACEOF
22759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022761/* Override any GCC internal prototype to avoid an error.
22762 Use char because int might match the return type of a GCC
22763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022764#ifdef __cplusplus
22765extern "C"
22766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022767char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022768int
22769main ()
22770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022771return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 ;
22773 return 0;
22774}
22775_ACEOF
22776rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022777if { (ac_try="$ac_link"
22778case "(($ac_try" in
22779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22780 *) ac_try_echo=$ac_try;;
22781esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022783 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022785 grep -v '^ *+' conftest.er1 >conftest.err
22786 rm -f conftest.er1
22787 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022789 (exit $ac_status); } && {
22790 test -z "$ac_c_werror_flag" ||
22791 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022792 } && test -s conftest$ac_exeext &&
22793 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022794 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022795else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022797sed 's/^/| /' conftest.$ac_ext >&5
22798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022799 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022801
22802rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022803 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022804LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022805fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022806{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22807echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22808if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022809 cat >>confdefs.h <<_ACEOF
22810#define HAVE_LIBIEEE 1
22811_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022813 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022814
Guido van Rossum627b2d71993-12-24 10:39:16 +000022815fi
22816
Michael W. Hudson54241132001-12-07 15:38:26 +000022817
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022818fi
22819
Michael W. Hudson54241132001-12-07 15:38:26 +000022820
Guido van Rossum7f253911997-05-09 02:42:48 +000022821# Check for --with-fpectl
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022822{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22823echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022825# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022826if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022827 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022828if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022829then
22830
22831cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022832#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022833_ACEOF
22834
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022835 { echo "$as_me:$LINENO: result: yes" >&5
22836echo "${ECHO_T}yes" >&6; }
22837else { echo "$as_me:$LINENO: result: no" >&5
22838echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022839fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022840else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022841 { echo "$as_me:$LINENO: result: no" >&5
22842echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022843fi
22844
Guido van Rossum7f253911997-05-09 02:42:48 +000022845
Guido van Rossum7f43da71994-08-01 12:15:30 +000022846# check for --with-libm=...
22847
Guido van Rossum563e7081996-09-10 18:20:48 +000022848case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022849Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022850*) LIBM=-lm
22851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022852{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22853echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022856if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022857 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022858if test "$withval" = no
22859then LIBM=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022860 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22861echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022862elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022863then LIBM=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022864 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22865echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22866else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22867echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022868 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022869fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022870else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022871 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22872echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022873fi
22874
Guido van Rossum7f43da71994-08-01 12:15:30 +000022875
22876# check for --with-libc=...
22877
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022878{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22879echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022881# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022882if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022883 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022884if test "$withval" = no
22885then LIBC=
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022886 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22887echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022888elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022889then LIBC=$withval
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022890 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22891echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22892else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22893echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022894 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022895fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022896else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022897 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22898echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022899fi
22900
Guido van Rossum7f43da71994-08-01 12:15:30 +000022901
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022902# **************************************************
22903# * Check for various properties of floating point *
22904# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022905
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022906{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22907echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022908if test "${ac_cv_little_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022909 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022910else
22911
22912if test "$cross_compiling" = yes; then
22913 ac_cv_little_endian_double=no
22914else
22915 cat >conftest.$ac_ext <<_ACEOF
22916/* confdefs.h. */
22917_ACEOF
22918cat confdefs.h >>conftest.$ac_ext
22919cat >>conftest.$ac_ext <<_ACEOF
22920/* end confdefs.h. */
22921
22922#include <string.h>
22923int main() {
22924 double x = 9006104071832581.0;
22925 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22926 return 0;
22927 else
22928 return 1;
22929}
22930
22931_ACEOF
22932rm -f conftest$ac_exeext
22933if { (ac_try="$ac_link"
22934case "(($ac_try" in
22935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22936 *) ac_try_echo=$ac_try;;
22937esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022939 (eval "$ac_link") 2>&5
22940 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022942 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22943 { (case "(($ac_try" in
22944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22945 *) ac_try_echo=$ac_try;;
22946esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022948 (eval "$ac_try") 2>&5
22949 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022951 (exit $ac_status); }; }; then
22952 ac_cv_little_endian_double=yes
22953else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022954 echo "$as_me: program exited with status $ac_status" >&5
22955echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022956sed 's/^/| /' conftest.$ac_ext >&5
22957
22958( exit $ac_status )
22959ac_cv_little_endian_double=no
22960fi
22961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22962fi
22963
22964
22965fi
22966
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022967{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22968echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022969if test "$ac_cv_little_endian_double" = yes
22970then
22971
22972cat >>confdefs.h <<\_ACEOF
22973#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22974_ACEOF
22975
22976fi
22977
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022978{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22979echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022980if test "${ac_cv_big_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000022981 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022982else
22983
22984if test "$cross_compiling" = yes; then
22985 ac_cv_big_endian_double=no
22986else
22987 cat >conftest.$ac_ext <<_ACEOF
22988/* confdefs.h. */
22989_ACEOF
22990cat confdefs.h >>conftest.$ac_ext
22991cat >>conftest.$ac_ext <<_ACEOF
22992/* end confdefs.h. */
22993
22994#include <string.h>
22995int main() {
22996 double x = 9006104071832581.0;
22997 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22998 return 0;
22999 else
23000 return 1;
23001}
23002
23003_ACEOF
23004rm -f conftest$ac_exeext
23005if { (ac_try="$ac_link"
23006case "(($ac_try" in
23007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23008 *) ac_try_echo=$ac_try;;
23009esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023011 (eval "$ac_link") 2>&5
23012 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23015 { (case "(($ac_try" in
23016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23017 *) ac_try_echo=$ac_try;;
23018esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023020 (eval "$ac_try") 2>&5
23021 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023023 (exit $ac_status); }; }; then
23024 ac_cv_big_endian_double=yes
23025else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023026 echo "$as_me: program exited with status $ac_status" >&5
23027echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023028sed 's/^/| /' conftest.$ac_ext >&5
23029
23030( exit $ac_status )
23031ac_cv_big_endian_double=no
23032fi
23033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23034fi
23035
23036
23037fi
23038
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023039{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23040echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023041if test "$ac_cv_big_endian_double" = yes
23042then
23043
23044cat >>confdefs.h <<\_ACEOF
23045#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23046_ACEOF
23047
23048fi
23049
23050# Some ARM platforms use a mixed-endian representation for doubles.
23051# While Python doesn't currently have full support for these platforms
23052# (see e.g., issue 1762561), we can at least make sure that float <-> string
23053# conversions work.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023054{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23055echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023056if test "${ac_cv_mixed_endian_double+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023057 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023058else
23059
23060if test "$cross_compiling" = yes; then
23061 ac_cv_mixed_endian_double=no
23062else
23063 cat >conftest.$ac_ext <<_ACEOF
23064/* confdefs.h. */
23065_ACEOF
23066cat confdefs.h >>conftest.$ac_ext
23067cat >>conftest.$ac_ext <<_ACEOF
23068/* end confdefs.h. */
23069
23070#include <string.h>
23071int main() {
23072 double x = 9006104071832581.0;
23073 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23074 return 0;
23075 else
23076 return 1;
23077}
23078
23079_ACEOF
23080rm -f conftest$ac_exeext
23081if { (ac_try="$ac_link"
23082case "(($ac_try" in
23083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23084 *) ac_try_echo=$ac_try;;
23085esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023087 (eval "$ac_link") 2>&5
23088 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23091 { (case "(($ac_try" in
23092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23093 *) ac_try_echo=$ac_try;;
23094esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023096 (eval "$ac_try") 2>&5
23097 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023099 (exit $ac_status); }; }; then
23100 ac_cv_mixed_endian_double=yes
23101else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023102 echo "$as_me: program exited with status $ac_status" >&5
23103echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023104sed 's/^/| /' conftest.$ac_ext >&5
23105
23106( exit $ac_status )
23107ac_cv_mixed_endian_double=no
23108fi
23109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23110fi
23111
23112
23113fi
23114
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023115{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23116echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023117if test "$ac_cv_mixed_endian_double" = yes
23118then
23119
23120cat >>confdefs.h <<\_ACEOF
23121#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23122_ACEOF
23123
23124fi
23125
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023126# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023127# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023128# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023129# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023130# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000023131# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023132
23133# This inline assembler syntax may also work for suncc and icc,
23134# so we try it on all platforms.
23135
23136{ 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 +000023137echo $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 +000023138cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023139/* confdefs.h. */
23140_ACEOF
23141cat confdefs.h >>conftest.$ac_ext
23142cat >>conftest.$ac_ext <<_ACEOF
23143/* end confdefs.h. */
23144
23145int
23146main ()
23147{
23148
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023149 unsigned short cw;
23150 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23151 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023152
23153 ;
23154 return 0;
23155}
23156_ACEOF
23157rm -f conftest.$ac_objext
23158if { (ac_try="$ac_compile"
23159case "(($ac_try" in
23160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23161 *) ac_try_echo=$ac_try;;
23162esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023164 (eval "$ac_compile") 2>conftest.er1
23165 ac_status=$?
23166 grep -v '^ *+' conftest.er1 >conftest.err
23167 rm -f conftest.er1
23168 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023170 (exit $ac_status); } && {
23171 test -z "$ac_c_werror_flag" ||
23172 test ! -s conftest.err
23173 } && test -s conftest.$ac_objext; then
23174 have_gcc_asm_for_x87=yes
23175else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023176 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023177sed 's/^/| /' conftest.$ac_ext >&5
23178
23179 have_gcc_asm_for_x87=no
23180fi
23181
23182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023183{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023184echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000023185if test "$have_gcc_asm_for_x87" = yes
23186then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023187
23188cat >>confdefs.h <<\_ACEOF
23189#define HAVE_GCC_ASM_FOR_X87 1
23190_ACEOF
23191
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023192fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023193
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023194# Detect whether system arithmetic is subject to x87-style double
23195# rounding issues. The result of this test has little meaning on non
23196# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23197# mode is round-to-nearest and double rounding issues are present, and
23198# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023199{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23200echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023201# $BASECFLAGS may affect the result
23202ac_save_cc="$CC"
23203CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023204if test "$cross_compiling" = yes; then
23205 ac_cv_x87_double_rounding=no
23206else
23207 cat >conftest.$ac_ext <<_ACEOF
23208/* confdefs.h. */
23209_ACEOF
23210cat confdefs.h >>conftest.$ac_ext
23211cat >>conftest.$ac_ext <<_ACEOF
23212/* end confdefs.h. */
23213
23214#include <stdlib.h>
23215#include <math.h>
23216int main() {
23217 volatile double x, y, z;
23218 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23219 x = 0.99999999999999989; /* 1-2**-53 */
23220 y = 1./x;
23221 if (y != 1.)
23222 exit(0);
23223 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23224 x = 1e16;
23225 y = 2.99999;
23226 z = x + y;
23227 if (z != 1e16+4.)
23228 exit(0);
23229 /* both tests show evidence of double rounding */
23230 exit(1);
23231}
23232
23233_ACEOF
23234rm -f conftest$ac_exeext
23235if { (ac_try="$ac_link"
23236case "(($ac_try" in
23237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23238 *) ac_try_echo=$ac_try;;
23239esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023241 (eval "$ac_link") 2>&5
23242 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023244 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23245 { (case "(($ac_try" in
23246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23247 *) ac_try_echo=$ac_try;;
23248esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023250 (eval "$ac_try") 2>&5
23251 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023253 (exit $ac_status); }; }; then
23254 ac_cv_x87_double_rounding=no
23255else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023256 echo "$as_me: program exited with status $ac_status" >&5
23257echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023258sed 's/^/| /' conftest.$ac_ext >&5
23259
23260( exit $ac_status )
23261ac_cv_x87_double_rounding=yes
23262fi
23263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23264fi
23265
23266
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023267CC="$ac_save_cc"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023268{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23269echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023270if test "$ac_cv_x87_double_rounding" = yes
23271then
23272
23273cat >>confdefs.h <<\_ACEOF
23274#define X87_DOUBLE_ROUNDING 1
23275_ACEOF
23276
23277fi
23278
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023279# ************************************
23280# * Check for mathematical functions *
23281# ************************************
23282
23283LIBS_SAVE=$LIBS
23284LIBS="$LIBS $LIBM"
23285
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023286# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23287# -0. on some architectures.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023288{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23289echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023290if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023291 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023292else
23293
23294if test "$cross_compiling" = yes; then
23295 ac_cv_tanh_preserves_zero_sign=no
23296else
23297 cat >conftest.$ac_ext <<_ACEOF
23298/* confdefs.h. */
23299_ACEOF
23300cat confdefs.h >>conftest.$ac_ext
23301cat >>conftest.$ac_ext <<_ACEOF
23302/* end confdefs.h. */
23303
23304#include <math.h>
23305#include <stdlib.h>
23306int main() {
23307 /* return 0 if either negative zeros don't exist
23308 on this platform or if negative zeros exist
23309 and tanh(-0.) == -0. */
23310 if (atan2(0., -1.) == atan2(-0., -1.) ||
23311 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23312 else exit(1);
23313}
23314
23315_ACEOF
23316rm -f conftest$ac_exeext
23317if { (ac_try="$ac_link"
23318case "(($ac_try" in
23319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23320 *) ac_try_echo=$ac_try;;
23321esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023323 (eval "$ac_link") 2>&5
23324 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023326 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23327 { (case "(($ac_try" in
23328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23329 *) ac_try_echo=$ac_try;;
23330esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023332 (eval "$ac_try") 2>&5
23333 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023335 (exit $ac_status); }; }; then
23336 ac_cv_tanh_preserves_zero_sign=yes
23337else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023338 echo "$as_me: program exited with status $ac_status" >&5
23339echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023340sed 's/^/| /' conftest.$ac_ext >&5
23341
23342( exit $ac_status )
23343ac_cv_tanh_preserves_zero_sign=no
23344fi
23345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23346fi
23347
23348
23349fi
23350
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023351{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23352echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023353if test "$ac_cv_tanh_preserves_zero_sign" = yes
23354then
23355
23356cat >>confdefs.h <<\_ACEOF
23357#define TANH_PRESERVES_ZERO_SIGN 1
23358_ACEOF
23359
23360fi
23361
23362
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023363
Michael W. Hudson54241132001-12-07 15:38:26 +000023364
Christian Heimes99170a52007-12-19 02:07:34 +000023365
23366
23367
23368
23369
Mark Dickinsonf2537862009-04-18 13:58:18 +000023370
Mark Dickinson9c113362009-09-05 10:36:23 +000023371for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23372do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023373as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23374{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23375echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023376if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023377 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023378else
23379 cat >conftest.$ac_ext <<_ACEOF
23380/* confdefs.h. */
23381_ACEOF
23382cat confdefs.h >>conftest.$ac_ext
23383cat >>conftest.$ac_ext <<_ACEOF
23384/* end confdefs.h. */
23385/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23386 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23387#define $ac_func innocuous_$ac_func
23388
23389/* System header to define __stub macros and hopefully few prototypes,
23390 which can conflict with char $ac_func (); below.
23391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23392 <limits.h> exists even on freestanding compilers. */
23393
23394#ifdef __STDC__
23395# include <limits.h>
23396#else
23397# include <assert.h>
23398#endif
23399
23400#undef $ac_func
23401
23402/* Override any GCC internal prototype to avoid an error.
23403 Use char because int might match the return type of a GCC
23404 builtin and then its argument prototype would still apply. */
23405#ifdef __cplusplus
23406extern "C"
23407#endif
23408char $ac_func ();
23409/* The GNU C library defines this for functions which it implements
23410 to always fail with ENOSYS. Some functions are actually named
23411 something starting with __ and the normal name is an alias. */
23412#if defined __stub_$ac_func || defined __stub___$ac_func
23413choke me
23414#endif
23415
23416int
23417main ()
23418{
23419return $ac_func ();
23420 ;
23421 return 0;
23422}
23423_ACEOF
23424rm -f conftest.$ac_objext conftest$ac_exeext
23425if { (ac_try="$ac_link"
23426case "(($ac_try" in
23427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23428 *) ac_try_echo=$ac_try;;
23429esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023431 (eval "$ac_link") 2>conftest.er1
23432 ac_status=$?
23433 grep -v '^ *+' conftest.er1 >conftest.err
23434 rm -f conftest.er1
23435 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023437 (exit $ac_status); } && {
23438 test -z "$ac_c_werror_flag" ||
23439 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023440 } && test -s conftest$ac_exeext &&
23441 $as_test_x conftest$ac_exeext; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023442 eval "$as_ac_var=yes"
23443else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023444 echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023445sed 's/^/| /' conftest.$ac_ext >&5
23446
23447 eval "$as_ac_var=no"
23448fi
23449
23450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23451 conftest$ac_exeext conftest.$ac_ext
23452fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023453ac_res=`eval echo '${'$as_ac_var'}'`
23454 { echo "$as_me:$LINENO: result: $ac_res" >&5
23455echo "${ECHO_T}$ac_res" >&6; }
23456if test `eval echo '${'$as_ac_var'}'` = yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023457 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023458#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023459_ACEOF
23460
23461fi
23462done
23463
23464
23465
23466
23467
23468
23469for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023470do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023471as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23472{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23473echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023474if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023475 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023476else
23477 cat >conftest.$ac_ext <<_ACEOF
23478/* confdefs.h. */
23479_ACEOF
23480cat confdefs.h >>conftest.$ac_ext
23481cat >>conftest.$ac_ext <<_ACEOF
23482/* end confdefs.h. */
23483/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23484 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23485#define $ac_func innocuous_$ac_func
23486
23487/* System header to define __stub macros and hopefully few prototypes,
23488 which can conflict with char $ac_func (); below.
23489 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23490 <limits.h> exists even on freestanding compilers. */
23491
23492#ifdef __STDC__
23493# include <limits.h>
23494#else
23495# include <assert.h>
23496#endif
23497
23498#undef $ac_func
23499
23500/* Override any GCC internal prototype to avoid an error.
23501 Use char because int might match the return type of a GCC
23502 builtin and then its argument prototype would still apply. */
23503#ifdef __cplusplus
23504extern "C"
23505#endif
23506char $ac_func ();
23507/* The GNU C library defines this for functions which it implements
23508 to always fail with ENOSYS. Some functions are actually named
23509 something starting with __ and the normal name is an alias. */
23510#if defined __stub_$ac_func || defined __stub___$ac_func
23511choke me
23512#endif
23513
23514int
23515main ()
23516{
23517return $ac_func ();
23518 ;
23519 return 0;
23520}
23521_ACEOF
23522rm -f conftest.$ac_objext conftest$ac_exeext
23523if { (ac_try="$ac_link"
23524case "(($ac_try" in
23525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23526 *) ac_try_echo=$ac_try;;
23527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023529 (eval "$ac_link") 2>conftest.er1
23530 ac_status=$?
23531 grep -v '^ *+' conftest.er1 >conftest.err
23532 rm -f conftest.er1
23533 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023535 (exit $ac_status); } && {
23536 test -z "$ac_c_werror_flag" ||
23537 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023538 } && test -s conftest$ac_exeext &&
23539 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023540 eval "$as_ac_var=yes"
23541else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023542 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023543sed 's/^/| /' conftest.$ac_ext >&5
23544
23545 eval "$as_ac_var=no"
23546fi
23547
23548rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23549 conftest$ac_exeext conftest.$ac_ext
23550fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023551ac_res=`eval echo '${'$as_ac_var'}'`
23552 { echo "$as_me:$LINENO: result: $ac_res" >&5
23553echo "${ECHO_T}$ac_res" >&6; }
23554if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023555 cat >>confdefs.h <<_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023556#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023557_ACEOF
23558
23559fi
23560done
23561
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023562{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23563echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023564if test "${ac_cv_have_decl_isinf+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023565 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023566else
23567 cat >conftest.$ac_ext <<_ACEOF
23568/* confdefs.h. */
23569_ACEOF
23570cat confdefs.h >>conftest.$ac_ext
23571cat >>conftest.$ac_ext <<_ACEOF
23572/* end confdefs.h. */
23573#include <math.h>
23574
23575int
23576main ()
23577{
23578#ifndef isinf
23579 (void) isinf;
23580#endif
23581
23582 ;
23583 return 0;
23584}
23585_ACEOF
23586rm -f conftest.$ac_objext
23587if { (ac_try="$ac_compile"
23588case "(($ac_try" in
23589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23590 *) ac_try_echo=$ac_try;;
23591esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023593 (eval "$ac_compile") 2>conftest.er1
23594 ac_status=$?
23595 grep -v '^ *+' conftest.er1 >conftest.err
23596 rm -f conftest.er1
23597 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023599 (exit $ac_status); } && {
23600 test -z "$ac_c_werror_flag" ||
23601 test ! -s conftest.err
23602 } && test -s conftest.$ac_objext; then
23603 ac_cv_have_decl_isinf=yes
23604else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023605 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023606sed 's/^/| /' conftest.$ac_ext >&5
23607
23608 ac_cv_have_decl_isinf=no
23609fi
23610
23611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23612fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023613{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23614echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23615if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023616
23617cat >>confdefs.h <<_ACEOF
23618#define HAVE_DECL_ISINF 1
23619_ACEOF
23620
23621
23622else
23623 cat >>confdefs.h <<_ACEOF
23624#define HAVE_DECL_ISINF 0
23625_ACEOF
23626
23627
23628fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023629{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23630echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023631if test "${ac_cv_have_decl_isnan+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023632 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023633else
23634 cat >conftest.$ac_ext <<_ACEOF
23635/* confdefs.h. */
23636_ACEOF
23637cat confdefs.h >>conftest.$ac_ext
23638cat >>conftest.$ac_ext <<_ACEOF
23639/* end confdefs.h. */
23640#include <math.h>
23641
23642int
23643main ()
23644{
23645#ifndef isnan
23646 (void) isnan;
23647#endif
23648
23649 ;
23650 return 0;
23651}
23652_ACEOF
23653rm -f conftest.$ac_objext
23654if { (ac_try="$ac_compile"
23655case "(($ac_try" in
23656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23657 *) ac_try_echo=$ac_try;;
23658esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023660 (eval "$ac_compile") 2>conftest.er1
23661 ac_status=$?
23662 grep -v '^ *+' conftest.er1 >conftest.err
23663 rm -f conftest.er1
23664 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023666 (exit $ac_status); } && {
23667 test -z "$ac_c_werror_flag" ||
23668 test ! -s conftest.err
23669 } && test -s conftest.$ac_objext; then
23670 ac_cv_have_decl_isnan=yes
23671else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023672 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023673sed 's/^/| /' conftest.$ac_ext >&5
23674
23675 ac_cv_have_decl_isnan=no
23676fi
23677
23678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23679fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023680{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23681echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23682if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023683
23684cat >>confdefs.h <<_ACEOF
23685#define HAVE_DECL_ISNAN 1
23686_ACEOF
23687
23688
23689else
23690 cat >>confdefs.h <<_ACEOF
23691#define HAVE_DECL_ISNAN 0
23692_ACEOF
23693
23694
23695fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023696{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23697echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023698if test "${ac_cv_have_decl_isfinite+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023699 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023700else
23701 cat >conftest.$ac_ext <<_ACEOF
23702/* confdefs.h. */
23703_ACEOF
23704cat confdefs.h >>conftest.$ac_ext
23705cat >>conftest.$ac_ext <<_ACEOF
23706/* end confdefs.h. */
23707#include <math.h>
23708
23709int
23710main ()
23711{
23712#ifndef isfinite
23713 (void) isfinite;
23714#endif
23715
23716 ;
23717 return 0;
23718}
23719_ACEOF
23720rm -f conftest.$ac_objext
23721if { (ac_try="$ac_compile"
23722case "(($ac_try" in
23723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23724 *) ac_try_echo=$ac_try;;
23725esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023727 (eval "$ac_compile") 2>conftest.er1
23728 ac_status=$?
23729 grep -v '^ *+' conftest.er1 >conftest.err
23730 rm -f conftest.er1
23731 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023733 (exit $ac_status); } && {
23734 test -z "$ac_c_werror_flag" ||
23735 test ! -s conftest.err
23736 } && test -s conftest.$ac_objext; then
23737 ac_cv_have_decl_isfinite=yes
23738else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023739 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023740sed 's/^/| /' conftest.$ac_ext >&5
23741
23742 ac_cv_have_decl_isfinite=no
23743fi
23744
23745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23746fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023747{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23748echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23749if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023750
23751cat >>confdefs.h <<_ACEOF
23752#define HAVE_DECL_ISFINITE 1
23753_ACEOF
23754
23755
23756else
23757 cat >>confdefs.h <<_ACEOF
23758#define HAVE_DECL_ISFINITE 0
23759_ACEOF
23760
23761
23762fi
23763
23764
Christian Heimes99170a52007-12-19 02:07:34 +000023765
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023766LIBS=$LIBS_SAVE
23767
Mark Dickinsona614f042009-11-28 12:48:43 +000023768# For multiprocessing module, check that sem_open
23769# actually works. For FreeBSD versions <= 7.2,
23770# the kernel module that provides POSIX semaphores
23771# isn't loaded by default, so an attempt to call
23772# sem_open results in a 'Signal 12' error.
23773{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23774echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
23775if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
23776 echo $ECHO_N "(cached) $ECHO_C" >&6
23777else
23778 if test "$cross_compiling" = yes; then
23779 ac_cv_posix_semaphores_enabled=yes
23780else
23781 cat >conftest.$ac_ext <<_ACEOF
23782/* confdefs.h. */
23783_ACEOF
23784cat confdefs.h >>conftest.$ac_ext
23785cat >>conftest.$ac_ext <<_ACEOF
23786/* end confdefs.h. */
23787
23788#include <unistd.h>
23789#include <fcntl.h>
23790#include <stdio.h>
23791#include <semaphore.h>
23792#include <sys/stat.h>
23793
23794int main(void) {
23795 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23796 if (a == SEM_FAILED) {
23797 perror("sem_open");
23798 return 1;
23799 }
23800 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023801 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000023802 return 0;
23803}
23804
23805_ACEOF
23806rm -f conftest$ac_exeext
23807if { (ac_try="$ac_link"
23808case "(($ac_try" in
23809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23810 *) ac_try_echo=$ac_try;;
23811esac
23812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23813 (eval "$ac_link") 2>&5
23814 ac_status=$?
23815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23817 { (case "(($ac_try" in
23818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23819 *) ac_try_echo=$ac_try;;
23820esac
23821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23822 (eval "$ac_try") 2>&5
23823 ac_status=$?
23824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23825 (exit $ac_status); }; }; then
23826 ac_cv_posix_semaphores_enabled=yes
23827else
23828 echo "$as_me: program exited with status $ac_status" >&5
23829echo "$as_me: failed program was:" >&5
23830sed 's/^/| /' conftest.$ac_ext >&5
23831
23832( exit $ac_status )
23833ac_cv_posix_semaphores_enabled=no
23834fi
23835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23836fi
23837
23838
23839
23840fi
23841
23842{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23843echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
23844if test $ac_cv_posix_semaphores_enabled = no
23845then
23846
23847cat >>confdefs.h <<\_ACEOF
23848#define POSIX_SEMAPHORES_NOT_ENABLED 1
23849_ACEOF
23850
23851fi
23852
Mark Dickinson10683072009-04-18 21:18:19 +000023853# Multiprocessing check for broken sem_getvalue
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023854{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23855echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023856if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023857 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023858else
23859 if test "$cross_compiling" = yes; then
23860 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023861else
23862 cat >conftest.$ac_ext <<_ACEOF
23863/* confdefs.h. */
23864_ACEOF
23865cat confdefs.h >>conftest.$ac_ext
23866cat >>conftest.$ac_ext <<_ACEOF
23867/* end confdefs.h. */
23868
23869#include <unistd.h>
23870#include <fcntl.h>
23871#include <stdio.h>
23872#include <semaphore.h>
23873#include <sys/stat.h>
23874
23875int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000023876 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000023877 int count;
23878 int res;
23879 if(a==SEM_FAILED){
23880 perror("sem_open");
23881 return 1;
23882
23883 }
23884 res = sem_getvalue(a, &count);
23885 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000023886 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000023887 return res==-1 ? 1 : 0;
23888}
23889
Mark Dickinson10683072009-04-18 21:18:19 +000023890_ACEOF
23891rm -f conftest$ac_exeext
23892if { (ac_try="$ac_link"
23893case "(($ac_try" in
23894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23895 *) ac_try_echo=$ac_try;;
23896esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023898 (eval "$ac_link") 2>&5
23899 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023901 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23902 { (case "(($ac_try" in
23903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23904 *) ac_try_echo=$ac_try;;
23905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023907 (eval "$ac_try") 2>&5
23908 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023910 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023911 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023912else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023913 echo "$as_me: program exited with status $ac_status" >&5
23914echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023915sed 's/^/| /' conftest.$ac_ext >&5
23916
23917( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023918ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023919fi
23920rm -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 +000023921fi
23922
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023923
23924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023925fi
23926
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023927{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23928echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023929if test $ac_cv_broken_sem_getvalue = yes
23930then
23931
23932cat >>confdefs.h <<\_ACEOF
23933#define HAVE_BROKEN_SEM_GETVALUE 1
23934_ACEOF
23935
23936fi
23937
Mark Dickinsonbd792642009-03-18 20:06:12 +000023938# determine what size digit to use for Python's longs
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023939{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23940echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023941# Check whether --enable-big-digits was given.
23942if test "${enable_big_digits+set}" = set; then
23943 enableval=$enable_big_digits; case $enable_big_digits in
23944yes)
23945 enable_big_digits=30 ;;
23946no)
23947 enable_big_digits=15 ;;
2394815|30)
23949 ;;
23950*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023951 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23952echo "$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 +000023953 { (exit 1); exit 1; }; } ;;
23954esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023955{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23956echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023957
23958cat >>confdefs.h <<_ACEOF
23959#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23960_ACEOF
23961
23962
23963else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023964 { echo "$as_me:$LINENO: result: no value specified" >&5
23965echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023966fi
23967
23968
Guido van Rossumef2255b2000-03-10 22:30:29 +000023969# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023970if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023971 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23972echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023973if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023974 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023975fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023976{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23977echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023978else
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 # Is the header compilable?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023980{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23981echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023983/* confdefs.h. */
23984_ACEOF
23985cat confdefs.h >>conftest.$ac_ext
23986cat >>conftest.$ac_ext <<_ACEOF
23987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023988$ac_includes_default
23989#include <wchar.h>
23990_ACEOF
23991rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023992if { (ac_try="$ac_compile"
23993case "(($ac_try" in
23994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23995 *) ac_try_echo=$ac_try;;
23996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000023997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023998 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024000 grep -v '^ *+' conftest.er1 >conftest.err
24001 rm -f conftest.er1
24002 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024004 (exit $ac_status); } && {
24005 test -z "$ac_c_werror_flag" ||
24006 test ! -s conftest.err
24007 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024008 ac_header_compiler=yes
24009else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024011sed 's/^/| /' conftest.$ac_ext >&5
24012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024015
24016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024017{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24018echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024019
24020# Is the header present?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024021{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24022echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024023cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024024/* confdefs.h. */
24025_ACEOF
24026cat confdefs.h >>conftest.$ac_ext
24027cat >>conftest.$ac_ext <<_ACEOF
24028/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024029#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024030_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024031if { (ac_try="$ac_cpp conftest.$ac_ext"
24032case "(($ac_try" in
24033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24034 *) ac_try_echo=$ac_try;;
24035esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024037 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024038 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024039 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024040 rm -f conftest.er1
24041 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024043 (exit $ac_status); } >/dev/null && {
24044 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24045 test ! -s conftest.err
24046 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024047 ac_header_preproc=yes
24048else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024050sed 's/^/| /' conftest.$ac_ext >&5
24051
Martin v. Löwis11437992002-04-12 09:54:03 +000024052 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024054
Martin v. Löwis11437992002-04-12 09:54:03 +000024055rm -f conftest.err conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024056{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24057echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024058
24059# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024060case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24061 yes:no: )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024062 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24063echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24064 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24065echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024066 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024067 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024068 no:yes:* )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024069 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24070echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24071 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24072echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24073 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24074echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24075 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24076echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24077 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24078echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24079 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24080echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024081 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024082## -------------------------------------- ##
24083## Report this to http://bugs.python.org/ ##
24084## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024085_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024086 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024087 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024088esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024089{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24090echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024091if test "${ac_cv_header_wchar_h+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024092 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024093else
24094 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024095fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024096{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24097echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024098
24099fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024100if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024101
24102
24103cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024104#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024105_ACEOF
24106
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024107 wchar_h="yes"
24108
Guido van Rossumef2255b2000-03-10 22:30:29 +000024109else
Martin v. Löwis11437992002-04-12 09:54:03 +000024110 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024111
24112fi
24113
Michael W. Hudson54241132001-12-07 15:38:26 +000024114
Martin v. Löwis11437992002-04-12 09:54:03 +000024115
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024116# determine wchar_t size
24117if test "$wchar_h" = yes
24118then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024119 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24120echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24121if test "${ac_cv_type_wchar_t+set}" = set; then
24122 echo $ECHO_N "(cached) $ECHO_C" >&6
24123else
24124 cat >conftest.$ac_ext <<_ACEOF
24125/* confdefs.h. */
24126_ACEOF
24127cat confdefs.h >>conftest.$ac_ext
24128cat >>conftest.$ac_ext <<_ACEOF
24129/* end confdefs.h. */
24130#include <wchar.h>
24131
24132typedef wchar_t ac__type_new_;
24133int
24134main ()
24135{
24136if ((ac__type_new_ *) 0)
24137 return 0;
24138if (sizeof (ac__type_new_))
24139 return 0;
24140 ;
24141 return 0;
24142}
24143_ACEOF
24144rm -f conftest.$ac_objext
24145if { (ac_try="$ac_compile"
24146case "(($ac_try" in
24147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24148 *) ac_try_echo=$ac_try;;
24149esac
24150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24151 (eval "$ac_compile") 2>conftest.er1
24152 ac_status=$?
24153 grep -v '^ *+' conftest.er1 >conftest.err
24154 rm -f conftest.er1
24155 cat conftest.err >&5
24156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24157 (exit $ac_status); } && {
24158 test -z "$ac_c_werror_flag" ||
24159 test ! -s conftest.err
24160 } && test -s conftest.$ac_objext; then
24161 ac_cv_type_wchar_t=yes
24162else
24163 echo "$as_me: failed program was:" >&5
24164sed 's/^/| /' conftest.$ac_ext >&5
24165
24166 ac_cv_type_wchar_t=no
24167fi
24168
24169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24170fi
24171{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24172echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24173
24174# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24177# This bug is HP SR number 8606223364.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024178{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24179echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024180if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024181 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024182else
Martin v. Löwis11437992002-04-12 09:54:03 +000024183 if test "$cross_compiling" = yes; then
24184 # Depending upon the size, compute the lo and hi bounds.
24185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024186/* confdefs.h. */
24187_ACEOF
24188cat confdefs.h >>conftest.$ac_ext
24189cat >>conftest.$ac_ext <<_ACEOF
24190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024191#include <wchar.h>
24192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024193 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024194int
24195main ()
24196{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024197static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024198test_array [0] = 0
24199
24200 ;
24201 return 0;
24202}
24203_ACEOF
24204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024205if { (ac_try="$ac_compile"
24206case "(($ac_try" in
24207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24208 *) ac_try_echo=$ac_try;;
24209esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024211 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024213 grep -v '^ *+' conftest.er1 >conftest.err
24214 rm -f conftest.er1
24215 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024217 (exit $ac_status); } && {
24218 test -z "$ac_c_werror_flag" ||
24219 test ! -s conftest.err
24220 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024221 ac_lo=0 ac_mid=0
24222 while :; do
24223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024224/* confdefs.h. */
24225_ACEOF
24226cat confdefs.h >>conftest.$ac_ext
24227cat >>conftest.$ac_ext <<_ACEOF
24228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024229#include <wchar.h>
24230
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024231 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024232int
24233main ()
24234{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024236test_array [0] = 0
24237
24238 ;
24239 return 0;
24240}
24241_ACEOF
24242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024243if { (ac_try="$ac_compile"
24244case "(($ac_try" in
24245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24246 *) ac_try_echo=$ac_try;;
24247esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024251 grep -v '^ *+' conftest.er1 >conftest.err
24252 rm -f conftest.er1
24253 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024255 (exit $ac_status); } && {
24256 test -z "$ac_c_werror_flag" ||
24257 test ! -s conftest.err
24258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024259 ac_hi=$ac_mid; break
24260else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024262sed 's/^/| /' conftest.$ac_ext >&5
24263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024264 ac_lo=`expr $ac_mid + 1`
24265 if test $ac_lo -le $ac_mid; then
24266 ac_lo= ac_hi=
24267 break
24268 fi
24269 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024271
24272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024273 done
24274else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024275 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024276sed 's/^/| /' conftest.$ac_ext >&5
24277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024279/* confdefs.h. */
24280_ACEOF
24281cat confdefs.h >>conftest.$ac_ext
24282cat >>conftest.$ac_ext <<_ACEOF
24283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024284#include <wchar.h>
24285
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024286 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024287int
24288main ()
24289{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024290static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024291test_array [0] = 0
24292
24293 ;
24294 return 0;
24295}
24296_ACEOF
24297rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298if { (ac_try="$ac_compile"
24299case "(($ac_try" in
24300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24301 *) ac_try_echo=$ac_try;;
24302esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024306 grep -v '^ *+' conftest.er1 >conftest.err
24307 rm -f conftest.er1
24308 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024310 (exit $ac_status); } && {
24311 test -z "$ac_c_werror_flag" ||
24312 test ! -s conftest.err
24313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024314 ac_hi=-1 ac_mid=-1
24315 while :; do
24316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024317/* confdefs.h. */
24318_ACEOF
24319cat confdefs.h >>conftest.$ac_ext
24320cat >>conftest.$ac_ext <<_ACEOF
24321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024322#include <wchar.h>
24323
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024324 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024325int
24326main ()
24327{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024328static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024329test_array [0] = 0
24330
24331 ;
24332 return 0;
24333}
24334_ACEOF
24335rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024336if { (ac_try="$ac_compile"
24337case "(($ac_try" in
24338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24339 *) ac_try_echo=$ac_try;;
24340esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024342 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024344 grep -v '^ *+' conftest.er1 >conftest.err
24345 rm -f conftest.er1
24346 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024348 (exit $ac_status); } && {
24349 test -z "$ac_c_werror_flag" ||
24350 test ! -s conftest.err
24351 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024352 ac_lo=$ac_mid; break
24353else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024355sed 's/^/| /' conftest.$ac_ext >&5
24356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024357 ac_hi=`expr '(' $ac_mid ')' - 1`
24358 if test $ac_mid -le $ac_hi; then
24359 ac_lo= ac_hi=
24360 break
24361 fi
24362 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024364
24365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024366 done
24367else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024369sed 's/^/| /' conftest.$ac_ext >&5
24370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024371 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024373
24374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024376
24377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024378# Binary search between lo and hi bounds.
24379while test "x$ac_lo" != "x$ac_hi"; do
24380 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024382/* confdefs.h. */
24383_ACEOF
24384cat confdefs.h >>conftest.$ac_ext
24385cat >>conftest.$ac_ext <<_ACEOF
24386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024387#include <wchar.h>
24388
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024389 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024390int
24391main ()
24392{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024394test_array [0] = 0
24395
24396 ;
24397 return 0;
24398}
24399_ACEOF
24400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024401if { (ac_try="$ac_compile"
24402case "(($ac_try" in
24403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24404 *) ac_try_echo=$ac_try;;
24405esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024409 grep -v '^ *+' conftest.er1 >conftest.err
24410 rm -f conftest.er1
24411 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024413 (exit $ac_status); } && {
24414 test -z "$ac_c_werror_flag" ||
24415 test ! -s conftest.err
24416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024417 ac_hi=$ac_mid
24418else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024420sed 's/^/| /' conftest.$ac_ext >&5
24421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024422 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024424
24425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024426done
24427case $ac_lo in
24428?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024429'') if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024430 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024431See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024432echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024433See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024434 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024435 else
24436 ac_cv_sizeof_wchar_t=0
24437 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024438esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024439else
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024441/* confdefs.h. */
24442_ACEOF
24443cat confdefs.h >>conftest.$ac_ext
24444cat >>conftest.$ac_ext <<_ACEOF
24445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024446#include <wchar.h>
24447
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024448 typedef wchar_t ac__type_sizeof_;
24449static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24450static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024451#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024452#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024453int
24454main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024455{
Martin v. Löwis11437992002-04-12 09:54:03 +000024456
24457 FILE *f = fopen ("conftest.val", "w");
24458 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024459 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024460 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024462 long int i = longval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024463 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024464 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024465 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024466 }
24467 else
24468 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024469 unsigned long int i = ulongval ();
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024470 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024471 return 1;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024472 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024473 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024474 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024475
24476 ;
24477 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024478}
Martin v. Löwis11437992002-04-12 09:54:03 +000024479_ACEOF
24480rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024481if { (ac_try="$ac_link"
24482case "(($ac_try" in
24483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24484 *) ac_try_echo=$ac_try;;
24485esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024488 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024490 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491 { (case "(($ac_try" in
24492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24493 *) ac_try_echo=$ac_try;;
24494esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024496 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024497 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024499 (exit $ac_status); }; }; then
24500 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024501else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024502 echo "$as_me: program exited with status $ac_status" >&5
24503echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024504sed 's/^/| /' conftest.$ac_ext >&5
24505
Martin v. Löwis11437992002-04-12 09:54:03 +000024506( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024507if test "$ac_cv_type_wchar_t" = yes; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024508 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024509See \`config.log' for more details." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024510echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024511See \`config.log' for more details." >&2;}
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024512 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024513 else
24514 ac_cv_sizeof_wchar_t=0
24515 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024517rm -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 +000024518fi
24519rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024520fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024521{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24522echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024523
24524
24525
Martin v. Löwis11437992002-04-12 09:54:03 +000024526cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024527#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024528_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024529
Michael W. Hudson54241132001-12-07 15:38:26 +000024530
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024531fi
24532
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024533{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24534echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024535have_ucs4_tcl=no
24536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024537/* confdefs.h. */
24538_ACEOF
24539cat confdefs.h >>conftest.$ac_ext
24540cat >>conftest.$ac_ext <<_ACEOF
24541/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024542
24543#include <tcl.h>
24544#if TCL_UTF_MAX != 6
24545# error "NOT UCS4_TCL"
24546#endif
24547int
24548main ()
24549{
24550
24551 ;
24552 return 0;
24553}
24554_ACEOF
24555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024556if { (ac_try="$ac_compile"
24557case "(($ac_try" in
24558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24559 *) ac_try_echo=$ac_try;;
24560esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024564 grep -v '^ *+' conftest.er1 >conftest.err
24565 rm -f conftest.er1
24566 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024568 (exit $ac_status); } && {
24569 test -z "$ac_c_werror_flag" ||
24570 test ! -s conftest.err
24571 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024572
24573
24574cat >>confdefs.h <<\_ACEOF
24575#define HAVE_UCS4_TCL 1
24576_ACEOF
24577
24578 have_ucs4_tcl=yes
24579
24580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024582sed 's/^/| /' conftest.$ac_ext >&5
24583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024584
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024585fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024586
24587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024588{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24589echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024590
Skip Montanaro6dead952003-09-25 14:50:04 +000024591# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024592if test "$wchar_h" = yes
24593then
24594 # check whether wchar_t is signed or not
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024595 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24596echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024597 if test "${ac_cv_wchar_t_signed+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024598 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024599else
24600
24601 if test "$cross_compiling" = yes; then
24602 ac_cv_wchar_t_signed=yes
24603else
24604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024605/* confdefs.h. */
24606_ACEOF
24607cat confdefs.h >>conftest.$ac_ext
24608cat >>conftest.$ac_ext <<_ACEOF
24609/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024610
24611 #include <wchar.h>
24612 int main()
24613 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024614 /* Success: exit code 0 */
24615 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024616 }
24617
24618_ACEOF
24619rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024620if { (ac_try="$ac_link"
24621case "(($ac_try" in
24622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24623 *) ac_try_echo=$ac_try;;
24624esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024626 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024627 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630 { (case "(($ac_try" in
24631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24632 *) ac_try_echo=$ac_try;;
24633esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024635 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024636 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024638 (exit $ac_status); }; }; then
24639 ac_cv_wchar_t_signed=yes
24640else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024641 echo "$as_me: program exited with status $ac_status" >&5
24642echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024643sed 's/^/| /' conftest.$ac_ext >&5
24644
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024645( exit $ac_status )
24646ac_cv_wchar_t_signed=no
24647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024648rm -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 +000024649fi
24650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024652fi
24653
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024654 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24655echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024656fi
24657
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024658{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24659echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024660
24661# Check whether --with-wide-unicode was given.
24662if test "${with_wide_unicode+set}" = set; then
24663 withval=$with_wide_unicode;
24664if test "$withval" != no
24665then unicode_size="4"
24666else unicode_size="2"
24667fi
24668
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024669else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024670
Georg Brandl52d168a2008-01-07 18:10:24 +000024671case "$have_ucs4_tcl" in
24672 yes) unicode_size="4" ;;
24673 *) unicode_size="2" ;;
24674esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024675
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024676fi
24677
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024678
24679
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024680
Georg Brandl52d168a2008-01-07 18:10:24 +000024681case "$unicode_size" in
24682 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024683#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024684_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024685 ;;
24686 *) cat >>confdefs.h <<\_ACEOF
24687#define Py_UNICODE_SIZE 2
24688_ACEOF
24689 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024690esac
24691
Michael W. Hudson54241132001-12-07 15:38:26 +000024692
Martin v. Löwis11437992002-04-12 09:54:03 +000024693
24694
Georg Brandl52d168a2008-01-07 18:10:24 +000024695# wchar_t is only usable if it maps to an unsigned type
24696if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024697 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024698then
24699 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024700
Martin v. Löwis11437992002-04-12 09:54:03 +000024701cat >>confdefs.h <<\_ACEOF
24702#define HAVE_USABLE_WCHAR_T 1
24703_ACEOF
24704
Georg Brandl52d168a2008-01-07 18:10:24 +000024705 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024706#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024707_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024708
Georg Brandl52d168a2008-01-07 18:10:24 +000024709elif test "$ac_cv_sizeof_short" = "$unicode_size"
24710then
24711 PY_UNICODE_TYPE="unsigned short"
24712 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024713#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024714_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024715
Georg Brandl52d168a2008-01-07 18:10:24 +000024716elif test "$ac_cv_sizeof_long" = "$unicode_size"
24717then
24718 PY_UNICODE_TYPE="unsigned long"
24719 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024720#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024721_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024722
Georg Brandl52d168a2008-01-07 18:10:24 +000024723else
24724 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024725fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024726{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24727echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024728
24729# check for endianness
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024730{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24731echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024732if test "${ac_cv_c_bigendian+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024734else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024735 # See if sys/param.h defines the BYTE_ORDER macro.
24736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024737/* confdefs.h. */
24738_ACEOF
24739cat confdefs.h >>conftest.$ac_ext
24740cat >>conftest.$ac_ext <<_ACEOF
24741/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024742#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024743#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024744
Martin v. Löwis11437992002-04-12 09:54:03 +000024745int
24746main ()
24747{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024748#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24749 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24750 bogus endian macros
24751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024752
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
Guido van Rossumef2255b2000-03-10 22:30:29 +000024774 # It does; now see whether it defined to BIG_ENDIAN or not.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024776/* confdefs.h. */
24777_ACEOF
24778cat confdefs.h >>conftest.$ac_ext
24779cat >>conftest.$ac_ext <<_ACEOF
24780/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024781#include <sys/types.h>
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024782#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024783
Martin v. Löwis11437992002-04-12 09:54:03 +000024784int
24785main ()
24786{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024787#if BYTE_ORDER != BIG_ENDIAN
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024788 not big endian
24789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024790
24791 ;
24792 return 0;
24793}
24794_ACEOF
24795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024796if { (ac_try="$ac_compile"
24797case "(($ac_try" in
24798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24799 *) ac_try_echo=$ac_try;;
24800esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024804 grep -v '^ *+' conftest.er1 >conftest.err
24805 rm -f conftest.er1
24806 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024808 (exit $ac_status); } && {
24809 test -z "$ac_c_werror_flag" ||
24810 test ! -s conftest.err
24811 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024812 ac_cv_c_bigendian=yes
24813else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024815sed 's/^/| /' conftest.$ac_ext >&5
24816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819
24820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024821else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024822 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024823sed 's/^/| /' conftest.$ac_ext >&5
24824
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024825 # It does not; compile a test program.
24826if test "$cross_compiling" = yes; then
24827 # try to guess the endianness by grepping values into an object file
24828 ac_cv_c_bigendian=unknown
24829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024830/* confdefs.h. */
24831_ACEOF
24832cat confdefs.h >>conftest.$ac_ext
24833cat >>conftest.$ac_ext <<_ACEOF
24834/* end confdefs.h. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024835short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24836short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24837void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24838short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24839short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24840void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024841int
24842main ()
24843{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024844 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024845 ;
24846 return 0;
24847}
24848_ACEOF
24849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024850if { (ac_try="$ac_compile"
24851case "(($ac_try" in
24852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24853 *) ac_try_echo=$ac_try;;
24854esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024858 grep -v '^ *+' conftest.er1 >conftest.err
24859 rm -f conftest.er1
24860 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024862 (exit $ac_status); } && {
24863 test -z "$ac_c_werror_flag" ||
24864 test ! -s conftest.err
24865 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024866 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024867 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024868fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024869if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24870 if test "$ac_cv_c_bigendian" = unknown; then
24871 ac_cv_c_bigendian=no
24872 else
24873 # finding both strings is unlikely to happen, but who knows?
24874 ac_cv_c_bigendian=unknown
24875 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024876fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024877else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024879sed 's/^/| /' conftest.$ac_ext >&5
24880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024881
Martin v. Löwis11437992002-04-12 09:54:03 +000024882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024883
24884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024885else
24886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024887/* confdefs.h. */
24888_ACEOF
24889cat confdefs.h >>conftest.$ac_ext
24890cat >>conftest.$ac_ext <<_ACEOF
24891/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024893int
24894main ()
24895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024897 /* Are we little or big endian? From Harbison&Steele. */
24898 union
24899 {
24900 long int l;
24901 char c[sizeof (long int)];
24902 } u;
24903 u.l = 1;
24904 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024905
24906 ;
24907 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024908}
Martin v. Löwis11437992002-04-12 09:54:03 +000024909_ACEOF
24910rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024911if { (ac_try="$ac_link"
24912case "(($ac_try" in
24913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24914 *) ac_try_echo=$ac_try;;
24915esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024918 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024921 { (case "(($ac_try" in
24922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24923 *) ac_try_echo=$ac_try;;
24924esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024927 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024930 ac_cv_c_bigendian=no
24931else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024932 echo "$as_me: program exited with status $ac_status" >&5
24933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Martin v. Löwis11437992002-04-12 09:54:03 +000024936( exit $ac_status )
24937ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024939rm -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 +000024940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024941
24942
Martin v. Löwis11437992002-04-12 09:54:03 +000024943fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024944
24945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24946fi
24947{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24948echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24949case $ac_cv_c_bigendian in
24950 yes)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024951
24952cat >>confdefs.h <<\_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024953#define WORDS_BIGENDIAN 1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024954_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024955 ;;
24956 no)
24957 ;;
24958 *)
24959 { { echo "$as_me:$LINENO: error: unknown endianness
24960presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24961echo "$as_me: error: unknown endianness
24962presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024963 { (exit 1); exit 1; }; } ;;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024964esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024965
Michael W. Hudson54241132001-12-07 15:38:26 +000024966
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024967# Check whether right shifting a negative integer extends the sign bit
24968# or fills with zeros (like the Cray J90, according to Tim Peters).
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024969{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24970echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024971if test "${ac_cv_rshift_extends_sign+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024972 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024973else
Martin v. Löwis11437992002-04-12 09:54:03 +000024974
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024975if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024976 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024977else
Martin v. Löwis11437992002-04-12 09:54:03 +000024978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024979/* confdefs.h. */
24980_ACEOF
24981cat confdefs.h >>conftest.$ac_ext
24982cat >>conftest.$ac_ext <<_ACEOF
24983/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024984
24985int main()
24986{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024987 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024988}
24989
Martin v. Löwis11437992002-04-12 09:54:03 +000024990_ACEOF
24991rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024992if { (ac_try="$ac_link"
24993case "(($ac_try" in
24994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24995 *) ac_try_echo=$ac_try;;
24996esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000024997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024998 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024999 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002 { (case "(($ac_try" in
25003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25004 *) ac_try_echo=$ac_try;;
25005esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025007 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025008 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025010 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025011 ac_cv_rshift_extends_sign=yes
25012else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025013 echo "$as_me: program exited with status $ac_status" >&5
25014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025015sed 's/^/| /' conftest.$ac_ext >&5
25016
Martin v. Löwis11437992002-04-12 09:54:03 +000025017( exit $ac_status )
25018ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025020rm -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 +000025021fi
25022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025023
25024fi
25025
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025026{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25027echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025028if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025029then
Martin v. Löwis11437992002-04-12 09:54:03 +000025030
25031cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025032#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025033_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025034
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025035fi
25036
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025037# check for getc_unlocked and related locking functions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025038{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25039echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025040if test "${ac_cv_have_getc_unlocked+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025041 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025042else
Martin v. Löwis11437992002-04-12 09:54:03 +000025043
25044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025045/* confdefs.h. */
25046_ACEOF
25047cat confdefs.h >>conftest.$ac_ext
25048cat >>conftest.$ac_ext <<_ACEOF
25049/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025050#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025051int
25052main ()
25053{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025054
25055 FILE *f = fopen("/dev/null", "r");
25056 flockfile(f);
25057 getc_unlocked(f);
25058 funlockfile(f);
25059
Martin v. Löwis11437992002-04-12 09:54:03 +000025060 ;
25061 return 0;
25062}
25063_ACEOF
25064rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025065if { (ac_try="$ac_link"
25066case "(($ac_try" in
25067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25068 *) ac_try_echo=$ac_try;;
25069esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025071 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025073 grep -v '^ *+' conftest.er1 >conftest.err
25074 rm -f conftest.er1
25075 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025077 (exit $ac_status); } && {
25078 test -z "$ac_c_werror_flag" ||
25079 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025080 } && test -s conftest$ac_exeext &&
25081 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025082 ac_cv_have_getc_unlocked=yes
25083else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025085sed 's/^/| /' conftest.$ac_ext >&5
25086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025087 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025089
25090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025091 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025092fi
25093
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025094{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25095echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025096if test "$ac_cv_have_getc_unlocked" = yes
25097then
Martin v. Löwis11437992002-04-12 09:54:03 +000025098
25099cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025100#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025101_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025102
25103fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025104
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025105# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025106# save the value of LIBS so we don't actually link Python with readline
25107LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025108
Gregory P. Smith18820942008-09-07 06:24:49 +000025109# On some systems we need to link readline to a termcap compatible
25110# library. NOTE: Keep the precedence of listed libraries synchronised
25111# with setup.py.
25112py_cv_lib_readline=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025113{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25114echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025115for py_libtermcap in "" ncursesw ncurses curses termcap; do
25116 if test -z "$py_libtermcap"; then
25117 READLINE_LIBS="-lreadline"
25118 else
25119 READLINE_LIBS="-lreadline -l$py_libtermcap"
25120 fi
25121 LIBS="$READLINE_LIBS $LIBS_no_readline"
25122 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025123/* confdefs.h. */
25124_ACEOF
25125cat confdefs.h >>conftest.$ac_ext
25126cat >>conftest.$ac_ext <<_ACEOF
25127/* end confdefs.h. */
25128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025129/* Override any GCC internal prototype to avoid an error.
25130 Use char because int might match the return type of a GCC
25131 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025132#ifdef __cplusplus
25133extern "C"
25134#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025135char readline ();
25136int
25137main ()
25138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025139return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025140 ;
25141 return 0;
25142}
25143_ACEOF
25144rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025145if { (ac_try="$ac_link"
25146case "(($ac_try" in
25147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25148 *) ac_try_echo=$ac_try;;
25149esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025151 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025152 ac_status=$?
25153 grep -v '^ *+' conftest.er1 >conftest.err
25154 rm -f conftest.er1
25155 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025157 (exit $ac_status); } && {
25158 test -z "$ac_c_werror_flag" ||
25159 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025160 } && test -s conftest$ac_exeext &&
25161 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025162 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025163else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025164 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025165sed 's/^/| /' conftest.$ac_ext >&5
25166
Gregory P. Smith18820942008-09-07 06:24:49 +000025167
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169
25170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025171 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025172 if test $py_cv_lib_readline = yes; then
25173 break
25174 fi
25175done
25176# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25177#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025178if test $py_cv_lib_readline = no; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025179 { echo "$as_me:$LINENO: result: none" >&5
25180echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025181else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025182 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25183echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025184
25185cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025186#define HAVE_LIBREADLINE 1
25187_ACEOF
25188
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025189fi
25190
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025191# check for readline 2.1
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025192{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25193echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025194if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025195 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025196else
25197 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025198LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025199cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025200/* confdefs.h. */
25201_ACEOF
25202cat confdefs.h >>conftest.$ac_ext
25203cat >>conftest.$ac_ext <<_ACEOF
25204/* end confdefs.h. */
25205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025206/* Override any GCC internal prototype to avoid an error.
25207 Use char because int might match the return type of a GCC
25208 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025209#ifdef __cplusplus
25210extern "C"
25211#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025212char rl_callback_handler_install ();
25213int
25214main ()
25215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025216return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025217 ;
25218 return 0;
25219}
25220_ACEOF
25221rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025222if { (ac_try="$ac_link"
25223case "(($ac_try" in
25224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25225 *) ac_try_echo=$ac_try;;
25226esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025228 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025230 grep -v '^ *+' conftest.er1 >conftest.err
25231 rm -f conftest.er1
25232 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025234 (exit $ac_status); } && {
25235 test -z "$ac_c_werror_flag" ||
25236 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025237 } && test -s conftest$ac_exeext &&
25238 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025239 ac_cv_lib_readline_rl_callback_handler_install=yes
25240else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025241 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025242sed 's/^/| /' conftest.$ac_ext >&5
25243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025244 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025246
25247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025248 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025249LIBS=$ac_check_lib_save_LIBS
25250fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025251{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25252echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25253if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025254
25255cat >>confdefs.h <<\_ACEOF
25256#define HAVE_RL_CALLBACK 1
25257_ACEOF
25258
25259fi
25260
25261
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025262# check for readline 2.2
25263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025264/* confdefs.h. */
25265_ACEOF
25266cat confdefs.h >>conftest.$ac_ext
25267cat >>conftest.$ac_ext <<_ACEOF
25268/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025269#include <readline/readline.h>
25270_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025271if { (ac_try="$ac_cpp conftest.$ac_ext"
25272case "(($ac_try" in
25273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25274 *) ac_try_echo=$ac_try;;
25275esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025277 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025278 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025279 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025280 rm -f conftest.er1
25281 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025283 (exit $ac_status); } >/dev/null && {
25284 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25285 test ! -s conftest.err
25286 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025287 have_readline=yes
25288else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025290sed 's/^/| /' conftest.$ac_ext >&5
25291
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025292 have_readline=no
25293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025294
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025295rm -f conftest.err conftest.$ac_ext
25296if test $have_readline = yes
25297then
25298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025299/* confdefs.h. */
25300_ACEOF
25301cat confdefs.h >>conftest.$ac_ext
25302cat >>conftest.$ac_ext <<_ACEOF
25303/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025304#include <readline/readline.h>
25305
25306_ACEOF
25307if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025308 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025309
25310cat >>confdefs.h <<\_ACEOF
25311#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25312_ACEOF
25313
25314fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025315rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025316
Antoine Pitroud5131772009-10-26 19:22:14 +000025317 cat >conftest.$ac_ext <<_ACEOF
25318/* confdefs.h. */
25319_ACEOF
25320cat confdefs.h >>conftest.$ac_ext
25321cat >>conftest.$ac_ext <<_ACEOF
25322/* end confdefs.h. */
25323#include <readline/readline.h>
25324
25325_ACEOF
25326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25327 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25328
25329cat >>confdefs.h <<\_ACEOF
25330#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25331_ACEOF
25332
25333fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025334rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000025335
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025336fi
25337
Martin v. Löwis0daad592001-09-30 21:09:59 +000025338# check for readline 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025339{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25340echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025341if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025343else
Martin v. Löwis11437992002-04-12 09:54:03 +000025344 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025345LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025347/* confdefs.h. */
25348_ACEOF
25349cat confdefs.h >>conftest.$ac_ext
25350cat >>conftest.$ac_ext <<_ACEOF
25351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353/* Override any GCC internal prototype to avoid an error.
25354 Use char because int might match the return type of a GCC
25355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025356#ifdef __cplusplus
25357extern "C"
25358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025359char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025360int
25361main ()
25362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025363return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025364 ;
25365 return 0;
25366}
25367_ACEOF
25368rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025369if { (ac_try="$ac_link"
25370case "(($ac_try" in
25371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25372 *) ac_try_echo=$ac_try;;
25373esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025377 grep -v '^ *+' conftest.er1 >conftest.err
25378 rm -f conftest.er1
25379 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025381 (exit $ac_status); } && {
25382 test -z "$ac_c_werror_flag" ||
25383 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025384 } && test -s conftest$ac_exeext &&
25385 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025386 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025387else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025389sed 's/^/| /' conftest.$ac_ext >&5
25390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025391 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025393
25394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025395 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025396LIBS=$ac_check_lib_save_LIBS
25397fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025398{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25399echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25400if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025401
Martin v. Löwis11437992002-04-12 09:54:03 +000025402cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025403#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025404_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025405
Martin v. Löwis0daad592001-09-30 21:09:59 +000025406fi
25407
Michael W. Hudson54241132001-12-07 15:38:26 +000025408
Thomas Wouters89d996e2007-09-08 17:39:28 +000025409# also in 4.0
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025410{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25411echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025412if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025413 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025414else
25415 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025416LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025417cat >conftest.$ac_ext <<_ACEOF
25418/* confdefs.h. */
25419_ACEOF
25420cat confdefs.h >>conftest.$ac_ext
25421cat >>conftest.$ac_ext <<_ACEOF
25422/* end confdefs.h. */
25423
25424/* Override any GCC internal prototype to avoid an error.
25425 Use char because int might match the return type of a GCC
25426 builtin and then its argument prototype would still apply. */
25427#ifdef __cplusplus
25428extern "C"
25429#endif
25430char rl_completion_display_matches_hook ();
25431int
25432main ()
25433{
25434return rl_completion_display_matches_hook ();
25435 ;
25436 return 0;
25437}
25438_ACEOF
25439rm -f conftest.$ac_objext conftest$ac_exeext
25440if { (ac_try="$ac_link"
25441case "(($ac_try" in
25442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25443 *) ac_try_echo=$ac_try;;
25444esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025446 (eval "$ac_link") 2>conftest.er1
25447 ac_status=$?
25448 grep -v '^ *+' conftest.er1 >conftest.err
25449 rm -f conftest.er1
25450 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025452 (exit $ac_status); } && {
25453 test -z "$ac_c_werror_flag" ||
25454 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025455 } && test -s conftest$ac_exeext &&
25456 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025457 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25458else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025459 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025460sed 's/^/| /' conftest.$ac_ext >&5
25461
25462 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25463fi
25464
25465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25466 conftest$ac_exeext conftest.$ac_ext
25467LIBS=$ac_check_lib_save_LIBS
25468fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025469{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25470echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25471if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025472
25473cat >>confdefs.h <<\_ACEOF
25474#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25475_ACEOF
25476
25477fi
25478
25479
Martin v. Löwis0daad592001-09-30 21:09:59 +000025480# check for readline 4.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025481{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25482echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025483if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025484 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025485else
Martin v. Löwis11437992002-04-12 09:54:03 +000025486 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025487LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025489/* confdefs.h. */
25490_ACEOF
25491cat confdefs.h >>conftest.$ac_ext
25492cat >>conftest.$ac_ext <<_ACEOF
25493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495/* Override any GCC internal prototype to avoid an error.
25496 Use char because int might match the return type of a GCC
25497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025498#ifdef __cplusplus
25499extern "C"
25500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025501char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025502int
25503main ()
25504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025505return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025506 ;
25507 return 0;
25508}
25509_ACEOF
25510rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025511if { (ac_try="$ac_link"
25512case "(($ac_try" in
25513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25514 *) ac_try_echo=$ac_try;;
25515esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025517 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025519 grep -v '^ *+' conftest.er1 >conftest.err
25520 rm -f conftest.er1
25521 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025523 (exit $ac_status); } && {
25524 test -z "$ac_c_werror_flag" ||
25525 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025526 } && test -s conftest$ac_exeext &&
25527 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025528 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025529else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025531sed 's/^/| /' conftest.$ac_ext >&5
25532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025533 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025535
25536rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025537 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025538LIBS=$ac_check_lib_save_LIBS
25539fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025540{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25541echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25542if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025543
Martin v. Löwis11437992002-04-12 09:54:03 +000025544cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025545#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025546_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025547
Guido van Rossum353ae582001-07-10 16:45:32 +000025548fi
25549
Jack Jansendd19cf82001-12-06 22:36:17 +000025550
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025551# also in readline 4.2
25552cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025553/* confdefs.h. */
25554_ACEOF
25555cat confdefs.h >>conftest.$ac_ext
25556cat >>conftest.$ac_ext <<_ACEOF
25557/* end confdefs.h. */
25558#include <readline/readline.h>
25559_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025560if { (ac_try="$ac_cpp conftest.$ac_ext"
25561case "(($ac_try" in
25562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25563 *) ac_try_echo=$ac_try;;
25564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025567 ac_status=$?
25568 grep -v '^ *+' conftest.er1 >conftest.err
25569 rm -f conftest.er1
25570 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572 (exit $ac_status); } >/dev/null && {
25573 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25574 test ! -s conftest.err
25575 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025576 have_readline=yes
25577else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025578 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025579sed 's/^/| /' conftest.$ac_ext >&5
25580
25581 have_readline=no
25582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025583
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025584rm -f conftest.err conftest.$ac_ext
25585if test $have_readline = yes
25586then
25587 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025588/* confdefs.h. */
25589_ACEOF
25590cat confdefs.h >>conftest.$ac_ext
25591cat >>conftest.$ac_ext <<_ACEOF
25592/* end confdefs.h. */
25593#include <readline/readline.h>
25594
25595_ACEOF
25596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25597 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25598
25599cat >>confdefs.h <<\_ACEOF
25600#define HAVE_RL_CATCH_SIGNAL 1
25601_ACEOF
25602
25603fi
Benjamin Petersonb2d90462009-12-31 03:23:10 +000025604rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025605
25606fi
25607
Martin v. Löwis82bca632006-02-10 20:49:30 +000025608# End of readline checks: restore LIBS
25609LIBS=$LIBS_no_readline
25610
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025611{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25612echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025613if test "${ac_cv_broken_nice+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025614 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025615else
Martin v. Löwis11437992002-04-12 09:54:03 +000025616
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025617if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025618 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025619else
Martin v. Löwis11437992002-04-12 09:54:03 +000025620 cat >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. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025626
25627int main()
25628{
25629 int val1 = nice(1);
25630 if (val1 != -1 && val1 == nice(2))
25631 exit(0);
25632 exit(1);
25633}
25634
Martin v. Löwis11437992002-04-12 09:54:03 +000025635_ACEOF
25636rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637if { (ac_try="$ac_link"
25638case "(($ac_try" in
25639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25640 *) ac_try_echo=$ac_try;;
25641esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025643 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025644 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 { (case "(($ac_try" in
25648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25649 *) ac_try_echo=$ac_try;;
25650esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025652 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025653 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025655 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025656 ac_cv_broken_nice=yes
25657else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025658 echo "$as_me: program exited with status $ac_status" >&5
25659echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025660sed 's/^/| /' conftest.$ac_ext >&5
25661
Martin v. Löwis11437992002-04-12 09:54:03 +000025662( exit $ac_status )
25663ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025665rm -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 +000025666fi
25667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025668
25669fi
25670
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025671{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25672echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025673if test "$ac_cv_broken_nice" = yes
25674then
Martin v. Löwis11437992002-04-12 09:54:03 +000025675
25676cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025677#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025678_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025679
25680fi
25681
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025682{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25683echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025684if test "${ac_cv_broken_poll+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025685 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025686else
25687 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025688 ac_cv_broken_poll=no
25689else
25690 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025691/* confdefs.h. */
25692_ACEOF
25693cat confdefs.h >>conftest.$ac_ext
25694cat >>conftest.$ac_ext <<_ACEOF
25695/* end confdefs.h. */
25696
25697#include <poll.h>
25698
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025699int main()
25700{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025701 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025702 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025703
25704 close (42);
25705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025706 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025707 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025708 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025709 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025710 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025711 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025712 return 1;
25713}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025714
25715_ACEOF
25716rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025717if { (ac_try="$ac_link"
25718case "(($ac_try" in
25719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25720 *) ac_try_echo=$ac_try;;
25721esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025723 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025724 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025727 { (case "(($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_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025733 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025735 (exit $ac_status); }; }; then
25736 ac_cv_broken_poll=yes
25737else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025738 echo "$as_me: program exited with status $ac_status" >&5
25739echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025740sed 's/^/| /' conftest.$ac_ext >&5
25741
25742( exit $ac_status )
25743ac_cv_broken_poll=no
25744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745rm -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 +000025746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025747
25748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025749fi
25750
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025751{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25752echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025753if test "$ac_cv_broken_poll" = yes
25754then
25755
25756cat >>confdefs.h <<\_ACEOF
25757#define HAVE_BROKEN_POLL 1
25758_ACEOF
25759
25760fi
25761
Brett Cannon43802422005-02-10 20:48:03 +000025762# 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 +000025763# (which is not required by ISO C or UNIX spec) and/or if we support
25764# tzname[]
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025765{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25766echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025767if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025768 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025769else
25770 cat >conftest.$ac_ext <<_ACEOF
25771/* confdefs.h. */
25772_ACEOF
25773cat confdefs.h >>conftest.$ac_ext
25774cat >>conftest.$ac_ext <<_ACEOF
25775/* end confdefs.h. */
25776#include <sys/types.h>
25777#include <$ac_cv_struct_tm>
25778
25779
25780int
25781main ()
25782{
25783static struct tm ac_aggr;
25784if (ac_aggr.tm_zone)
25785return 0;
25786 ;
25787 return 0;
25788}
25789_ACEOF
25790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025791if { (ac_try="$ac_compile"
25792case "(($ac_try" in
25793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25794 *) ac_try_echo=$ac_try;;
25795esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025797 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025798 ac_status=$?
25799 grep -v '^ *+' conftest.er1 >conftest.err
25800 rm -f conftest.er1
25801 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025803 (exit $ac_status); } && {
25804 test -z "$ac_c_werror_flag" ||
25805 test ! -s conftest.err
25806 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025807 ac_cv_member_struct_tm_tm_zone=yes
25808else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025809 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025810sed 's/^/| /' conftest.$ac_ext >&5
25811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025812 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025813/* confdefs.h. */
25814_ACEOF
25815cat confdefs.h >>conftest.$ac_ext
25816cat >>conftest.$ac_ext <<_ACEOF
25817/* end confdefs.h. */
25818#include <sys/types.h>
25819#include <$ac_cv_struct_tm>
25820
25821
25822int
25823main ()
25824{
25825static struct tm ac_aggr;
25826if (sizeof ac_aggr.tm_zone)
25827return 0;
25828 ;
25829 return 0;
25830}
25831_ACEOF
25832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025833if { (ac_try="$ac_compile"
25834case "(($ac_try" in
25835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25836 *) ac_try_echo=$ac_try;;
25837esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025839 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025840 ac_status=$?
25841 grep -v '^ *+' conftest.er1 >conftest.err
25842 rm -f conftest.er1
25843 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025845 (exit $ac_status); } && {
25846 test -z "$ac_c_werror_flag" ||
25847 test ! -s conftest.err
25848 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025849 ac_cv_member_struct_tm_tm_zone=yes
25850else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025851 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025852sed 's/^/| /' conftest.$ac_ext >&5
25853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025854 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025856
25857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025859
25860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025861fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025862{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25863echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25864if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025865
25866cat >>confdefs.h <<_ACEOF
25867#define HAVE_STRUCT_TM_TM_ZONE 1
25868_ACEOF
25869
25870
25871fi
25872
25873if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25874
25875cat >>confdefs.h <<\_ACEOF
25876#define HAVE_TM_ZONE 1
25877_ACEOF
25878
25879else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025880 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25881echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025882if test "${ac_cv_have_decl_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025883 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025884else
25885 cat >conftest.$ac_ext <<_ACEOF
25886/* confdefs.h. */
25887_ACEOF
25888cat confdefs.h >>conftest.$ac_ext
25889cat >>conftest.$ac_ext <<_ACEOF
25890/* end confdefs.h. */
25891#include <time.h>
25892
25893int
25894main ()
25895{
25896#ifndef tzname
25897 (void) tzname;
25898#endif
25899
25900 ;
25901 return 0;
25902}
25903_ACEOF
25904rm -f conftest.$ac_objext
25905if { (ac_try="$ac_compile"
25906case "(($ac_try" in
25907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25908 *) ac_try_echo=$ac_try;;
25909esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025911 (eval "$ac_compile") 2>conftest.er1
25912 ac_status=$?
25913 grep -v '^ *+' conftest.er1 >conftest.err
25914 rm -f conftest.er1
25915 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025917 (exit $ac_status); } && {
25918 test -z "$ac_c_werror_flag" ||
25919 test ! -s conftest.err
25920 } && test -s conftest.$ac_objext; then
25921 ac_cv_have_decl_tzname=yes
25922else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025923 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025924sed 's/^/| /' conftest.$ac_ext >&5
25925
25926 ac_cv_have_decl_tzname=no
25927fi
25928
25929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25930fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025931{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25932echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25933if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025934
25935cat >>confdefs.h <<_ACEOF
25936#define HAVE_DECL_TZNAME 1
25937_ACEOF
25938
25939
25940else
25941 cat >>confdefs.h <<_ACEOF
25942#define HAVE_DECL_TZNAME 0
25943_ACEOF
25944
25945
25946fi
25947
25948
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025949 { echo "$as_me:$LINENO: checking for tzname" >&5
25950echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025951if test "${ac_cv_var_tzname+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025952 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025953else
25954 cat >conftest.$ac_ext <<_ACEOF
25955/* confdefs.h. */
25956_ACEOF
25957cat confdefs.h >>conftest.$ac_ext
25958cat >>conftest.$ac_ext <<_ACEOF
25959/* end confdefs.h. */
25960#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025961#if !HAVE_DECL_TZNAME
25962extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025963#endif
25964
25965int
25966main ()
25967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025968return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025969 ;
25970 return 0;
25971}
25972_ACEOF
25973rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025974if { (ac_try="$ac_link"
25975case "(($ac_try" in
25976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25977 *) ac_try_echo=$ac_try;;
25978esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025980 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025981 ac_status=$?
25982 grep -v '^ *+' conftest.er1 >conftest.err
25983 rm -f conftest.er1
25984 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025986 (exit $ac_status); } && {
25987 test -z "$ac_c_werror_flag" ||
25988 test ! -s conftest.err
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025989 } && test -s conftest$ac_exeext &&
25990 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025991 ac_cv_var_tzname=yes
25992else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000025993 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025994sed 's/^/| /' conftest.$ac_ext >&5
25995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025996 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025998
25999rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026000 conftest$ac_exeext conftest.$ac_ext
26001fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026002{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26003echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026004 if test $ac_cv_var_tzname = yes; then
26005
26006cat >>confdefs.h <<\_ACEOF
26007#define HAVE_TZNAME 1
26008_ACEOF
26009
26010 fi
26011fi
26012
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026013
Martin v. Löwis1d459062005-03-14 21:23:33 +000026014# check tzset(3) exists and works like we expect it to
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026015{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26016echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026017if test "${ac_cv_working_tzset+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026018 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026019else
26020
26021if test "$cross_compiling" = yes; then
26022 ac_cv_working_tzset=no
26023else
26024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026025/* confdefs.h. */
26026_ACEOF
26027cat confdefs.h >>conftest.$ac_ext
26028cat >>conftest.$ac_ext <<_ACEOF
26029/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026030
26031#include <stdlib.h>
26032#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026033#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026034
26035#if HAVE_TZNAME
26036extern char *tzname[];
26037#endif
26038
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026039int main()
26040{
Brett Cannon18367812003-09-19 00:59:16 +000026041 /* Note that we need to ensure that not only does tzset(3)
26042 do 'something' with localtime, but it works as documented
26043 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026044 This includes making sure that tzname is set properly if
26045 tm->tm_zone does not exist since it is the alternative way
26046 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026047
26048 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026049 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026050 */
26051
Martin v. Löwis1d459062005-03-14 21:23:33 +000026052 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026053 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26054
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026055 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026056 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026057 if (localtime(&groundhogday)->tm_hour != 0)
26058 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026059#if HAVE_TZNAME
26060 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26061 if (strcmp(tzname[0], "UTC") ||
26062 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26063 exit(1);
26064#endif
Brett Cannon18367812003-09-19 00:59:16 +000026065
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026066 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026067 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026068 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026069 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026070#if HAVE_TZNAME
26071 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26072 exit(1);
26073#endif
Brett Cannon18367812003-09-19 00:59:16 +000026074
26075 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26076 tzset();
26077 if (localtime(&groundhogday)->tm_hour != 11)
26078 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026079#if HAVE_TZNAME
26080 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26081 exit(1);
26082#endif
26083
26084#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026085 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26086 exit(1);
26087 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26088 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026089#endif
Brett Cannon18367812003-09-19 00:59:16 +000026090
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026091 exit(0);
26092}
26093
26094_ACEOF
26095rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026096if { (ac_try="$ac_link"
26097case "(($ac_try" in
26098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26099 *) ac_try_echo=$ac_try;;
26100esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026102 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026103 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026105 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026106 { (case "(($ac_try" in
26107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26108 *) ac_try_echo=$ac_try;;
26109esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026111 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026112 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026114 (exit $ac_status); }; }; then
26115 ac_cv_working_tzset=yes
26116else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026117 echo "$as_me: program exited with status $ac_status" >&5
26118echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026119sed 's/^/| /' conftest.$ac_ext >&5
26120
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026121( exit $ac_status )
26122ac_cv_working_tzset=no
26123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124rm -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 +000026125fi
26126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026127
26128fi
26129
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026130{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26131echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026132if test "$ac_cv_working_tzset" = yes
26133then
26134
26135cat >>confdefs.h <<\_ACEOF
26136#define HAVE_WORKING_TZSET 1
26137_ACEOF
26138
26139fi
26140
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026141# Look for subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026142{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26143echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026144if test "${ac_cv_stat_tv_nsec+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026146else
26147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026148/* confdefs.h. */
26149_ACEOF
26150cat confdefs.h >>conftest.$ac_ext
26151cat >>conftest.$ac_ext <<_ACEOF
26152/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026153#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026154int
26155main ()
26156{
26157
26158struct stat st;
26159st.st_mtim.tv_nsec = 1;
26160
26161 ;
26162 return 0;
26163}
26164_ACEOF
26165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026166if { (ac_try="$ac_compile"
26167case "(($ac_try" in
26168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26169 *) ac_try_echo=$ac_try;;
26170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026174 grep -v '^ *+' conftest.er1 >conftest.err
26175 rm -f conftest.er1
26176 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026178 (exit $ac_status); } && {
26179 test -z "$ac_c_werror_flag" ||
26180 test ! -s conftest.err
26181 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026182 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026183else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026185sed 's/^/| /' conftest.$ac_ext >&5
26186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026188fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26191fi
26192
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026193{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26194echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026195if test "$ac_cv_stat_tv_nsec" = yes
26196then
26197
26198cat >>confdefs.h <<\_ACEOF
26199#define HAVE_STAT_TV_NSEC 1
26200_ACEOF
26201
26202fi
26203
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026204# Look for BSD style subsecond timestamps in struct stat
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026205{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26206echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026207if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026208 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026209else
26210 cat >conftest.$ac_ext <<_ACEOF
26211/* confdefs.h. */
26212_ACEOF
26213cat confdefs.h >>conftest.$ac_ext
26214cat >>conftest.$ac_ext <<_ACEOF
26215/* end confdefs.h. */
26216#include <sys/stat.h>
26217int
26218main ()
26219{
26220
26221struct stat st;
26222st.st_mtimespec.tv_nsec = 1;
26223
26224 ;
26225 return 0;
26226}
26227_ACEOF
26228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026229if { (ac_try="$ac_compile"
26230case "(($ac_try" in
26231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26232 *) ac_try_echo=$ac_try;;
26233esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026235 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026236 ac_status=$?
26237 grep -v '^ *+' conftest.er1 >conftest.err
26238 rm -f conftest.er1
26239 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026241 (exit $ac_status); } && {
26242 test -z "$ac_c_werror_flag" ||
26243 test ! -s conftest.err
26244 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026245 ac_cv_stat_tv_nsec2=yes
26246else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026247 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026248sed 's/^/| /' conftest.$ac_ext >&5
26249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026250 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026251fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26254fi
26255
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026256{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26257echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026258if test "$ac_cv_stat_tv_nsec2" = yes
26259then
26260
26261cat >>confdefs.h <<\_ACEOF
26262#define HAVE_STAT_TV_NSEC2 1
26263_ACEOF
26264
26265fi
26266
Jack Jansen666b1e72001-10-31 12:11:48 +000026267# On HP/UX 11.0, mvwdelch is a block with a return statement
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026268{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26269echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026270if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026271 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026272else
Martin v. Löwis11437992002-04-12 09:54:03 +000026273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026274/* confdefs.h. */
26275_ACEOF
26276cat confdefs.h >>conftest.$ac_ext
26277cat >>conftest.$ac_ext <<_ACEOF
26278/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026279#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026280int
26281main ()
26282{
Jack Jansen666b1e72001-10-31 12:11:48 +000026283
26284 int rtn;
26285 rtn = mvwdelch(0,0,0);
26286
Martin v. Löwis11437992002-04-12 09:54:03 +000026287 ;
26288 return 0;
26289}
26290_ACEOF
26291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026292if { (ac_try="$ac_compile"
26293case "(($ac_try" in
26294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26295 *) ac_try_echo=$ac_try;;
26296esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026300 grep -v '^ *+' conftest.er1 >conftest.err
26301 rm -f conftest.er1
26302 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026304 (exit $ac_status); } && {
26305 test -z "$ac_c_werror_flag" ||
26306 test ! -s conftest.err
26307 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026308 ac_cv_mvwdelch_is_expression=yes
26309else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026311sed 's/^/| /' conftest.$ac_ext >&5
26312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026313 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026314fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26317fi
26318
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026319{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26320echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026321
26322if test "$ac_cv_mvwdelch_is_expression" = yes
26323then
Martin v. Löwis11437992002-04-12 09:54:03 +000026324
26325cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026326#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026327_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026328
26329fi
26330
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026331{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26332echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026333if test "${ac_cv_window_has_flags+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026334 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026335else
Martin v. Löwis11437992002-04-12 09:54:03 +000026336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026337/* confdefs.h. */
26338_ACEOF
26339cat confdefs.h >>conftest.$ac_ext
26340cat >>conftest.$ac_ext <<_ACEOF
26341/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026342#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026343int
26344main ()
26345{
Jack Jansen666b1e72001-10-31 12:11:48 +000026346
26347 WINDOW *w;
26348 w->_flags = 0;
26349
Martin v. Löwis11437992002-04-12 09:54:03 +000026350 ;
26351 return 0;
26352}
26353_ACEOF
26354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355if { (ac_try="$ac_compile"
26356case "(($ac_try" in
26357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26358 *) ac_try_echo=$ac_try;;
26359esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026363 grep -v '^ *+' conftest.er1 >conftest.err
26364 rm -f conftest.er1
26365 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026367 (exit $ac_status); } && {
26368 test -z "$ac_c_werror_flag" ||
26369 test ! -s conftest.err
26370 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026371 ac_cv_window_has_flags=yes
26372else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026374sed 's/^/| /' conftest.$ac_ext >&5
26375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026376 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026377fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26380fi
26381
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026382{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26383echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026384
Jack Jansen666b1e72001-10-31 12:11:48 +000026385
26386if test "$ac_cv_window_has_flags" = yes
26387then
Martin v. Löwis11437992002-04-12 09:54:03 +000026388
26389cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026390#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026391_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026392
26393fi
26394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026395{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26396echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026397cat >conftest.$ac_ext <<_ACEOF
26398/* confdefs.h. */
26399_ACEOF
26400cat confdefs.h >>conftest.$ac_ext
26401cat >>conftest.$ac_ext <<_ACEOF
26402/* end confdefs.h. */
26403#include <curses.h>
26404int
26405main ()
26406{
26407void *x=is_term_resized
26408 ;
26409 return 0;
26410}
26411_ACEOF
26412rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026413if { (ac_try="$ac_compile"
26414case "(($ac_try" in
26415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26416 *) ac_try_echo=$ac_try;;
26417esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026419 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026420 ac_status=$?
26421 grep -v '^ *+' conftest.er1 >conftest.err
26422 rm -f conftest.er1
26423 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026425 (exit $ac_status); } && {
26426 test -z "$ac_c_werror_flag" ||
26427 test ! -s conftest.err
26428 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026429
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026430cat >>confdefs.h <<\_ACEOF
26431#define HAVE_CURSES_IS_TERM_RESIZED 1
26432_ACEOF
26433
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026434 { echo "$as_me:$LINENO: result: yes" >&5
26435echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026436else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026437 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026438sed 's/^/| /' conftest.$ac_ext >&5
26439
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026440 { echo "$as_me:$LINENO: result: no" >&5
26441echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026442
26443fi
26444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26446
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026447{ echo "$as_me:$LINENO: checking for resize_term" >&5
26448echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026449cat >conftest.$ac_ext <<_ACEOF
26450/* confdefs.h. */
26451_ACEOF
26452cat confdefs.h >>conftest.$ac_ext
26453cat >>conftest.$ac_ext <<_ACEOF
26454/* end confdefs.h. */
26455#include <curses.h>
26456int
26457main ()
26458{
26459void *x=resize_term
26460 ;
26461 return 0;
26462}
26463_ACEOF
26464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026465if { (ac_try="$ac_compile"
26466case "(($ac_try" in
26467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26468 *) ac_try_echo=$ac_try;;
26469esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026471 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026472 ac_status=$?
26473 grep -v '^ *+' conftest.er1 >conftest.err
26474 rm -f conftest.er1
26475 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026477 (exit $ac_status); } && {
26478 test -z "$ac_c_werror_flag" ||
26479 test ! -s conftest.err
26480 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026481
26482cat >>confdefs.h <<\_ACEOF
26483#define HAVE_CURSES_RESIZE_TERM 1
26484_ACEOF
26485
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026486 { echo "$as_me:$LINENO: result: yes" >&5
26487echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026488else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026489 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026490sed 's/^/| /' conftest.$ac_ext >&5
26491
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026492 { echo "$as_me:$LINENO: result: no" >&5
26493echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026494
26495fi
26496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26498
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026499{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26500echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026501cat >conftest.$ac_ext <<_ACEOF
26502/* confdefs.h. */
26503_ACEOF
26504cat confdefs.h >>conftest.$ac_ext
26505cat >>conftest.$ac_ext <<_ACEOF
26506/* end confdefs.h. */
26507#include <curses.h>
26508int
26509main ()
26510{
26511void *x=resizeterm
26512 ;
26513 return 0;
26514}
26515_ACEOF
26516rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026517if { (ac_try="$ac_compile"
26518case "(($ac_try" in
26519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26520 *) ac_try_echo=$ac_try;;
26521esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026523 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026524 ac_status=$?
26525 grep -v '^ *+' conftest.er1 >conftest.err
26526 rm -f conftest.er1
26527 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026529 (exit $ac_status); } && {
26530 test -z "$ac_c_werror_flag" ||
26531 test ! -s conftest.err
26532 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026533
26534cat >>confdefs.h <<\_ACEOF
26535#define HAVE_CURSES_RESIZETERM 1
26536_ACEOF
26537
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026538 { echo "$as_me:$LINENO: result: yes" >&5
26539echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026540else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026541 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026542sed 's/^/| /' conftest.$ac_ext >&5
26543
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026544 { echo "$as_me:$LINENO: result: no" >&5
26545echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026546
26547fi
26548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26550
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026551{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26552echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026553
26554if test -r /dev/ptmx
26555then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026556 { echo "$as_me:$LINENO: result: yes" >&5
26557echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026558
26559cat >>confdefs.h <<\_ACEOF
26560#define HAVE_DEV_PTMX 1
26561_ACEOF
26562
Thomas Wouters89f507f2006-12-13 04:49:30 +000026563else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026564 { echo "$as_me:$LINENO: result: no" >&5
26565echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026566fi
26567
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026568{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26569echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026570
26571if test -r /dev/ptc
26572then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026573 { echo "$as_me:$LINENO: result: yes" >&5
26574echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026575
26576cat >>confdefs.h <<\_ACEOF
26577#define HAVE_DEV_PTC 1
26578_ACEOF
26579
Thomas Wouters89f507f2006-12-13 04:49:30 +000026580else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026581 { echo "$as_me:$LINENO: result: no" >&5
26582echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026583fi
26584
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026585if test "$have_long_long" = yes
26586then
26587 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
26588echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
26589 if test "${ac_cv_have_long_long_format+set}" = set; then
26590 echo $ECHO_N "(cached) $ECHO_C" >&6
26591else
26592 if test "$cross_compiling" = yes; then
26593 ac_cv_have_long_long_format=no
26594else
26595 cat >conftest.$ac_ext <<_ACEOF
26596/* confdefs.h. */
26597_ACEOF
26598cat confdefs.h >>conftest.$ac_ext
26599cat >>conftest.$ac_ext <<_ACEOF
26600/* end confdefs.h. */
26601
26602 #include <stdio.h>
26603 #include <stddef.h>
26604 #include <string.h>
26605
26606 #ifdef HAVE_SYS_TYPES_H
26607 #include <sys/types.h>
26608 #endif
26609
26610 int main()
26611 {
26612 char buffer[256];
26613
26614 if (sprintf(buffer, "%lld", (long long)123) < 0)
26615 return 1;
26616 if (strcmp(buffer, "123"))
26617 return 1;
26618
26619 if (sprintf(buffer, "%lld", (long long)-123) < 0)
26620 return 1;
26621 if (strcmp(buffer, "-123"))
26622 return 1;
26623
26624 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
26625 return 1;
26626 if (strcmp(buffer, "123"))
26627 return 1;
26628
26629 return 0;
26630 }
26631
26632_ACEOF
26633rm -f conftest$ac_exeext
26634if { (ac_try="$ac_link"
26635case "(($ac_try" in
26636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26637 *) ac_try_echo=$ac_try;;
26638esac
26639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26640 (eval "$ac_link") 2>&5
26641 ac_status=$?
26642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26644 { (case "(($ac_try" in
26645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26646 *) ac_try_echo=$ac_try;;
26647esac
26648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26649 (eval "$ac_try") 2>&5
26650 ac_status=$?
26651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26652 (exit $ac_status); }; }; then
26653 ac_cv_have_long_long_format=yes
26654else
26655 echo "$as_me: program exited with status $ac_status" >&5
26656echo "$as_me: failed program was:" >&5
26657sed 's/^/| /' conftest.$ac_ext >&5
26658
26659( exit $ac_status )
26660ac_cv_have_long_long_format=no
26661fi
26662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26663fi
26664
26665
26666
26667fi
26668
26669 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
26670echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
26671fi
26672
Mark Dickinson89d7d412009-12-31 20:50:59 +000026673if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026674then
26675
26676cat >>confdefs.h <<\_ACEOF
26677#define PY_FORMAT_LONG_LONG "ll"
26678_ACEOF
26679
26680fi
26681
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000026682if test $ac_sys_system = Darwin
26683then
26684 LIBS="$LIBS -framework CoreFoundation"
26685fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000026686
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026687{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26688echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026689if test "${ac_cv_have_size_t_format+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026690 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026691else
26692 if test "$cross_compiling" = yes; then
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026693 ac_cv_have_size_t_format="cross -- assuming yes"
26694
Thomas Wouters477c8d52006-05-27 19:21:47 +000026695else
26696 cat >conftest.$ac_ext <<_ACEOF
26697/* confdefs.h. */
26698_ACEOF
26699cat confdefs.h >>conftest.$ac_ext
26700cat >>conftest.$ac_ext <<_ACEOF
26701/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026702
Thomas Wouters477c8d52006-05-27 19:21:47 +000026703#include <stdio.h>
26704#include <stddef.h>
26705#include <string.h>
26706
Christian Heimes2c181612007-12-17 20:04:13 +000026707#ifdef HAVE_SYS_TYPES_H
26708#include <sys/types.h>
26709#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026710
26711#ifdef HAVE_SSIZE_T
26712typedef ssize_t Py_ssize_t;
26713#elif SIZEOF_VOID_P == SIZEOF_LONG
26714typedef long Py_ssize_t;
26715#else
26716typedef int Py_ssize_t;
26717#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026718
Christian Heimes2c181612007-12-17 20:04:13 +000026719int main()
26720{
26721 char buffer[256];
26722
Thomas Wouters477c8d52006-05-27 19:21:47 +000026723 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26724 return 1;
26725
Thomas Wouters89f507f2006-12-13 04:49:30 +000026726 if (strcmp(buffer, "123"))
26727 return 1;
26728
26729 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26730 return 1;
26731
26732 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026733 return 1;
26734
26735 return 0;
26736}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026737
Thomas Wouters477c8d52006-05-27 19:21:47 +000026738_ACEOF
26739rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026740if { (ac_try="$ac_link"
26741case "(($ac_try" in
26742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26743 *) ac_try_echo=$ac_try;;
26744esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026746 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026747 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026750 { (case "(($ac_try" in
26751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26752 *) ac_try_echo=$ac_try;;
26753esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026755 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026756 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026758 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026759 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026760else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026761 echo "$as_me: program exited with status $ac_status" >&5
26762echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026763sed 's/^/| /' conftest.$ac_ext >&5
26764
26765( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026766ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026767fi
26768rm -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 +000026769fi
26770
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026771
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026772fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026773{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26774echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000026775if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026776
26777cat >>confdefs.h <<\_ACEOF
26778#define PY_FORMAT_SIZE_T "z"
26779_ACEOF
26780
26781fi
26782
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026783{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26784echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026785if test "${ac_cv_type_socklen_t+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026786 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026787else
Martin v. Löwis11437992002-04-12 09:54:03 +000026788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026789/* confdefs.h. */
26790_ACEOF
26791cat confdefs.h >>conftest.$ac_ext
26792cat >>conftest.$ac_ext <<_ACEOF
26793/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026794
26795#ifdef HAVE_SYS_TYPES_H
26796#include <sys/types.h>
26797#endif
26798#ifdef HAVE_SYS_SOCKET_H
26799#include <sys/socket.h>
26800#endif
26801
26802
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026803typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026804int
26805main ()
26806{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026807if ((ac__type_new_ *) 0)
26808 return 0;
26809if (sizeof (ac__type_new_))
26810 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026811 ;
26812 return 0;
26813}
26814_ACEOF
26815rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026816if { (ac_try="$ac_compile"
26817case "(($ac_try" in
26818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26819 *) ac_try_echo=$ac_try;;
26820esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026824 grep -v '^ *+' conftest.er1 >conftest.err
26825 rm -f conftest.er1
26826 cat conftest.err >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026828 (exit $ac_status); } && {
26829 test -z "$ac_c_werror_flag" ||
26830 test ! -s conftest.err
26831 } && test -s conftest.$ac_objext; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026832 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026833else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026835sed 's/^/| /' conftest.$ac_ext >&5
26836
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026837 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026839
26840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026841fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026842{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26843echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26844if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026845 :
26846else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026847
Martin v. Löwis01c04012002-11-11 14:58:44 +000026848cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026849#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026850_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026851
26852fi
26853
Michael W. Hudson54241132001-12-07 15:38:26 +000026854
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026855{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26856echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026857if test "${ac_cv_broken_mbstowcs+set}" = set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026858 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026859else
26860 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026861 ac_cv_broken_mbstowcs=no
26862else
26863 cat >conftest.$ac_ext <<_ACEOF
26864/* confdefs.h. */
26865_ACEOF
26866cat confdefs.h >>conftest.$ac_ext
26867cat >>conftest.$ac_ext <<_ACEOF
26868/* end confdefs.h. */
26869
26870#include<stdlib.h>
26871int main() {
26872 size_t len = -1;
26873 const char *str = "text";
26874 len = mbstowcs(NULL, str, 0);
26875 return (len != 4);
26876}
26877
26878_ACEOF
26879rm -f conftest$ac_exeext
26880if { (ac_try="$ac_link"
26881case "(($ac_try" in
26882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26883 *) ac_try_echo=$ac_try;;
26884esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026886 (eval "$ac_link") 2>&5
26887 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026889 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26890 { (case "(($ac_try" in
26891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26892 *) ac_try_echo=$ac_try;;
26893esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026895 (eval "$ac_try") 2>&5
26896 ac_status=$?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026898 (exit $ac_status); }; }; then
26899 ac_cv_broken_mbstowcs=no
26900else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026901 echo "$as_me: program exited with status $ac_status" >&5
26902echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026903sed 's/^/| /' conftest.$ac_ext >&5
26904
26905( exit $ac_status )
26906ac_cv_broken_mbstowcs=yes
26907fi
26908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26909fi
26910
26911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026912fi
26913
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026914{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26915echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026916if test "$ac_cv_broken_mbstowcs" = yes
26917then
26918
26919cat >>confdefs.h <<\_ACEOF
26920#define HAVE_BROKEN_MBSTOWCS 1
26921_ACEOF
26922
26923fi
26924
Antoine Pitroub52ec782009-01-25 16:34:23 +000026925# Check for --with-computed-gotos
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026926{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26927echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026928
26929# Check whether --with-computed-gotos was given.
26930if test "${with_computed_gotos+set}" = set; then
26931 withval=$with_computed_gotos;
26932if test "$withval" != no
26933then
26934
26935cat >>confdefs.h <<\_ACEOF
26936#define USE_COMPUTED_GOTOS 1
26937_ACEOF
26938
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026939 { echo "$as_me:$LINENO: result: yes" >&5
26940echo "${ECHO_T}yes" >&6; }
26941else { echo "$as_me:$LINENO: result: no" >&5
26942echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026943fi
26944else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026945 { echo "$as_me:$LINENO: result: no" >&5
26946echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026947fi
26948
26949
26950
Michael W. Hudson54241132001-12-07 15:38:26 +000026951
26952
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026953for h in `(cd $srcdir;echo Python/thread_*.h)`
26954do
26955 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26956done
26957
Michael W. Hudson54241132001-12-07 15:38:26 +000026958
Neal Norwitzd24499d2005-12-18 21:36:39 +000026959SRCDIRS="Parser Grammar Objects Python Modules Mac"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026960{ echo "$as_me:$LINENO: checking for build directories" >&5
26961echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026962for dir in $SRCDIRS; do
26963 if test ! -d $dir; then
26964 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026965 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026966done
Ronald Oussoren74f29b42009-09-20 20:09:26 +000026967{ echo "$as_me:$LINENO: result: done" >&5
26968echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026969
Guido van Rossum627b2d71993-12-24 10:39:16 +000026970# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026971ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026972
Martin v. Löwis11437992002-04-12 09:54:03 +000026973cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026974# This file is a shell script that caches the results of configure
26975# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026976# scripts and configure runs, see configure's option --config-cache.
26977# It is not useful on other systems. If it contains results you don't
26978# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026979#
Martin v. Löwis11437992002-04-12 09:54:03 +000026980# config.status only pays attention to the cache file if you give it
26981# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026982#
Skip Montanaro6dead952003-09-25 14:50:04 +000026983# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026984# loading this file, other *unset* `ac_cv_foo' will be assigned the
26985# following values.
26986
26987_ACEOF
26988
Guido van Rossumf78abae1997-01-21 22:02:36 +000026989# The following way of writing the cache mishandles newlines in values,
26990# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026991# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026992# Ultrix sh set writes to stderr and can't be redirected directly,
26993# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026994(
26995 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26996 eval ac_val=\$$ac_var
26997 case $ac_val in #(
26998 *${as_nl}*)
26999 case $ac_var in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027000 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27001echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027002 esac
27003 case $ac_var in #(
27004 _ | IFS | as_nl) ;; #(
27005 *) $as_unset $ac_var ;;
27006 esac ;;
27007 esac
27008 done
27009
Martin v. Löwis11437992002-04-12 09:54:03 +000027010 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027011 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27012 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027013 # `set' does not quote correctly, so add quotes (double-quote
27014 # substitution turns \\\\ into \\, and sed turns \\ into \).
27015 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027016 "s/'/'\\\\''/g;
27017 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027019 *)
27020 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027021 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027022 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027023 esac |
27024 sort
27025) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027026 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027027 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027028 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027029 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027030 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27031 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027032 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27033 :end' >>confcache
27034if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27035 if test -w "$cache_file"; then
27036 test "x$cache_file" != "x/dev/null" &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027037 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27038echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027039 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027040 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027041 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27042echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027043 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027044fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027045rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027046
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027047test "x$prefix" = xNONE && prefix=$ac_default_prefix
27048# Let make expand exec_prefix.
27049test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027050
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027051DEFS=-DHAVE_CONFIG_H
27052
Skip Montanaro6dead952003-09-25 14:50:04 +000027053ac_libobjs=
27054ac_ltlibobjs=
27055for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27056 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027057 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027058 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027059 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27060 # will be set to the directory where LIBOBJS objects are built.
27061 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27062 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027063done
27064LIBOBJS=$ac_libobjs
27065
27066LTLIBOBJS=$ac_ltlibobjs
27067
27068
Martin v. Löwis11437992002-04-12 09:54:03 +000027069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027070: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027071ac_clean_files_save=$ac_clean_files
27072ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027073{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27074echo "$as_me: creating $CONFIG_STATUS" >&6;}
27075cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027076#! $SHELL
27077# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027078# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027079# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027080# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027081
Martin v. Löwis11437992002-04-12 09:54:03 +000027082debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027083ac_cs_recheck=false
27084ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027085SHELL=\${CONFIG_SHELL-$SHELL}
27086_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027087
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027088cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027089## --------------------- ##
27090## M4sh Initialization. ##
27091## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027093# Be more Bourne compatible
27094DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027095if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27096 emulate sh
27097 NULLCMD=:
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027098 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027099 # is contrary to our usage. Disable this feature.
27100 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027101 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027102else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027103 case `(set -o) 2>/dev/null` in
27104 *posix*) set -o posix ;;
27105esac
27106
Michael W. Hudson54241132001-12-07 15:38:26 +000027107fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027108
27109
Michael W. Hudson54241132001-12-07 15:38:26 +000027110
Michael W. Hudson54241132001-12-07 15:38:26 +000027111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027112# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027113# Avoid depending upon Character Ranges.
27114as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27115as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27116as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27117as_cr_digits='0123456789'
27118as_cr_alnum=$as_cr_Letters$as_cr_digits
27119
27120# The user is always right.
27121if test "${PATH_SEPARATOR+set}" != set; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027122 echo "#! /bin/sh" >conf$$.sh
27123 echo "exit 0" >>conf$$.sh
27124 chmod +x conf$$.sh
27125 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
27126 PATH_SEPARATOR=';'
27127 else
27128 PATH_SEPARATOR=:
27129 fi
27130 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027131fi
27132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027133# Support unset when possible.
27134if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27135 as_unset=unset
27136else
27137 as_unset=false
27138fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027140
27141# IFS
27142# We need space, tab and new line, in precisely that order. Quoting is
27143# there to prevent editors from complaining about space-tab.
27144# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27145# splitting by setting IFS to empty value.)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027146as_nl='
27147'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027148IFS=" "" $as_nl"
27149
27150# Find who we are. Look in the path if we contain no directory separator.
27151case $0 in
27152 *[\\/]* ) as_myself=$0 ;;
27153 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027154for as_dir in $PATH
27155do
27156 IFS=$as_save_IFS
27157 test -z "$as_dir" && as_dir=.
27158 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27159done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027160IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027162 ;;
27163esac
27164# We did not find ourselves, most probably we were run as `sh COMMAND'
27165# in which case we are not to be found in the path.
27166if test "x$as_myself" = x; then
27167 as_myself=$0
27168fi
27169if test ! -f "$as_myself"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027170 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171 { (exit 1); exit 1; }
27172fi
27173
27174# Work around bugs in pre-3.0 UWIN ksh.
27175for as_var in ENV MAIL MAILPATH
27176do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27177done
27178PS1='$ '
27179PS2='> '
27180PS4='+ '
27181
27182# NLS nuisances.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027183for as_var in \
27184 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
27185 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
27186 LC_TELEPHONE LC_TIME
27187do
27188 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
27189 eval $as_var=C; export $as_var
27190 else
27191 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27192 fi
27193done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027194
27195# Required to use basename.
27196if expr a : '\(a\)' >/dev/null 2>&1 &&
27197 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27198 as_expr=expr
27199else
27200 as_expr=false
27201fi
27202
27203if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27204 as_basename=basename
27205else
27206 as_basename=false
27207fi
27208
27209
27210# Name of the executable.
27211as_me=`$as_basename -- "$0" ||
27212$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27213 X"$0" : 'X\(//\)$' \| \
27214 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027215echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027216 sed '/^.*\/\([^/][^/]*\)\/*$/{
27217 s//\1/
27218 q
27219 }
27220 /^X\/\(\/\/\)$/{
27221 s//\1/
27222 q
27223 }
27224 /^X\/\(\/\).*/{
27225 s//\1/
27226 q
27227 }
27228 s/.*/./; q'`
27229
27230# CDPATH.
27231$as_unset CDPATH
27232
27233
27234
Martin v. Löwis11437992002-04-12 09:54:03 +000027235 as_lineno_1=$LINENO
27236 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027237 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027238 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027239
Martin v. Löwis11437992002-04-12 09:54:03 +000027240 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27241 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027242 # line-number line after each line using $LINENO; the second 'sed'
27243 # does the real work. The second script uses 'N' to pair each
27244 # line-number line with the line containing $LINENO, and appends
27245 # trailing '-' during substitution so that $LINENO is not a special
27246 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027247 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027248 # scripts with optimization help from Paolo Bonzini. Blame Lee
27249 # E. McMahon (1931-1989) for sed's syntax. :-)
27250 sed -n '
27251 p
27252 /[$]LINENO/=
27253 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027254 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255 s/[$]LINENO.*/&-/
27256 t lineno
27257 b
27258 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027259 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260 :loop
27261 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027262 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027263 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027264 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027265 chmod +x "$as_me.lineno" ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027266 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027267 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027268
Martin v. Löwis11437992002-04-12 09:54:03 +000027269 # Don't try to exec as it changes $[0], causing all sort of problems
27270 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027271 # original and so on. Autoconf is especially sensitive to this).
27272 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027273 # Exit status is that of the last command.
27274 exit
27275}
27276
27277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027278if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27279 as_dirname=dirname
27280else
27281 as_dirname=false
27282fi
27283
27284ECHO_C= ECHO_N= ECHO_T=
27285case `echo -n x` in
27286-n*)
27287 case `echo 'x\c'` in
27288 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27289 *) ECHO_C='\c';;
27290 esac;;
27291*)
27292 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027293esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027295if expr a : '\(a\)' >/dev/null 2>&1 &&
27296 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027297 as_expr=expr
27298else
27299 as_expr=false
27300fi
27301
27302rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303if test -d conf$$.dir; then
27304 rm -f conf$$.dir/conf$$.file
27305else
27306 rm -f conf$$.dir
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027307 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027308fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027309echo >conf$$.file
27310if ln -s conf$$.file conf$$ 2>/dev/null; then
27311 as_ln_s='ln -s'
27312 # ... but there are two gotchas:
27313 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27314 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27315 # In both cases, we have to default to `cp -p'.
27316 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027317 as_ln_s='cp -p'
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027318elif ln conf$$.file conf$$ 2>/dev/null; then
27319 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027320else
27321 as_ln_s='cp -p'
27322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027323rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27324rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027325
Skip Montanaro6dead952003-09-25 14:50:04 +000027326if mkdir -p . 2>/dev/null; then
27327 as_mkdir_p=:
27328else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027329 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027330 as_mkdir_p=false
27331fi
27332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027333if test -x / >/dev/null 2>&1; then
27334 as_test_x='test -x'
27335else
27336 if ls -dL / >/dev/null 2>&1; then
27337 as_ls_L_option=L
27338 else
27339 as_ls_L_option=
27340 fi
27341 as_test_x='
27342 eval sh -c '\''
27343 if test -d "$1"; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027344 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027345 else
27346 case $1 in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027347 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027348 esac;
27349 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27350 ???[sx]*):;;*)false;;esac;fi
27351 '\'' sh
27352 '
27353fi
27354as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027355
27356# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027357as_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 +000027358
27359# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027360as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027361
27362
Martin v. Löwis11437992002-04-12 09:54:03 +000027363exec 6>&1
27364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027365# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027366# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027367# values after options handling.
27368ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027369This file was extended by python $as_me 3.2, which was
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027370generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027371
27372 CONFIG_FILES = $CONFIG_FILES
27373 CONFIG_HEADERS = $CONFIG_HEADERS
27374 CONFIG_LINKS = $CONFIG_LINKS
27375 CONFIG_COMMANDS = $CONFIG_COMMANDS
27376 $ $0 $@
27377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378on `(hostname || uname -n) 2>/dev/null | sed 1q`
27379"
27380
Martin v. Löwis11437992002-04-12 09:54:03 +000027381_ACEOF
27382
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027383cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027384# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027385config_files="$ac_config_files"
27386config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027388_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027389
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027390cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027391ac_cs_usage="\
27392\`$as_me' instantiates files from templates according to the
27393current configuration.
27394
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027395Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027396
27397 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027398 -V, --version print version number and configuration settings, then exit
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027399 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027400 -d, --debug don't remove temporary files
27401 --recheck update $as_me by reconfiguring in the same conditions
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027402 --file=FILE[:TEMPLATE]
27403 instantiate the configuration file FILE
27404 --header=FILE[:TEMPLATE]
27405 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027406
27407Configuration files:
27408$config_files
27409
27410Configuration headers:
27411$config_headers
27412
27413Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027415_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027416cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027417ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027418python config.status 3.2
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027419configured by $0, generated by GNU Autoconf 2.61,
27420 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027421
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027422Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027423This config.status script is free software; the Free Software Foundation
27424gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027425
27426ac_pwd='$ac_pwd'
27427srcdir='$srcdir'
27428INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027429_ACEOF
27430
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027431cat >>$CONFIG_STATUS <<\_ACEOF
27432# If no file are specified by the user, then we need to provide default
27433# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027434ac_need_defaults=:
27435while test $# != 0
27436do
27437 case $1 in
27438 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027439 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27440 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027441 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027442 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027443 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027444 ac_option=$1
27445 ac_optarg=$2
27446 ac_shift=shift
27447 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027448 esac
27449
Skip Montanaro6dead952003-09-25 14:50:04 +000027450 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027451 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027452 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27453 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027454 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027455 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027457 debug=: ;;
27458 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027459 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027460 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027461 ac_need_defaults=false;;
27462 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027463 $ac_shift
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027464 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027465 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027466 --he | --h)
27467 # Conflict between --help and --header
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027468 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027469Try \`$0 --help' for more information." >&2
27470 { (exit 1); exit 1; }; };;
27471 --help | --hel | -h )
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027472 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027473 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27474 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27475 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027476
27477 # This is an error.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027478 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027479Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027480 { (exit 1); exit 1; }; } ;;
27481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027482 *) ac_config_targets="$ac_config_targets $1"
27483 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027484
27485 esac
27486 shift
27487done
27488
Skip Montanaro6dead952003-09-25 14:50:04 +000027489ac_configure_extra_args=
27490
27491if $ac_cs_silent; then
27492 exec 6>/dev/null
27493 ac_configure_extra_args="$ac_configure_extra_args --silent"
27494fi
27495
27496_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027497cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027498if \$ac_cs_recheck; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027499 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27500 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027501 export CONFIG_SHELL
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027502 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027503fi
27504
Martin v. Löwis11437992002-04-12 09:54:03 +000027505_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027506cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027507exec 5>>config.log
27508{
27509 echo
27510 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27511## Running $as_me. ##
27512_ASBOX
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027513 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027514} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027517cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027519
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027520cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027521
27522# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027523for ac_config_target in $ac_config_targets
27524do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027525 case $ac_config_target in
27526 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27527 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27528 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027529 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27530 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027531 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27532 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027533 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027534
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027535 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27536echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027537 { (exit 1); exit 1; }; };;
27538 esac
27539done
27540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027541
Martin v. Löwis11437992002-04-12 09:54:03 +000027542# If the user did not use the arguments to specify the items to instantiate,
27543# then the envvar interface is used. Set only those that are not.
27544# We use the long form for the default assignment because of an extremely
27545# bizarre bug on SunOS 4.1.3.
27546if $ac_need_defaults; then
27547 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27548 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27549fi
27550
Skip Montanaro6dead952003-09-25 14:50:04 +000027551# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027552# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027553# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554# Hook for its removal unless debugging.
27555# Note that there is a small window in which the directory will not be cleaned:
27556# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027557$debug ||
27558{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027559 tmp=
27560 trap 'exit_status=$?
27561 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27562' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027563 trap '{ (exit 1); exit 1; }' 1 2 13 15
27564}
Martin v. Löwis11437992002-04-12 09:54:03 +000027565# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027566
Martin v. Löwis11437992002-04-12 09:54:03 +000027567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027568 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027569 test -n "$tmp" && test -d "$tmp"
27570} ||
27571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027572 tmp=./conf$$-$RANDOM
27573 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027574} ||
27575{
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027576 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027577 { (exit 1); exit 1; }
27578}
27579
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027580#
27581# Set up the sed scripts for CONFIG_FILES section.
27582#
27583
27584# No need to generate the scripts if there are no CONFIG_FILES.
27585# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027586if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027587
27588_ACEOF
27589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027590
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027592ac_delim='%!_!# '
27593for ac_last_try in false false false false false :; do
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027594 cat >conf$$subs.sed <<_ACEOF
27595SHELL!$SHELL$ac_delim
27596PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27597PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27598PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27599PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27600PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27601PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27602exec_prefix!$exec_prefix$ac_delim
27603prefix!$prefix$ac_delim
27604program_transform_name!$program_transform_name$ac_delim
27605bindir!$bindir$ac_delim
27606sbindir!$sbindir$ac_delim
27607libexecdir!$libexecdir$ac_delim
27608datarootdir!$datarootdir$ac_delim
27609datadir!$datadir$ac_delim
27610sysconfdir!$sysconfdir$ac_delim
27611sharedstatedir!$sharedstatedir$ac_delim
27612localstatedir!$localstatedir$ac_delim
27613includedir!$includedir$ac_delim
27614oldincludedir!$oldincludedir$ac_delim
27615docdir!$docdir$ac_delim
27616infodir!$infodir$ac_delim
27617htmldir!$htmldir$ac_delim
27618dvidir!$dvidir$ac_delim
27619pdfdir!$pdfdir$ac_delim
27620psdir!$psdir$ac_delim
27621libdir!$libdir$ac_delim
27622localedir!$localedir$ac_delim
27623mandir!$mandir$ac_delim
27624DEFS!$DEFS$ac_delim
27625ECHO_C!$ECHO_C$ac_delim
27626ECHO_N!$ECHO_N$ac_delim
27627ECHO_T!$ECHO_T$ac_delim
27628LIBS!$LIBS$ac_delim
27629build_alias!$build_alias$ac_delim
27630host_alias!$host_alias$ac_delim
27631target_alias!$target_alias$ac_delim
27632VERSION!$VERSION$ac_delim
27633SOVERSION!$SOVERSION$ac_delim
27634CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27635UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27636ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027637LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027638PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27639PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27640PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27641PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27642PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27643FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27644FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27645FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27646FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27647FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27648MACHDEP!$MACHDEP$ac_delim
27649SGI_ABI!$SGI_ABI$ac_delim
27650CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27651EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27652CC!$CC$ac_delim
27653CFLAGS!$CFLAGS$ac_delim
27654LDFLAGS!$LDFLAGS$ac_delim
27655CPPFLAGS!$CPPFLAGS$ac_delim
27656ac_ct_CC!$ac_ct_CC$ac_delim
27657EXEEXT!$EXEEXT$ac_delim
27658OBJEXT!$OBJEXT$ac_delim
27659CXX!$CXX$ac_delim
27660MAINCC!$MAINCC$ac_delim
27661CPP!$CPP$ac_delim
27662GREP!$GREP$ac_delim
27663EGREP!$EGREP$ac_delim
27664BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27665LIBRARY!$LIBRARY$ac_delim
27666LDLIBRARY!$LDLIBRARY$ac_delim
27667DLLLIBRARY!$DLLLIBRARY$ac_delim
27668BLDLIBRARY!$BLDLIBRARY$ac_delim
27669LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27670INSTSONAME!$INSTSONAME$ac_delim
27671RUNSHARED!$RUNSHARED$ac_delim
27672LINKCC!$LINKCC$ac_delim
27673GNULD!$GNULD$ac_delim
27674RANLIB!$RANLIB$ac_delim
27675AR!$AR$ac_delim
27676ARFLAGS!$ARFLAGS$ac_delim
27677SVNVERSION!$SVNVERSION$ac_delim
27678INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27679INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27680INSTALL_DATA!$INSTALL_DATA$ac_delim
27681LN!$LN$ac_delim
27682OPT!$OPT$ac_delim
27683BASECFLAGS!$BASECFLAGS$ac_delim
27684UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27685OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27686LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27687SO!$SO$ac_delim
27688LDSHARED!$LDSHARED$ac_delim
27689BLDSHARED!$BLDSHARED$ac_delim
27690CCSHARED!$CCSHARED$ac_delim
27691LINKFORSHARED!$LINKFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027692_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027693
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027694 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027695 break
27696 elif $ac_last_try; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027697 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27698echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027699 { (exit 1); exit 1; }; }
27700 else
27701 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027702 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703done
27704
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027705ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27706if test -n "$ac_eof"; then
27707 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27708 ac_eof=`expr $ac_eof + 1`
27709fi
27710
27711cat >>$CONFIG_STATUS <<_ACEOF
27712cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27713/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027714_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027715sed '
27716s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27717s/^/s,@/; s/!/@,|#_!!_#|/
27718:n
27719t n
27720s/'"$ac_delim"'$/,g/; t
27721s/$/\\/; p
27722N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27723' >>$CONFIG_STATUS <conf$$subs.sed
27724rm -f conf$$subs.sed
27725cat >>$CONFIG_STATUS <<_ACEOF
27726CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027727_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027728
27729
27730ac_delim='%!_!# '
27731for ac_last_try in false false false false false :; do
27732 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027733CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027734SHLIBS!$SHLIBS$ac_delim
27735USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27736SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27737USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27738LDLAST!$LDLAST$ac_delim
27739THREADOBJ!$THREADOBJ$ac_delim
27740DLINCLDIR!$DLINCLDIR$ac_delim
27741DYNLOADFILE!$DYNLOADFILE$ac_delim
27742MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27743TRUE!$TRUE$ac_delim
27744LIBOBJS!$LIBOBJS$ac_delim
27745HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27746HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27747HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27748HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27749HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27750LIBM!$LIBM$ac_delim
27751LIBC!$LIBC$ac_delim
27752THREADHEADERS!$THREADHEADERS$ac_delim
27753SRCDIRS!$SRCDIRS$ac_delim
27754LTLIBOBJS!$LTLIBOBJS$ac_delim
27755_ACEOF
27756
Ronald Oussoren6f6c5622009-12-24 14:03:19 +000027757 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027758 break
27759 elif $ac_last_try; then
27760 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27761echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027762 { (exit 1); exit 1; }; }
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027763 else
27764 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27765 fi
27766done
27767
27768ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27769if test -n "$ac_eof"; then
27770 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27771 ac_eof=`expr $ac_eof + 1`
27772fi
27773
27774cat >>$CONFIG_STATUS <<_ACEOF
27775cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27776/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027777_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027778sed '
27779s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27780s/^/s,@/; s/!/@,|#_!!_#|/
27781:n
27782t n
27783s/'"$ac_delim"'$/,g/; t
27784s/$/\\/; p
27785N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27786' >>$CONFIG_STATUS <conf$$subs.sed
27787rm -f conf$$subs.sed
27788cat >>$CONFIG_STATUS <<_ACEOF
27789:end
27790s/|#_!!_#|//g
27791CEOF$ac_eof
27792_ACEOF
27793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027794
27795# VPATH may cause trouble with some makes, so we remove $(srcdir),
27796# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27797# trailing colons and then remove the whole line if VPATH becomes empty
27798# (actually we leave an empty line to preserve line numbers).
27799if test "x$srcdir" = x.; then
27800 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27801s/:*\$(srcdir):*/:/
27802s/:*\${srcdir}:*/:/
27803s/:*@srcdir@:*/:/
27804s/^\([^=]*=[ ]*\):*/\1/
27805s/:*$//
27806s/^[^=]*=[ ]*$//
27807}'
27808fi
27809
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027810cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027811fi # test -n "$CONFIG_FILES"
27812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027813
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027814for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027815do
27816 case $ac_tag in
27817 :[FHLC]) ac_mode=$ac_tag; continue;;
27818 esac
27819 case $ac_mode$ac_tag in
27820 :[FHL]*:*);;
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027821 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27822echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027823 { (exit 1); exit 1; }; };;
27824 :[FH]-) ac_tag=-:-;;
27825 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27826 esac
27827 ac_save_IFS=$IFS
27828 IFS=:
27829 set x $ac_tag
27830 IFS=$ac_save_IFS
27831 shift
27832 ac_file=$1
27833 shift
27834
27835 case $ac_mode in
27836 :L) ac_source=$1;;
27837 :[FH])
27838 ac_file_inputs=
27839 for ac_f
27840 do
27841 case $ac_f in
27842 -) ac_f="$tmp/stdin";;
27843 *) # Look for the file first in the build tree, then in the source tree
27844 # (if the path is not absolute). The absolute path cannot be DOS-style,
27845 # because $ac_f cannot contain `:'.
27846 test -f "$ac_f" ||
27847 case $ac_f in
27848 [\\/$]*) false;;
27849 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27850 esac ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027851 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27852echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027853 { (exit 1); exit 1; }; };;
27854 esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027855 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856 done
27857
27858 # Let's still pretend it is `configure' which instantiates (i.e., don't
27859 # use $as_me), people would be surprised to read:
27860 # /* config.h. Generated by config.status. */
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027861 configure_input="Generated from "`IFS=:
27862 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027863 if test x"$ac_file" != x-; then
27864 configure_input="$ac_file. $configure_input"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027865 { echo "$as_me:$LINENO: creating $ac_file" >&5
27866echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027867 fi
27868
27869 case $ac_tag in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027870 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871 esac
27872 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027873 esac
27874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027876$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027877 X"$ac_file" : 'X\(//\)[^/]' \| \
27878 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027879 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027880echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027881 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27882 s//\1/
27883 q
27884 }
27885 /^X\(\/\/\)[^/].*/{
27886 s//\1/
27887 q
27888 }
27889 /^X\(\/\/\)$/{
27890 s//\1/
27891 q
27892 }
27893 /^X\(\/\).*/{
27894 s//\1/
27895 q
27896 }
27897 s/.*/./; q'`
27898 { as_dir="$ac_dir"
27899 case $as_dir in #(
27900 -*) as_dir=./$as_dir;;
27901 esac
27902 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027903 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027904 while :; do
27905 case $as_dir in #(
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027906 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027907 *) as_qdir=$as_dir;;
27908 esac
27909 as_dirs="'$as_qdir' $as_dirs"
27910 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027911$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027912 X"$as_dir" : 'X\(//\)[^/]' \| \
27913 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027914 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027915echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027916 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27917 s//\1/
27918 q
27919 }
27920 /^X\(\/\/\)[^/].*/{
27921 s//\1/
27922 q
27923 }
27924 /^X\(\/\/\)$/{
27925 s//\1/
27926 q
27927 }
27928 /^X\(\/\).*/{
27929 s//\1/
27930 q
27931 }
27932 s/.*/./; q'`
27933 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027934 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027935 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027936 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27937echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027938 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027939 ac_builddir=.
27940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027941case "$ac_dir" in
27942.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27943*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027944 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027945 # A ".." for each directory in $ac_dir_suffix.
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027946 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027947 case $ac_top_builddir_sub in
27948 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27949 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27950 esac ;;
27951esac
27952ac_abs_top_builddir=$ac_pwd
27953ac_abs_builddir=$ac_pwd$ac_dir_suffix
27954# for backward compatibility:
27955ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027956
27957case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027958 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027959 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027960 ac_top_srcdir=$ac_top_builddir_sub
27961 ac_abs_top_srcdir=$ac_pwd ;;
27962 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027963 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027964 ac_top_srcdir=$srcdir
27965 ac_abs_top_srcdir=$srcdir ;;
27966 *) # Relative name.
27967 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27968 ac_top_srcdir=$ac_top_build_prefix$srcdir
27969 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027970esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027971ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027972
Martin v. Löwis11437992002-04-12 09:54:03 +000027973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027974 case $ac_mode in
27975 :F)
27976 #
27977 # CONFIG_FILE
27978 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027979
27980 case $INSTALL in
27981 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027982 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027983 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027984_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027985
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027986cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027987# If the template does not know about datarootdir, expand it.
27988# FIXME: This hack should be removed a few years after 2.60.
27989ac_datarootdir_hack=; ac_datarootdir_seen=
27990
Ronald Oussoren74f29b42009-09-20 20:09:26 +000027991case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027992 p
27993 q
27994}
27995/@datadir@/p
27996/@docdir@/p
27997/@infodir@/p
27998/@localedir@/p
27999/@mandir@/p
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028000' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028001*datarootdir*) ac_datarootdir_seen=yes;;
28002*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028003 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28004echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028005_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028006cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028007 ac_datarootdir_hack='
28008 s&@datadir@&$datadir&g
28009 s&@docdir@&$docdir&g
28010 s&@infodir@&$infodir&g
28011 s&@localedir@&$localedir&g
28012 s&@mandir@&$mandir&g
28013 s&\\\${datarootdir}&$datarootdir&g' ;;
28014esac
28015_ACEOF
28016
28017# Neutralize VPATH when `$srcdir' = `.'.
28018# Shell code in configure.ac might set extrasub.
28019# FIXME: do we really want to maintain this feature?
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028020cat >>$CONFIG_STATUS <<_ACEOF
28021 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028022$extrasub
28023_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028024cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028025:t
28026/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028027s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028028s&@top_builddir@&$ac_top_builddir_sub&;t t
28029s&@srcdir@&$ac_srcdir&;t t
28030s&@abs_srcdir@&$ac_abs_srcdir&;t t
28031s&@top_srcdir@&$ac_top_srcdir&;t t
28032s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28033s&@builddir@&$ac_builddir&;t t
28034s&@abs_builddir@&$ac_abs_builddir&;t t
28035s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28036s&@INSTALL@&$ac_INSTALL&;t t
28037$ac_datarootdir_hack
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028038" $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 +000028039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028040test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28041 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28042 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028043 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028044which seems to be undefined. Please make sure it is defined." >&5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028045echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028046which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028047
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028048 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028049 case $ac_file in
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028050 -) cat "$tmp/out"; rm -f "$tmp/out";;
28051 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28052 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028053 ;;
28054 :H)
28055 #
28056 # CONFIG_HEADER
28057 #
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028058_ACEOF
28059
28060# Transform confdefs.h into a sed script `conftest.defines', that
28061# substitutes the proper values into config.h.in to produce config.h.
28062rm -f conftest.defines conftest.tail
28063# First, append a space to every undef/define line, to ease matching.
28064echo 's/$/ /' >conftest.defines
28065# Then, protect against being on the right side of a sed subst, or in
28066# an unquoted here document, in config.status. If some macros were
28067# called several times there might be several #defines for the same
28068# symbol, which is useless. But do not sort them, since the last
28069# AC_DEFINE must be honored.
28070ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28071# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28072# NAME is the cpp macro being defined, VALUE is the value it is being given.
28073# PARAMS is the parameter list in the macro definition--in most cases, it's
28074# just an empty string.
28075ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28076ac_dB='\\)[ (].*,\\1define\\2'
28077ac_dC=' '
28078ac_dD=' ,'
28079
28080uniq confdefs.h |
28081 sed -n '
28082 t rset
28083 :rset
28084 s/^[ ]*#[ ]*define[ ][ ]*//
28085 t ok
28086 d
28087 :ok
28088 s/[\\&,]/\\&/g
28089 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28090 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28091 ' >>conftest.defines
28092
28093# Remove the space that was appended to ease matching.
28094# Then replace #undef with comments. This is necessary, for
28095# example, in the case of _POSIX_SOURCE, which is predefined and required
28096# on some systems where configure will not decide to define it.
28097# (The regexp can be short, since the line contains either #define or #undef.)
28098echo 's/ $//
28099s,^[ #]*u.*,/* & */,' >>conftest.defines
28100
28101# Break up conftest.defines:
28102ac_max_sed_lines=50
28103
28104# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28105# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28106# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28107# et cetera.
28108ac_in='$ac_file_inputs'
28109ac_out='"$tmp/out1"'
28110ac_nxt='"$tmp/out2"'
28111
28112while :
28113do
28114 # Write a here document:
28115 cat >>$CONFIG_STATUS <<_ACEOF
28116 # First, check the format of the line:
28117 cat >"\$tmp/defines.sed" <<\\CEOF
28118/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
28119/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
28120b
28121:def
28122_ACEOF
28123 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
28124 echo 'CEOF
28125 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
28126 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
28127 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
28128 grep . conftest.tail >/dev/null || break
28129 rm -f conftest.defines
28130 mv conftest.tail conftest.defines
28131done
28132rm -f conftest.defines conftest.tail
28133
28134echo "ac_result=$ac_in" >>$CONFIG_STATUS
28135cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028136 if test x"$ac_file" != x-; then
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028137 echo "/* $configure_input */" >"$tmp/config.h"
28138 cat "$ac_result" >>"$tmp/config.h"
28139 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
28140 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28141echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028142 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028143 rm -f $ac_file
28144 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000028145 fi
28146 else
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028147 echo "/* $configure_input */"
28148 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000028149 fi
Ronald Oussoren74f29b42009-09-20 20:09:26 +000028150 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028151 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028153
28154 esac
28155
28156done # for ac_tag
28157
Guido van Rossum627b2d71993-12-24 10:39:16 +000028158
Martin v. Löwis11437992002-04-12 09:54:03 +000028159{ (exit 0); exit 0; }
28160_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028161chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028162ac_clean_files=$ac_clean_files_save
28163
28164
28165# configure is writing to config.log, and then calls config.status.
28166# config.status does its own redirection, appending to config.log.
28167# Unfortunately, on DOS this fails, as config.log is still kept open
28168# by configure, so config.status won't be able to write to it; its
28169# output is simply discarded. So we exec the FD to /dev/null,
28170# effectively closing config.log, so it can be properly (re)opened and
28171# appended to by config.status. When coming back to configure, we
28172# need to make the FD available again.
28173if test "$no_create" != yes; then
28174 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028175 ac_config_status_args=
28176 test "$silent" = yes &&
28177 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028178 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028179 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028180 exec 5>>config.log
28181 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28182 # would make configure fail if this is the last instruction.
28183 $ac_cs_success || { (exit 1); exit 1; }
28184fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028185
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028186
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028187echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028188if test ! -f Modules/Setup
28189then
28190 cp $srcdir/Modules/Setup.dist Modules/Setup
28191fi
28192
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028193echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028194if test ! -f Modules/Setup.local
28195then
28196 echo "# Edit this file for local setup changes" >Modules/Setup.local
28197fi
28198
28199echo "creating Makefile"
28200$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28201 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028202 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028203mv config.c Modules