blob: cdf9d8657cd1070ac412dd5d69dd99d3c67d3e57 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Mark Dickinson9c113362009-09-05 10:36:23 +00002# From configure.in Revision: 74073 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalotti19142282009-07-17 23:11:52 +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,
Alexandre Vassalotti19142282009-07-17 23:11:52 +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=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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.
Alexandre Vassalotti19142282009-07-17 23:11:52 +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 ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +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=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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.
Alexandre Vassalotti19142282009-07-17 23:11:52 +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" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000498 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000499fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +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'
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000535 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536 else
537 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000619ac_subst_vars='SHELL
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000620PATH_SEPARATOR
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696GNULD
697RANLIB
698AR
699ARFLAGS
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
707UNIVERSAL_ARCH_FLAGS
708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734THREADHEADERS
735SRCDIRS
736LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000737ac_subst_files=''
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000738 ac_precious_vars='build_alias
739host_alias
740target_alias
741CC
742CFLAGS
743LDFLAGS
744LIBS
745CPPFLAGS
746CPP'
747
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000750ac_init_help=
751ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# The variables have the same names as the options, with
753# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000754cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000756no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000757no_recursion=
758prefix=NONE
759program_prefix=NONE
760program_suffix=NONE
761program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000763site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766x_includes=NONE
767x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000768
769# Installation directory options.
770# These are left unexpanded so users can "make install exec_prefix=/foo"
771# and all the variables that are supposed to be based on exec_prefix
772# by default will actually change.
773# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000774# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000775bindir='${exec_prefix}/bin'
776sbindir='${exec_prefix}/sbin'
777libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000778datarootdir='${prefix}/share'
779datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000780sysconfdir='${prefix}/etc'
781sharedstatedir='${prefix}/com'
782localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783includedir='${prefix}/include'
784oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000785docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
786infodir='${datarootdir}/info'
787htmldir='${docdir}'
788dvidir='${docdir}'
789pdfdir='${docdir}'
790psdir='${docdir}'
791libdir='${exec_prefix}/lib'
792localedir='${datarootdir}/locale'
793mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000796ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 # If the previous option needs an argument, assign it.
800 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000801 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 ac_prev=
803 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000806 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;;
809 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811 # Accept the important Cygnus configure options, so we can diagnose typos.
812
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813 case $ac_dashdash$ac_option in
814 --)
815 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817 -bindir | --bindir | --bindi | --bind | --bin | --bi)
818 ac_prev=bindir ;;
819 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000820 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821
822 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000827 -cache-file | --cache-file | --cache-fil | --cache-fi \
828 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
829 ac_prev=cache_file ;;
830 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
831 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000832 cache_file=$ac_optarg ;;
833
834 --config-cache | -C)
835 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
843 | --dataroo | --dataro | --datar)
844 ac_prev=datarootdir ;;
845 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
846 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
847 datarootdir=$ac_optarg ;;
848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 -disable-* | --disable-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
856 eval enable_$ac_feature=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
858 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;;
860 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
861 docdir=$ac_optarg ;;
862
863 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
864 ac_prev=dvidir ;;
865 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
866 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
868 -enable-* | --enable-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
879 | --exec | --exe | --ex)
880 ac_prev=exec_prefix ;;
881 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
882 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
883 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
886 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Obsolete; use --with-gas.
888 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 -help | --help | --hel | --he | -h)
891 ac_init_help=long ;;
892 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
893 ac_init_help=recursive ;;
894 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
895 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896
897 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
903 ac_prev=htmldir ;;
904 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
905 | --ht=*)
906 htmldir=$ac_optarg ;;
907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908 -includedir | --includedir | --includedi | --included | --include \
909 | --includ | --inclu | --incl | --inc)
910 ac_prev=includedir ;;
911 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
912 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -infodir | --infodir | --infodi | --infod | --info | --inf)
916 ac_prev=infodir ;;
917 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -libdir | --libdir | --libdi | --libd)
921 ac_prev=libdir ;;
922 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
926 | --libexe | --libex | --libe)
927 ac_prev=libexecdir ;;
928 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
929 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000932 -localedir | --localedir | --localedi | --localed | --locale)
933 ac_prev=localedir ;;
934 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
935 localedir=$ac_optarg ;;
936
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=localstatedir ;;
940 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
944 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
945 ac_prev=mandir ;;
946 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 # Obsolete; use --without-fp.
951 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 no_create=yes ;;
956
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
959 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
962 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
963 | --oldin | --oldi | --old | --ol | --o)
964 ac_prev=oldincludedir ;;
965 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
966 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
967 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
971 ac_prev=prefix ;;
972 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -program-prefix | --program-prefix | --program-prefi | --program-pref \
976 | --program-pre | --program-pr | --program-p)
977 ac_prev=program_prefix ;;
978 -program-prefix=* | --program-prefix=* | --program-prefi=* \
979 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -program-suffix | --program-suffix | --program-suffi | --program-suff \
983 | --program-suf | --program-su | --program-s)
984 ac_prev=program_suffix ;;
985 -program-suffix=* | --program-suffix=* | --program-suffi=* \
986 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -program-transform-name | --program-transform-name \
990 | --program-transform-nam | --program-transform-na \
991 | --program-transform-n | --program-transform- \
992 | --program-transform | --program-transfor \
993 | --program-transfo | --program-transf \
994 | --program-trans | --program-tran \
995 | --progr-tra | --program-tr | --program-t)
996 ac_prev=program_transform_name ;;
997 -program-transform-name=* | --program-transform-name=* \
998 | --program-transform-nam=* | --program-transform-na=* \
999 | --program-transform-n=* | --program-transform-=* \
1000 | --program-transform=* | --program-transfor=* \
1001 | --program-transfo=* | --program-transf=* \
1002 | --program-trans=* | --program-tran=* \
1003 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1007 ac_prev=pdfdir ;;
1008 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1009 pdfdir=$ac_optarg ;;
1010
1011 -psdir | --psdir | --psdi | --psd | --ps)
1012 ac_prev=psdir ;;
1013 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1014 psdir=$ac_optarg ;;
1015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1017 | -silent | --silent | --silen | --sile | --sil)
1018 silent=yes ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1021 ac_prev=sbindir ;;
1022 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1023 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1027 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1028 | --sharedst | --shareds | --shared | --share | --shar \
1029 | --sha | --sh)
1030 ac_prev=sharedstatedir ;;
1031 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1032 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1033 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1034 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037 -site | --site | --sit)
1038 ac_prev=site ;;
1039 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1043 ac_prev=srcdir ;;
1044 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1048 | --syscon | --sysco | --sysc | --sys | --sy)
1049 ac_prev=sysconfdir ;;
1050 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1051 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
1059 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1060 verbose=yes ;;
1061
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 -version | --version | --versio | --versi | --vers | -V)
1063 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -with-* | --with-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -without-* | --without-*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Reject names that are not valid shell variable names.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1081 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 --x)
1084 # Obsolete; use --with-x.
1085 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1088 | --x-incl | --x-inc | --x-in | --x-i)
1089 ac_prev=x_includes ;;
1090 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1091 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1095 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1096 ac_prev=x_libraries ;;
1097 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001101 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001102Try \`$0 --help' for more information." >&2
1103 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 ;;
1105
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001112 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 export $ac_envvar ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 ;;
1122
1123 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124done
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001128 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130fi
1131
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001132# Be sure to have absolute directory names.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001140 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001144 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001145done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001146
Martin v. Löwis11437992002-04-12 09:54:03 +00001147# There might be people who depend on the old broken behavior: `$host'
1148# used to hold the argument of --host etc.
1149# FIXME: To remove some day.
1150build=$build_alias
1151host=$host_alias
1152target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001153
Martin v. Löwis11437992002-04-12 09:54:03 +00001154# FIXME: To remove some day.
1155if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then
1157 cross_compiling=maybe
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 If a cross compiler is detected then cross compile mode will be used." >&2
1160 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes
1162 fi
1163fi
1164
1165ac_tool_prefix=
1166test -n "$host_alias" && ac_tool_prefix=$host_alias-
1167
1168test "$silent" = yes && exec 6>/dev/null
1169
Guido van Rossum627b2d71993-12-24 10:39:16 +00001170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001171ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001174 { echo "$as_me: error: Working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001177 { echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001178 { (exit 1); exit 1; }; }
1179
1180
Guido van Rossum627b2d71993-12-24 10:39:16 +00001181# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001184 # Try the directory containing this script, then the parent directory.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001185 ac_confdir=`$as_dirname -- "$0" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\/\)[^/].*/{
1196 s//\1/
1197 q
1198 }
1199 /^X\(\/\/\)$/{
1200 s//\1/
1201 q
1202 }
1203 /^X\(\/\).*/{
1204 s//\1/
1205 q
1206 }
1207 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210 srcdir=..
1211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212else
1213 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`(
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001223 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 pwd)`
1225# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then
1227 srcdir=.
1228fi
1229# Remove unnecessary trailing slashes from srcdir.
1230# Double slashes in file names in object file debugging info
1231# mess up M-x gdb in Emacs.
1232case $srcdir in
1233*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1234esac
1235for ac_var in $ac_precious_vars; do
1236 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_env_${ac_var}_value=\$${ac_var}
1238 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1240done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242#
1243# Report the --help message.
1244#
1245if test "$ac_init_help" = "long"; then
1246 # Omit some internal or obsolete options to make the list less imposing.
1247 # This message is too long to be a string in the A/UX 3.1 sh.
1248 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001249\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001250
1251Usage: $0 [OPTION]... [VAR=VALUE]...
1252
1253To assign environment variables (e.g., CC, CFLAGS...), specify them as
1254VAR=VALUE. See below for descriptions of some of the useful variables.
1255
1256Defaults for the options are specified in brackets.
1257
1258Configuration:
1259 -h, --help display this help and exit
1260 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages
1264 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files
1267 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001271 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001273 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001274
1275By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1277an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1278for instance \`--prefix=\$HOME'.
1279
1280For better control, use the options below.
1281
1282Fine tuning of the installation directories:
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001283 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1298 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001302_ACEOF
1303
1304 cat <<\_ACEOF
1305_ACEOF
1306fi
1307
1308if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001310 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001311 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 cat <<\_ACEOF
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001317 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001318 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001319 --enable-framework[=INSTALLDIR]
1320 Build (MacOSX|Darwin) framework
1321 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001322 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001325 --enable-big-digits[=BITS]
1326 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001331 --with-universal-archs=ARCH
1332 select architectures for universal build ("32-bit",
1333 "64-bit" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001334 --with-framework-name=FRAMEWORK
1335 specify an alternate name of the framework built
1336 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001337 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001338 --with-cxx-main=<compiler>
1339 compile main() and link python executable with C++
1340 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001341 --with-suffix=.exe set executable suffix
1342 --with-pydebug build with Py_DEBUG defined
1343 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001344 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001345 --with-dbmliborder=db1:db2:...
1346 order to check db backends for dbm. Valid value is a
1347 colon separated string with the backend names
1348 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-signal-module disable/enable signal module
1350 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1351 --with(out)-threads[=DIRECTORY]
1352 disable/enable thread support
1353 --with(out)-thread[=DIRECTORY]
1354 deprecated; use --with(out)-threads
1355 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001357 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with(out)-pymalloc disable/enable specialized mallocs
1359 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001360 --with-fpectl enable SIGFPE catching
1361 --with-libm=STRING math library
1362 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001363 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001364 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1365 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Some influential environment variables:
1368 CC C compiler command
1369 CFLAGS C compiler flags
1370 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1371 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 LIBS libraries to pass to the linker, e.g. -l<library>
1373 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1374 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 CPP C preprocessor
1376
1377Use these variables to override the choices made by `configure' or to help
1378it to find libraries and programs with nonstandard names/locations.
1379
Georg Brandle2e15612009-05-20 18:25:10 +00001380Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001383fi
1384
1385if test "$ac_init_help" = "recursive"; then
1386 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001388 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_builddir=.
1390
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001391case "$ac_dir" in
1392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1393*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001395 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001397 case $ac_top_builddir_sub in
1398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1400 esac ;;
1401esac
1402ac_abs_top_builddir=$ac_pwd
1403ac_abs_builddir=$ac_pwd$ac_dir_suffix
1404# for backward compatibility:
1405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001410 ac_top_srcdir=$ac_top_builddir_sub
1411 ac_abs_top_srcdir=$ac_pwd ;;
1412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001414 ac_top_srcdir=$srcdir
1415 ac_abs_top_srcdir=$srcdir ;;
1416 *) # Relative name.
1417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1418 ac_top_srcdir=$ac_top_build_prefix$srcdir
1419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001423 cd "$ac_dir" || { ac_status=$?; continue; }
1424 # Check for guested configure.
1425 if test -f "$ac_srcdir/configure.gnu"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1428 elif test -f "$ac_srcdir/configure"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001432 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001433 fi || ac_status=$?
1434 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001435 done
1436fi
1437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001438test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001439if $ac_init_version; then
1440 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001441python configure 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001442generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001444Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014452002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001452This file contains any messages produced by compilers while
1453running configure, to aid debugging if configure makes a mistake.
1454
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001455It was created by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001456generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458 $ $0 $@
1459
1460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001462{
1463cat <<_ASUNAME
1464## --------- ##
1465## Platform. ##
1466## --------- ##
1467
1468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1469uname -m = `(uname -m) 2>/dev/null || echo unknown`
1470uname -r = `(uname -r) 2>/dev/null || echo unknown`
1471uname -s = `(uname -s) 2>/dev/null || echo unknown`
1472uname -v = `(uname -v) 2>/dev/null || echo unknown`
1473
1474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1476
1477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1484
1485_ASUNAME
1486
1487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1488for as_dir in $PATH
1489do
1490 IFS=$as_save_IFS
1491 test -z "$as_dir" && as_dir=.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001492 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001493done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496} >&5
1497
1498cat >&5 <<_ACEOF
1499
1500
1501## ----------- ##
1502## Core tests. ##
1503## ----------- ##
1504
1505_ACEOF
1506
1507
1508# Keep a trace of the command line.
1509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001514ac_configure_args0=
1515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001516ac_must_keep_next=false
1517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001518do
Skip Montanaro6dead952003-09-25 14:50:04 +00001519 for ac_arg
1520 do
1521 case $ac_arg in
1522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1524 | -silent | --silent | --silen | --sile | --sil)
1525 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 *\'*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001527 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001528 esac
1529 case $ac_pass in
1530 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1531 2)
1532 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001536 case $ac_arg in
1537 *=* | --config-cache | -C | -disable-* | --disable-* \
1538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1540 | -with-* | --with-* | -without-* | --without-* | --x)
1541 case "$ac_configure_args0 " in
1542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1543 esac
1544 ;;
1545 -* ) ac_must_keep_next=true ;;
1546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001547 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001549 ;;
1550 esac
1551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001552done
Skip Montanaro6dead952003-09-25 14:50:04 +00001553$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1554$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556# When interrupted or exit'd, cleanup temporary files, and complete
1557# config.log. We remove comments because anyway the quotes in there
1558# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559# WARNING: Use '\'' to represent an apostrophe within the trap.
1560# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561trap 'exit_status=$?
1562 # Save into config.log some information that might help in debugging.
1563 {
1564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001565
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 cat <<\_ASBOX
1567## ---------------- ##
1568## Cache variables. ##
1569## ---------------- ##
1570_ASBOX
1571 echo
1572 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573(
1574 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1575 eval ac_val=\$$ac_var
1576 case $ac_val in #(
1577 *${as_nl}*)
1578 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001579 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1580echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 esac
1582 case $ac_var in #(
1583 _ | IFS | as_nl) ;; #(
1584 *) $as_unset $ac_var ;;
1585 esac ;;
1586 esac
1587 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1590 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 "s/'\''/'\''\\\\'\'''\''/g;
1593 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1594 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001595 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001597 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 esac |
1599 sort
1600)
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001602
1603 cat <<\_ASBOX
1604## ----------------- ##
1605## Output variables. ##
1606## ----------------- ##
1607_ASBOX
1608 echo
1609 for ac_var in $ac_subst_vars
1610 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 eval ac_val=\$$ac_var
1612 case $ac_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001613 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001615 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 done | sort
1617 echo
1618
1619 if test -n "$ac_subst_files"; then
1620 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621## ------------------- ##
1622## File substitutions. ##
1623## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001624_ASBOX
1625 echo
1626 for ac_var in $ac_subst_files
1627 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 eval ac_val=\$$ac_var
1629 case $ac_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001630 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001632 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001633 done | sort
1634 echo
1635 fi
1636
Martin v. Löwis11437992002-04-12 09:54:03 +00001637 if test -s confdefs.h; then
1638 cat <<\_ASBOX
1639## ----------- ##
1640## confdefs.h. ##
1641## ----------- ##
1642_ASBOX
1643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001645 echo
1646 fi
1647 test "$ac_signal" != 0 &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001648 echo "$as_me: caught signal $ac_signal"
1649 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001651 rm -f core *.core core.conftest.* &&
1652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001655for ac_signal in 1 2 13 15; do
1656 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1657done
1658ac_signal=0
1659
1660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# Predefined preprocessor variables.
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_NAME "$PACKAGE_NAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_VERSION "$PACKAGE_VERSION"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_STRING "$PACKAGE_STRING"
1682_ACEOF
1683
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1687_ACEOF
1688
1689
1690# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001691# Prefer explicitly selected file to automatically selected ones.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692if test -n "$CONFIG_SITE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001693 set x "$CONFIG_SITE"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694elif test "x$prefix" != xNONE; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001695 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001697 set x "$ac_default_prefix/share/config.site" \
1698 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001700shift
1701for ac_site_file
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 if test -r "$ac_site_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001704 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1705echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707 . "$ac_site_file"
1708 fi
1709done
1710
1711if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001712 # Some versions of bash will fail to source /dev/null (special
1713 # files actually), so we avoid doing that.
1714 if test -f "$cache_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001715 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1716echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001717 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 esac
1721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001723 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1724echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001725 >$cache_file
1726fi
1727
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 case $ac_old_set,$ac_new_set in
1737 set,)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 ac_cache_corrupted=: ;;
1741 ,set)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1751echo "$as_me: former value: $ac_old_val" >&2;}
1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1753echo "$as_me: current value: $ac_new_val" >&2;}
1754 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 fi;;
1756 esac
1757 # Pass precious variables to config.status.
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001774 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775fi
1776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
Guido van Rossum7f43da71994-08-01 12:15:30 +00001801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806
Guido van Rossum627b2d71993-12-24 10:39:16 +00001807
Michael W. Hudson54241132001-12-07 15:38:26 +00001808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001810
1811
Martin v. Löwis11437992002-04-12 09:54:03 +00001812
Benjamin Petersond23f8222009-04-05 19:13:16 +00001813if test "$prefix" != "/"; then
1814 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1815fi
1816
1817
Martin v. Löwis11437992002-04-12 09:54:03 +00001818
1819
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001821
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001822# We don't use PACKAGE_ variables, and they cause conflicts
1823# with other autoconf-based packages that include Python.h
1824grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1825rm confdefs.h
1826mv confdefs.h.new confdefs.h
1827
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001828
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001829VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001830
Martin v. Löwis1142de32002-03-29 16:28:31 +00001831
1832SOVERSION=1.0
1833
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001834# The later defininition of _XOPEN_SOURCE disables certain features
1835# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1836
1837cat >>confdefs.h <<\_ACEOF
1838#define _GNU_SOURCE 1
1839_ACEOF
1840
1841
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001842# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1843# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1844# them.
1845
1846cat >>confdefs.h <<\_ACEOF
1847#define _NETBSD_SOURCE 1
1848_ACEOF
1849
1850
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001851# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1852# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1853# them.
1854
1855cat >>confdefs.h <<\_ACEOF
1856#define __BSD_VISIBLE 1
1857_ACEOF
1858
1859
Martin v. Löwisd6320502004-08-12 13:45:08 +00001860# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1861# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1862
1863cat >>confdefs.h <<\_ACEOF
1864#define _BSD_TYPES 1
1865_ACEOF
1866
1867
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001868# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1869# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1870# them.
1871
1872cat >>confdefs.h <<\_ACEOF
1873#define _DARWIN_C_SOURCE 1
1874_ACEOF
1875
1876
1877
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001878define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001879
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001880# Arguments passed to configure.
1881
1882CONFIG_ARGS="$ac_configure_args"
1883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001884# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001885if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001886 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001887 case $enableval in
1888 yes)
1889 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1890 ;;
1891 esac
1892 case $enableval in
1893 no)
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896 ;;
1897 *)
1898 UNIVERSALSDK=$enableval
1899 ;;
1900 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001901
Thomas Wouters477c8d52006-05-27 19:21:47 +00001902else
1903
1904 UNIVERSALSDK=
1905 enable_universalsdk=
1906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001907fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00001908
1909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001910
Benjamin Peterson6794aa32008-07-16 20:33:37 +00001911ARCH_RUN_32BIT=
1912
1913
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001914UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001915{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1916echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001917
1918# Check whether --with-universal-archs was given.
1919if test "${with_universal_archs+set}" = set; then
1920 withval=$with_universal_archs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001921 { echo "$as_me:$LINENO: result: $withval" >&5
1922echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001923 UNIVERSAL_ARCHS="$withval"
1924
1925else
1926
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001927 { echo "$as_me:$LINENO: result: 32-bit" >&5
1928echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001929
1930fi
1931
1932
1933
1934
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001935
1936# Check whether --with-framework-name was given.
1937if test "${with_framework_name+set}" = set; then
1938 withval=$with_framework_name;
1939 PYTHONFRAMEWORK=${withval}
1940 PYTHONFRAMEWORKDIR=${withval}.framework
1941 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1942
1943else
1944
1945 PYTHONFRAMEWORK=Python
1946 PYTHONFRAMEWORKDIR=Python.framework
1947 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1948
1949fi
1950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001951# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001952if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001953 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001954 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001955 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001956 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001957 esac
1958 case $enableval in
1959 no)
1960 PYTHONFRAMEWORK=
1961 PYTHONFRAMEWORKDIR=no-framework
1962 PYTHONFRAMEWORKPREFIX=
1963 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001964 FRAMEWORKINSTALLFIRST=
1965 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001966 FRAMEWORKALTINSTALLFIRST=
1967 FRAMEWORKALTINSTALLLAST=
1968 if test "x${prefix}" = "xNONE"; then
1969 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1970 else
1971 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1972 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001973 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001974 ;;
1975 *)
1976 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001977 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001978 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001979 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001980 if test "$UNIVERSAL_ARCHS" = "all"
1981 then
1982 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001983 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001984 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1987 fi
1988
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001989 if test "x${prefix}" = "xNONE" ; then
1990 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1991 else
1992 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1993 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001994 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001995
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001996 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001997 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001998 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002000 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002001
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002002 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2003
2004 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2005
Jack Jansene578a632001-08-15 01:27:14 +00002006 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002007
Guido van Rossum563e7081996-09-10 18:20:48 +00002008else
Martin v. Löwis11437992002-04-12 09:54:03 +00002009
Jack Jansene578a632001-08-15 01:27:14 +00002010 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002011 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002012 PYTHONFRAMEWORKPREFIX=
2013 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002014 FRAMEWORKINSTALLFIRST=
2015 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002016 FRAMEWORKALTINSTALLFIRST=
2017 FRAMEWORKALTINSTALLLAST=
2018 if test "x${prefix}" = "xNONE" ; then
2019 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2020 else
2021 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2022 fi
Jack Jansene578a632001-08-15 01:27:14 +00002023 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002024
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002025 if test "$UNIVERSAL_ARCHS" = "all"
2026 then
2027 FRAMEWORKINSTALLLAST=update4wayuniversal
2028 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2029 fi
2030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002031fi
2032
Thomas Wouters477c8d52006-05-27 19:21:47 +00002033
2034
Michael W. Hudson54241132001-12-07 15:38:26 +00002035
2036
2037
2038
Jack Jansene578a632001-08-15 01:27:14 +00002039
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002040
2041
2042
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002043
Jack Jansene578a632001-08-15 01:27:14 +00002044##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002045## AC_HELP_STRING(--with-dyld,
2046## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002047##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002048# Set name for machine-dependent library files
2049
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002050{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2051echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002052if test -z "$MACHDEP"
2053then
Guido van Rossum563e7081996-09-10 18:20:48 +00002054 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002055 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2056 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002057 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002058 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002060 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002061 ac_md_system=`echo $ac_sys_system |
2062 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2063 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002064 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002065 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002066
Guido van Rossum07397971997-04-29 21:49:50 +00002067 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002068 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002069 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002070 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002071 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002072 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002073 esac
2074fi
Guido van Rossum91922671997-10-09 20:24:13 +00002075
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002076# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2077# disable features if it is defined, without any means to access these
2078# features as extensions. For these systems, we skip the definition of
2079# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2080# some feature, make sure there is no alternative way to access this
2081# feature. Also, when using wildcards, make sure you have verified the
2082# need for not defining _XOPEN_SOURCE on all systems matching the
2083# wildcard, and that the wildcard does not include future systems
2084# (which may remove their limitations).
2085case $ac_sys_system/$ac_sys_release in
2086 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2087 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002088 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002089 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002090 define_xopen_source=no
2091 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2092 # also defined. This can be overridden by defining _BSD_SOURCE
2093 # As this has a different meaning on Linux, only define it on OpenBSD
2094
2095cat >>confdefs.h <<\_ACEOF
2096#define _BSD_SOURCE 1
2097_ACEOF
2098
2099 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002100 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2101 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2102 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002103 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 +00002104 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002105 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2106 # of union __?sigval. Reported by Stuart Bishop.
2107 SunOS/5.6)
2108 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002109 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2110 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002111 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002112 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002113 define_xopen_source=no;;
2114 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002115 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002116 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002117 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002118 # On FreeBSD 4, the math functions C89 does not cover are never defined
2119 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2120 FreeBSD/4.*)
2121 define_xopen_source=no;;
2122 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2123 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2124 # identifies itself as Darwin/7.*
2125 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2126 # disables platform specific features beyond repair.
2127 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2128 # has no effect, don't bother defining them
2129 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002130 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002131 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2132 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2133 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002134 AIX/4)
2135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002136 AIX/5)
2137 if test `uname -r` -eq 1; then
2138 define_xopen_source=no
2139 fi
2140 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002141 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2142 # defining NI_NUMERICHOST.
2143 QNX/6.3.2)
2144 define_xopen_source=no
2145 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002146
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002147esac
2148
2149if test $define_xopen_source = yes
2150then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002151 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2152 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002153 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2154 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002155 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002156 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002157
2158cat >>confdefs.h <<\_ACEOF
2159#define _XOPEN_SOURCE 500
2160_ACEOF
2161
2162 ;;
2163 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002164
2165cat >>confdefs.h <<\_ACEOF
2166#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002167_ACEOF
2168
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 ;;
2170 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002171
2172 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2173 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2174 # several APIs are not declared. Since this is also needed in some
2175 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002176 # except for Solaris 10, where it must not be defined,
2177 # as it implies XPG4.2
2178 case $ac_sys_system/$ac_sys_release in
2179 SunOS/5.10)
2180 ;;
2181 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182
2183cat >>confdefs.h <<\_ACEOF
2184#define _XOPEN_SOURCE_EXTENDED 1
2185_ACEOF
2186
Martin v. Löwis7dece662005-11-26 11:38:24 +00002187 ;;
2188 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002189
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002190
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002191cat >>confdefs.h <<\_ACEOF
2192#define _POSIX_C_SOURCE 200112L
2193_ACEOF
2194
2195
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002196fi
2197
Guido van Rossum91922671997-10-09 20:24:13 +00002198#
2199# SGI compilers allow the specification of the both the ABI and the
2200# ISA on the command line. Depending on the values of these switches,
2201# different and often incompatable code will be generated.
2202#
2203# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2204# thus supply support for various ABI/ISA combinations. The MACHDEP
2205# variable is also adjusted.
2206#
2207
2208if test ! -z "$SGI_ABI"
2209then
2210 CC="cc $SGI_ABI"
2211 LDFLAGS="$SGI_ABI $LDFLAGS"
2212 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2213fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002214{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2215echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002216
Jack Jansen6b08a402004-06-03 12:41:45 +00002217# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2218# it may influence the way we can build extensions, so distutils
2219# needs to check it
2220
Thomas Wouters477c8d52006-05-27 19:21:47 +00002221
Jack Jansen6b08a402004-06-03 12:41:45 +00002222CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002223EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002224
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002225{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2226echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002227ac_sys_machine=`uname -m`
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002228{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2229echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002230
Guido van Rossum627b2d71993-12-24 10:39:16 +00002231# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002232
2233# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2234# for debug/optimization stuff. BASECFLAGS is for flags that are required
2235# just to get things to compile and link. Users are free to override OPT
2236# when running configure or make. The build should not break if they do.
2237# BASECFLAGS should generally not be messed with, however.
2238
2239# XXX shouldn't some/most/all of this code be merged with the stuff later
2240# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002241{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2242echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002244# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002245if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002246 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002247 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002248 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002249 without_gcc=yes;;
2250 yes) CC=gcc
2251 without_gcc=no;;
2252 *) CC=$withval
2253 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002254 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002255else
Martin v. Löwis11437992002-04-12 09:54:03 +00002256
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002257 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002258 AIX*) CC=cc_r
2259 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002260 Monterey*)
2261 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002262 without_gcc=;;
2263 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002264 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002265fi
2266
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002267{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2268echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002269
Guido van Rossum8b131c51995-03-09 14:10:13 +00002270# If the user switches compilers, we can't believe the cache
2271if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2272then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002273 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002274(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002275echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002276(it is also a good idea to do 'make clean' before compiling)" >&2;}
2277 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002278fi
2279
Martin v. Löwis11437992002-04-12 09:54:03 +00002280ac_ext=c
2281ac_cpp='$CPP $CPPFLAGS'
2282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2284ac_compiler_gnu=$ac_cv_c_compiler_gnu
2285if test -n "$ac_tool_prefix"; then
2286 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2287set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002288{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002290if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002292else
2293 if test -n "$CC"; then
2294 ac_cv_prog_CC="$CC" # Let the user override the test.
2295else
Martin v. Löwis11437992002-04-12 09:54:03 +00002296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2297for as_dir in $PATH
2298do
2299 IFS=$as_save_IFS
2300 test -z "$as_dir" && as_dir=.
2301 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002302 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 +00002303 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002305 break 2
2306 fi
2307done
2308done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002309IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002310
Jack Jansendd19cf82001-12-06 22:36:17 +00002311fi
2312fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002313CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002314if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002315 { echo "$as_me:$LINENO: result: $CC" >&5
2316echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002317else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002318 { echo "$as_me:$LINENO: result: no" >&5
2319echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002320fi
2321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002322
Martin v. Löwis11437992002-04-12 09:54:03 +00002323fi
2324if test -z "$ac_cv_prog_CC"; then
2325 ac_ct_CC=$CC
2326 # Extract the first word of "gcc", so it can be a program name with args.
2327set dummy gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002328{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002330if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002331 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002332else
2333 if test -n "$ac_ct_CC"; then
2334 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2335else
2336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2337for as_dir in $PATH
2338do
2339 IFS=$as_save_IFS
2340 test -z "$as_dir" && as_dir=.
2341 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002342 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 +00002343 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002344 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002345 break 2
2346 fi
2347done
2348done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002350
2351fi
2352fi
2353ac_ct_CC=$ac_cv_prog_ac_ct_CC
2354if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002355 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2356echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002358 { echo "$as_me:$LINENO: result: no" >&5
2359echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002360fi
2361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002362 if test "x$ac_ct_CC" = x; then
2363 CC=""
2364 else
2365 case $cross_compiling:$ac_tool_warned in
2366yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002367{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2368whose name does not start with the host triplet. If you think this
2369configuration is useful to you, please write to autoconf@gnu.org." >&5
2370echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2371whose name does not start with the host triplet. If you think this
2372configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002373ac_tool_warned=yes ;;
2374esac
2375 CC=$ac_ct_CC
2376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002377else
2378 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002379fi
2380
Jack Jansendd19cf82001-12-06 22:36:17 +00002381if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382 if test -n "$ac_tool_prefix"; then
2383 # 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 +00002384set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002385{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002387if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002388 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002389else
2390 if test -n "$CC"; then
2391 ac_cv_prog_CC="$CC" # Let the user override the test.
2392else
Martin v. Löwis11437992002-04-12 09:54:03 +00002393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2394for as_dir in $PATH
2395do
2396 IFS=$as_save_IFS
2397 test -z "$as_dir" && as_dir=.
2398 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399 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 +00002400 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002401 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002402 break 2
2403 fi
2404done
2405done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002407
2408fi
2409fi
2410CC=$ac_cv_prog_CC
2411if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002412 { echo "$as_me:$LINENO: result: $CC" >&5
2413echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002414else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002415 { echo "$as_me:$LINENO: result: no" >&5
2416echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002417fi
2418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002421fi
2422if test -z "$CC"; then
2423 # Extract the first word of "cc", so it can be a program name with args.
2424set dummy cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002425{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2426echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002427if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002428 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002429else
2430 if test -n "$CC"; then
2431 ac_cv_prog_CC="$CC" # Let the user override the test.
2432else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002433 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2435for as_dir in $PATH
2436do
2437 IFS=$as_save_IFS
2438 test -z "$as_dir" && as_dir=.
2439 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440 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 +00002441 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2442 ac_prog_rejected=yes
2443 continue
2444 fi
2445 ac_cv_prog_CC="cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002447 break 2
2448 fi
2449done
2450done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453if test $ac_prog_rejected = yes; then
2454 # We found a bogon in the path, so make sure we never use it.
2455 set dummy $ac_cv_prog_CC
2456 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002458 # We chose a different compiler from the bogus one.
2459 # However, it has the same basename, so the bogon will be chosen
2460 # first if we set CC to just the basename; use the full file name.
2461 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002462 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002463 fi
2464fi
2465fi
2466fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002467CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002469 { echo "$as_me:$LINENO: result: $CC" >&5
2470echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002471else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002472 { echo "$as_me:$LINENO: result: no" >&5
2473echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002474fi
2475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476
Martin v. Löwis11437992002-04-12 09:54:03 +00002477fi
2478if test -z "$CC"; then
2479 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002481 do
2482 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2483set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002484{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002486if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002487 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002488else
2489 if test -n "$CC"; then
2490 ac_cv_prog_CC="$CC" # Let the user override the test.
2491else
Martin v. Löwis11437992002-04-12 09:54:03 +00002492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
2497 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 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 +00002499 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002500 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002501 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002502 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002503done
2504done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002506
2507fi
2508fi
2509CC=$ac_cv_prog_CC
2510if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002511 { echo "$as_me:$LINENO: result: $CC" >&5
2512echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002513else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002514 { echo "$as_me:$LINENO: result: no" >&5
2515echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002516fi
2517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 test -n "$CC" && break
2520 done
2521fi
2522if test -z "$CC"; then
2523 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002525do
2526 # Extract the first word of "$ac_prog", so it can be a program name with args.
2527set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002528{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002530if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002532else
2533 if test -n "$ac_ct_CC"; then
2534 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2535else
2536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2537for as_dir in $PATH
2538do
2539 IFS=$as_save_IFS
2540 test -z "$as_dir" && as_dir=.
2541 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 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 +00002543 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002544 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 break 2
2546 fi
2547done
2548done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551fi
2552fi
2553ac_ct_CC=$ac_cv_prog_ac_ct_CC
2554if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002555 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2556echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002557else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002558 { echo "$as_me:$LINENO: result: no" >&5
2559echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002560fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 test -n "$ac_ct_CC" && break
2564done
Michael W. Hudson54241132001-12-07 15:38:26 +00002565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 if test "x$ac_ct_CC" = x; then
2567 CC=""
2568 else
2569 case $cross_compiling:$ac_tool_warned in
2570yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002571{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2572whose name does not start with the host triplet. If you think this
2573configuration is useful to you, please write to autoconf@gnu.org." >&5
2574echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2575whose name does not start with the host triplet. If you think this
2576configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577ac_tool_warned=yes ;;
2578esac
2579 CC=$ac_ct_CC
2580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002581fi
2582
2583fi
2584
2585
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002586test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002587See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002588echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002589See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002590 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002591
2592# Provide some information about the compiler.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002593echo "$as_me:$LINENO: checking for C compiler version" >&5
2594ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595{ (ac_try="$ac_compiler --version >&5"
2596case "(($ac_try" in
2597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2598 *) ac_try_echo=$ac_try;;
2599esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605{ (ac_try="$ac_compiler -v >&5"
2606case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615{ (ac_try="$ac_compiler -V >&5"
2616case "(($ac_try" in
2617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2618 *) ac_try_echo=$ac_try;;
2619esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 (exit $ac_status); }
2625
2626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002627/* confdefs.h. */
2628_ACEOF
2629cat confdefs.h >>conftest.$ac_ext
2630cat >>conftest.$ac_ext <<_ACEOF
2631/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633int
2634main ()
2635{
2636
2637 ;
2638 return 0;
2639}
2640_ACEOF
2641ac_clean_files_save=$ac_clean_files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002642ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002643# Try to create an executable without -o first, disregard a.out.
2644# It will help us diagnose broken compilers, and finding out an intuition
2645# of exeext.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002646{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2647echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2648ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2649#
2650# List of possible output files, starting from the most likely.
2651# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2652# only as a last resort. b.out is created by i960 compilers.
2653ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2654#
2655# The IRIX 6 linker writes into existing files which may not be
2656# executable, retaining their permissions. Remove them first so a
2657# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658ac_rmfiles=
2659for ac_file in $ac_files
2660do
2661 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002662 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2664 esac
2665done
2666rm -f $ac_rmfiles
2667
2668if { (ac_try="$ac_link_default"
2669case "(($ac_try" in
2670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671 *) ac_try_echo=$ac_try;;
2672esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2679# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2680# in a Makefile. We should not override ac_cv_exeext if it was cached,
2681# so that the user can short-circuit this test for compilers unknown to
2682# Autoconf.
2683for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002684do
2685 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002687 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002688 ;;
2689 [ab].out )
2690 # We found the default executable, but exeext='' is most
2691 # certainly right.
2692 break;;
2693 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2695 then :; else
2696 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2697 fi
2698 # We set ac_cv_exeext here because the later test for it is not
2699 # safe: cross compilers may not add the suffix if given an `-o'
2700 # argument, so we may need to know it at that point already.
2701 # Even if this section looks crufty: it has the advantage of
2702 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002703 break;;
2704 * )
2705 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 esac
2707done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708test "$ac_cv_exeext" = no && ac_cv_exeext=
2709
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002710else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711 ac_file=''
2712fi
2713
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002714{ echo "$as_me:$LINENO: result: $ac_file" >&5
2715echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002716if test -z "$ac_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002718sed 's/^/| /' conftest.$ac_ext >&5
2719
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002720{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002721See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002722echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002723See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002724 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002725fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002726
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002727ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002729# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002730# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002731{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2732echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002733# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2734# If not cross compiling, check that we can run a simple program.
2735if test "$cross_compiling" != yes; then
2736 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 { (case "(($ac_try" in
2738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2739 *) ac_try_echo=$ac_try;;
2740esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002742 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 (exit $ac_status); }; }; then
2746 cross_compiling=no
2747 else
2748 if test "$cross_compiling" = maybe; then
2749 cross_compiling=yes
2750 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002751 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002752If you meant to cross compile, use \`--host'.
2753See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002754echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002755If you meant to cross compile, use \`--host'.
2756See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002757 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 fi
2759 fi
2760fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002761{ echo "$as_me:$LINENO: result: yes" >&5
2762echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002764rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002765ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002767# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002768{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2769echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2770{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2771echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002772
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002773{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2774echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002775if { (ac_try="$ac_link"
2776case "(($ac_try" in
2777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778 *) ac_try_echo=$ac_try;;
2779esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002781 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002785 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2786# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2787# work properly (i.e., refer to `conftest.exe'), while it won't with
2788# `rm'.
2789for ac_file in conftest.exe conftest conftest.*; do
2790 test -f "$ac_file" || continue
2791 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002792 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002793 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2794 break;;
2795 * ) break;;
2796 esac
2797done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002799 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002800See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002801echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002802See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002803 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002804fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002805
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002806rm -f conftest$ac_cv_exeext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002807{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2808echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002809
2810rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002811EXEEXT=$ac_cv_exeext
2812ac_exeext=$EXEEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002813{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2814echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002815if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002816 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002817else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002818 cat >conftest.$ac_ext <<_ACEOF
2819/* confdefs.h. */
2820_ACEOF
2821cat confdefs.h >>conftest.$ac_ext
2822cat >>conftest.$ac_ext <<_ACEOF
2823/* end confdefs.h. */
2824
2825int
2826main ()
2827{
2828
2829 ;
2830 return 0;
2831}
2832_ACEOF
2833rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002834if { (ac_try="$ac_compile"
2835case "(($ac_try" in
2836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2837 *) ac_try_echo=$ac_try;;
2838esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002840 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002841 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002843 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002844 for ac_file in conftest.o conftest.obj conftest.*; do
2845 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002846 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002847 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002848 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2849 break;;
2850 esac
2851done
2852else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002854sed 's/^/| /' conftest.$ac_ext >&5
2855
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002856{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002857See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002858echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002859See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002860 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002861fi
2862
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002863rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002864fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002865{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2866echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867OBJEXT=$ac_cv_objext
2868ac_objext=$OBJEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002869{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2870echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002871if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002872 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002873else
2874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002875/* confdefs.h. */
2876_ACEOF
2877cat confdefs.h >>conftest.$ac_ext
2878cat >>conftest.$ac_ext <<_ACEOF
2879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002880
Martin v. Löwis11437992002-04-12 09:54:03 +00002881int
2882main ()
2883{
2884#ifndef __GNUC__
2885 choke me
2886#endif
2887
2888 ;
2889 return 0;
2890}
2891_ACEOF
2892rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002893if { (ac_try="$ac_compile"
2894case "(($ac_try" in
2895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2896 *) ac_try_echo=$ac_try;;
2897esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002901 grep -v '^ *+' conftest.er1 >conftest.err
2902 rm -f conftest.er1
2903 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002905 (exit $ac_status); } && {
2906 test -z "$ac_c_werror_flag" ||
2907 test ! -s conftest.err
2908 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002909 ac_compiler_gnu=yes
2910else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002912sed 's/^/| /' conftest.$ac_ext >&5
2913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002914 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002916
2917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002918ac_cv_c_compiler_gnu=$ac_compiler_gnu
2919
2920fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002921{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2922echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2923GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002924ac_test_CFLAGS=${CFLAGS+set}
2925ac_save_CFLAGS=$CFLAGS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002926{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2927echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002928if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002930else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 ac_save_c_werror_flag=$ac_c_werror_flag
2932 ac_c_werror_flag=yes
2933 ac_cv_prog_cc_g=no
2934 CFLAGS="-g"
2935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002936/* confdefs.h. */
2937_ACEOF
2938cat confdefs.h >>conftest.$ac_ext
2939cat >>conftest.$ac_ext <<_ACEOF
2940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Martin v. Löwis11437992002-04-12 09:54:03 +00002942int
2943main ()
2944{
2945
2946 ;
2947 return 0;
2948}
2949_ACEOF
2950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002951if { (ac_try="$ac_compile"
2952case "(($ac_try" in
2953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2954 *) ac_try_echo=$ac_try;;
2955esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002959 grep -v '^ *+' conftest.er1 >conftest.err
2960 rm -f conftest.er1
2961 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002963 (exit $ac_status); } && {
2964 test -z "$ac_c_werror_flag" ||
2965 test ! -s conftest.err
2966 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002967 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002968else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002970sed 's/^/| /' conftest.$ac_ext >&5
2971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002972 CFLAGS=""
2973 cat >conftest.$ac_ext <<_ACEOF
2974/* confdefs.h. */
2975_ACEOF
2976cat confdefs.h >>conftest.$ac_ext
2977cat >>conftest.$ac_ext <<_ACEOF
2978/* end confdefs.h. */
2979
2980int
2981main ()
2982{
2983
2984 ;
2985 return 0;
2986}
2987_ACEOF
2988rm -f conftest.$ac_objext
2989if { (ac_try="$ac_compile"
2990case "(($ac_try" in
2991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2992 *) ac_try_echo=$ac_try;;
2993esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995 (eval "$ac_compile") 2>conftest.er1
2996 ac_status=$?
2997 grep -v '^ *+' conftest.er1 >conftest.err
2998 rm -f conftest.er1
2999 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001 (exit $ac_status); } && {
3002 test -z "$ac_c_werror_flag" ||
3003 test ! -s conftest.err
3004 } && test -s conftest.$ac_objext; then
3005 :
3006else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003007 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008sed 's/^/| /' conftest.$ac_ext >&5
3009
3010 ac_c_werror_flag=$ac_save_c_werror_flag
3011 CFLAGS="-g"
3012 cat >conftest.$ac_ext <<_ACEOF
3013/* confdefs.h. */
3014_ACEOF
3015cat confdefs.h >>conftest.$ac_ext
3016cat >>conftest.$ac_ext <<_ACEOF
3017/* end confdefs.h. */
3018
3019int
3020main ()
3021{
3022
3023 ;
3024 return 0;
3025}
3026_ACEOF
3027rm -f conftest.$ac_objext
3028if { (ac_try="$ac_compile"
3029case "(($ac_try" in
3030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3031 *) ac_try_echo=$ac_try;;
3032esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 (eval "$ac_compile") 2>conftest.er1
3035 ac_status=$?
3036 grep -v '^ *+' conftest.er1 >conftest.err
3037 rm -f conftest.er1
3038 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040 (exit $ac_status); } && {
3041 test -z "$ac_c_werror_flag" ||
3042 test ! -s conftest.err
3043 } && test -s conftest.$ac_objext; then
3044 ac_cv_prog_cc_g=yes
3045else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003046 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003047sed 's/^/| /' conftest.$ac_ext >&5
3048
3049
Guido van Rossum627b2d71993-12-24 10:39:16 +00003050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051
3052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054
3055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3056fi
3057
3058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059 ac_c_werror_flag=$ac_save_c_werror_flag
3060fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003061{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3062echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003063if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003065elif test $ac_cv_prog_cc_g = yes; then
3066 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003067 CFLAGS="-g -O2"
3068 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003069 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070 fi
3071else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003072 if test "$GCC" = yes; then
3073 CFLAGS="-O2"
3074 else
3075 CFLAGS=
3076 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003077fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003078{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3079echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003080if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003081 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003082else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003084ac_save_CC=$CC
3085cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003086/* confdefs.h. */
3087_ACEOF
3088cat confdefs.h >>conftest.$ac_ext
3089cat >>conftest.$ac_ext <<_ACEOF
3090/* end confdefs.h. */
3091#include <stdarg.h>
3092#include <stdio.h>
3093#include <sys/types.h>
3094#include <sys/stat.h>
3095/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3096struct buf { int x; };
3097FILE * (*rcsopen) (struct buf *, struct stat *, int);
3098static char *e (p, i)
3099 char **p;
3100 int i;
3101{
3102 return p[i];
3103}
3104static char *f (char * (*g) (char **, int), char **p, ...)
3105{
3106 char *s;
3107 va_list v;
3108 va_start (v,p);
3109 s = g (p, va_arg (v,int));
3110 va_end (v);
3111 return s;
3112}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003113
3114/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3115 function prototypes and stuff, but not '\xHH' hex character constants.
3116 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003118 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3119 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003121int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003123/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3124 inside strings and character constants. */
3125#define FOO(x) 'x'
3126int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3127
Skip Montanaro6dead952003-09-25 14:50:04 +00003128int test (int i, double x);
3129struct s1 {int (*f) (int a);};
3130struct s2 {int (*f) (double a);};
3131int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3132int argc;
3133char **argv;
3134int
3135main ()
3136{
3137return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3138 ;
3139 return 0;
3140}
3141_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3143 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003144do
3145 CC="$ac_save_CC $ac_arg"
3146 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147if { (ac_try="$ac_compile"
3148case "(($ac_try" in
3149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3150 *) ac_try_echo=$ac_try;;
3151esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003155 grep -v '^ *+' conftest.er1 >conftest.err
3156 rm -f conftest.er1
3157 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003159 (exit $ac_status); } && {
3160 test -z "$ac_c_werror_flag" ||
3161 test ! -s conftest.err
3162 } && test -s conftest.$ac_objext; then
3163 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003164else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003165 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003166sed 's/^/| /' conftest.$ac_ext >&5
3167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003168
Skip Montanaro6dead952003-09-25 14:50:04 +00003169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003170
3171rm -f core conftest.err conftest.$ac_objext
3172 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003173done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003175CC=$ac_save_CC
3176
3177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178# AC_CACHE_VAL
3179case "x$ac_cv_prog_cc_c89" in
3180 x)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003181 { echo "$as_me:$LINENO: result: none needed" >&5
3182echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003183 xno)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003184 { echo "$as_me:$LINENO: result: unsupported" >&5
3185echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003186 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003188 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3189echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003190esac
3191
Skip Montanaro6dead952003-09-25 14:50:04 +00003192
Martin v. Löwis11437992002-04-12 09:54:03 +00003193ac_ext=c
3194ac_cpp='$CPP $CPPFLAGS'
3195ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3196ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3197ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003198
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003199
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003200
3201
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003202{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3203echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003206if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003207 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003208
3209 case $withval in
3210 no) with_cxx_main=no
3211 MAINCC='$(CC)';;
3212 yes) with_cxx_main=yes
3213 MAINCC='$(CXX)';;
3214 *) with_cxx_main=yes
3215 MAINCC=$withval
3216 if test -z "$CXX"
3217 then
3218 CXX=$withval
3219 fi;;
3220 esac
3221else
3222
3223 with_cxx_main=no
3224 MAINCC='$(CC)'
3225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226fi
3227
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003228{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3229echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003230
3231preset_cxx="$CXX"
3232if test -z "$CXX"
3233then
3234 case "$CC" in
3235 gcc) # Extract the first word of "g++", so it can be a program name with args.
3236set dummy g++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003237{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3238echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003239if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003240 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003241else
3242 case $CXX in
3243 [\\/]* | ?:[\\/]*)
3244 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3245 ;;
3246 *)
3247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248for as_dir in notfound
3249do
3250 IFS=$as_save_IFS
3251 test -z "$as_dir" && as_dir=.
3252 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253 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 +00003254 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003255 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003256 break 2
3257 fi
3258done
3259done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003261
3262 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3263 ;;
3264esac
3265fi
3266CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003267if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003268 { echo "$as_me:$LINENO: result: $CXX" >&5
3269echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003270else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003271 { echo "$as_me:$LINENO: result: no" >&5
3272echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003274
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003275 ;;
3276 cc) # Extract the first word of "c++", so it can be a program name with args.
3277set dummy c++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003280if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003281 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003282else
3283 case $CXX in
3284 [\\/]* | ?:[\\/]*)
3285 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3286 ;;
3287 *)
3288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3289for as_dir in notfound
3290do
3291 IFS=$as_save_IFS
3292 test -z "$as_dir" && as_dir=.
3293 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003294 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 +00003295 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003297 break 2
3298 fi
3299done
3300done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003301IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003302
3303 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3304 ;;
3305esac
3306fi
3307CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003308if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003309 { echo "$as_me:$LINENO: result: $CXX" >&5
3310echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003311else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003312 { echo "$as_me:$LINENO: result: no" >&5
3313echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003316 ;;
3317 esac
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test -z "$CXX"
3324then
3325 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3326do
3327 # Extract the first word of "$ac_prog", so it can be a program name with args.
3328set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003329{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003331if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003332 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003333else
3334 if test -n "$CXX"; then
3335 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3336else
3337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in $PATH
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343 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 +00003344 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003346 break 2
3347 fi
3348done
3349done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003350IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003351
3352fi
3353fi
3354CXX=$ac_cv_prog_CXX
3355if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003356 { echo "$as_me:$LINENO: result: $CXX" >&5
3357echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003359 { echo "$as_me:$LINENO: result: no" >&5
3360echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003361fi
3362
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003363
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003364 test -n "$CXX" && break
3365done
3366test -n "$CXX" || CXX="notfound"
3367
3368 if test "$CXX" = "notfound"
3369 then
3370 CXX=""
3371 fi
3372fi
3373if test "$preset_cxx" != "$CXX"
3374then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003375 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003376
3377 By default, distutils will build C++ extension modules with \"$CXX\".
3378 If this is not intended, then set CXX on the configure command line.
3379 " >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003380echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381
3382 By default, distutils will build C++ extension modules with \"$CXX\".
3383 If this is not intended, then set CXX on the configure command line.
3384 " >&2;}
3385fi
3386
3387
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003388# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003389
3390ac_ext=c
3391ac_cpp='$CPP $CPPFLAGS'
3392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3394ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003395{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3396echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003397# On Suns, sometimes $CPP names a directory.
3398if test -n "$CPP" && test -d "$CPP"; then
3399 CPP=
3400fi
3401if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003403 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003404else
Martin v. Löwis11437992002-04-12 09:54:03 +00003405 # Double quotes because CPP needs to be expanded
3406 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3407 do
3408 ac_preproc_ok=false
3409for ac_c_preproc_warn_flag in '' yes
3410do
3411 # Use a header file that comes with gcc, so configuring glibc
3412 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003413 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3414 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003415 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 # not just through cpp. "Syntax error" is here to catch this case.
3417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003418/* confdefs.h. */
3419_ACEOF
3420cat confdefs.h >>conftest.$ac_ext
3421cat >>conftest.$ac_ext <<_ACEOF
3422/* end confdefs.h. */
3423#ifdef __STDC__
3424# include <limits.h>
3425#else
3426# include <assert.h>
3427#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003428 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003429_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430if { (ac_try="$ac_cpp conftest.$ac_ext"
3431case "(($ac_try" in
3432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3433 *) ac_try_echo=$ac_try;;
3434esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003436 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003438 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 rm -f conftest.er1
3440 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003442 (exit $ac_status); } >/dev/null && {
3443 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3444 test ! -s conftest.err
3445 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003446 :
3447else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003449sed 's/^/| /' conftest.$ac_ext >&5
3450
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 # Broken: fails on valid input.
3452continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454
Martin v. Löwis11437992002-04-12 09:54:03 +00003455rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003457 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 # can be detected and how.
3459 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003460/* confdefs.h. */
3461_ACEOF
3462cat confdefs.h >>conftest.$ac_ext
3463cat >>conftest.$ac_ext <<_ACEOF
3464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003465#include <ac_nonexistent.h>
3466_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467if { (ac_try="$ac_cpp conftest.$ac_ext"
3468case "(($ac_try" in
3469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3470 *) ac_try_echo=$ac_try;;
3471esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003473 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003475 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003476 rm -f conftest.er1
3477 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 (exit $ac_status); } >/dev/null && {
3480 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3481 test ! -s conftest.err
3482 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 # Broken: success on invalid input.
3484continue
3485else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003487sed 's/^/| /' conftest.$ac_ext >&5
3488
Martin v. Löwis11437992002-04-12 09:54:03 +00003489 # Passes both tests.
3490ac_preproc_ok=:
3491break
3492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003493
Martin v. Löwis11437992002-04-12 09:54:03 +00003494rm -f conftest.err conftest.$ac_ext
3495
3496done
3497# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3498rm -f conftest.err conftest.$ac_ext
3499if $ac_preproc_ok; then
3500 break
3501fi
3502
3503 done
3504 ac_cv_prog_CPP=$CPP
3505
3506fi
3507 CPP=$ac_cv_prog_CPP
3508else
3509 ac_cv_prog_CPP=$CPP
3510fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003511{ echo "$as_me:$LINENO: result: $CPP" >&5
3512echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003513ac_preproc_ok=false
3514for ac_c_preproc_warn_flag in '' yes
3515do
3516 # Use a header file that comes with gcc, so configuring glibc
3517 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003518 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3519 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003520 # On the NeXT, cc -E runs the code through the compiler's parser,
3521 # not just through cpp. "Syntax error" is here to catch this case.
3522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003523/* confdefs.h. */
3524_ACEOF
3525cat confdefs.h >>conftest.$ac_ext
3526cat >>conftest.$ac_ext <<_ACEOF
3527/* end confdefs.h. */
3528#ifdef __STDC__
3529# include <limits.h>
3530#else
3531# include <assert.h>
3532#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003533 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003534_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535if { (ac_try="$ac_cpp conftest.$ac_ext"
3536case "(($ac_try" in
3537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3538 *) ac_try_echo=$ac_try;;
3539esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003543 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 rm -f conftest.er1
3545 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003547 (exit $ac_status); } >/dev/null && {
3548 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3549 test ! -s conftest.err
3550 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 :
3552else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003554sed 's/^/| /' conftest.$ac_ext >&5
3555
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 # Broken: fails on valid input.
3557continue
3558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003559
Martin v. Löwis11437992002-04-12 09:54:03 +00003560rm -f conftest.err conftest.$ac_ext
3561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 # can be detected and how.
3564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003565/* confdefs.h. */
3566_ACEOF
3567cat confdefs.h >>conftest.$ac_ext
3568cat >>conftest.$ac_ext <<_ACEOF
3569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003570#include <ac_nonexistent.h>
3571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003572if { (ac_try="$ac_cpp conftest.$ac_ext"
3573case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003580 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003581 rm -f conftest.er1
3582 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003584 (exit $ac_status); } >/dev/null && {
3585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3586 test ! -s conftest.err
3587 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Broken: success on invalid input.
3589continue
3590else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003592sed 's/^/| /' conftest.$ac_ext >&5
3593
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 # Passes both tests.
3595ac_preproc_ok=:
3596break
3597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599rm -f conftest.err conftest.$ac_ext
3600
3601done
3602# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3603rm -f conftest.err conftest.$ac_ext
3604if $ac_preproc_ok; then
3605 :
3606else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003607 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003608See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003609echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003610See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003611 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
3614ac_ext=c
3615ac_cpp='$CPP $CPPFLAGS'
3616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3618ac_compiler_gnu=$ac_cv_c_compiler_gnu
3619
3620
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003621{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3622echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003624 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003625else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003626 # Extract the first word of "grep ggrep" to use in msg output
3627if test -z "$GREP"; then
3628set dummy grep ggrep; ac_prog_name=$2
3629if test "${ac_cv_path_GREP+set}" = set; then
3630 echo $ECHO_N "(cached) $ECHO_C" >&6
3631else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632 ac_path_GREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003633# Loop through the user's path and test for each of PROGNAME-LIST
3634as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003635for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3636do
3637 IFS=$as_save_IFS
3638 test -z "$as_dir" && as_dir=.
3639 for ac_prog in grep ggrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
3641 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3642 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3643 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 # Check for GNU $ac_path_GREP
3645case `"$ac_path_GREP" --version 2>&1` in
3646*GNU*)
3647 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3648*)
3649 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003650 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651 while :
3652 do
3653 cat "conftest.in" "conftest.in" >"conftest.tmp"
3654 mv "conftest.tmp" "conftest.in"
3655 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003656 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3658 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3659 ac_count=`expr $ac_count + 1`
3660 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3661 # Best one so far, save it but keep looking for a better one
3662 ac_cv_path_GREP="$ac_path_GREP"
3663 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003664 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 # 10*(2^10) chars as input seems more than enough
3666 test $ac_count -gt 10 && break
3667 done
3668 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3669esac
3670
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003671
3672 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673 done
3674done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003675
3676done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003678
3679
3680fi
3681
3682GREP="$ac_cv_path_GREP"
3683if test -z "$GREP"; then
3684 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3685echo "$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 +00003686 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003687fi
3688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689else
3690 ac_cv_path_GREP=$GREP
3691fi
3692
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003695{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3696echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 GREP="$ac_cv_path_GREP"
3698
3699
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003700{ echo "$as_me:$LINENO: checking for egrep" >&5
3701echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003703 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003704else
3705 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3706 then ac_cv_path_EGREP="$GREP -E"
3707 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003708 # Extract the first word of "egrep" to use in msg output
3709if test -z "$EGREP"; then
3710set dummy egrep; ac_prog_name=$2
3711if test "${ac_cv_path_EGREP+set}" = set; then
3712 echo $ECHO_N "(cached) $ECHO_C" >&6
3713else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714 ac_path_EGREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003715# Loop through the user's path and test for each of PROGNAME-LIST
3716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3718do
3719 IFS=$as_save_IFS
3720 test -z "$as_dir" && as_dir=.
3721 for ac_prog in egrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003722 for ac_exec_ext in '' $ac_executable_extensions; do
3723 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3724 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3725 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726 # Check for GNU $ac_path_EGREP
3727case `"$ac_path_EGREP" --version 2>&1` in
3728*GNU*)
3729 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3730*)
3731 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003732 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733 while :
3734 do
3735 cat "conftest.in" "conftest.in" >"conftest.tmp"
3736 mv "conftest.tmp" "conftest.in"
3737 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003738 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3740 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3741 ac_count=`expr $ac_count + 1`
3742 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3743 # Best one so far, save it but keep looking for a better one
3744 ac_cv_path_EGREP="$ac_path_EGREP"
3745 ac_path_EGREP_max=$ac_count
3746 fi
3747 # 10*(2^10) chars as input seems more than enough
3748 test $ac_count -gt 10 && break
3749 done
3750 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3751esac
3752
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003753
3754 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755 done
3756done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003757
3758done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003759IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003760
3761
3762fi
3763
3764EGREP="$ac_cv_path_EGREP"
3765if test -z "$EGREP"; then
3766 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3767echo "$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 +00003768 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003769fi
3770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771else
3772 ac_cv_path_EGREP=$EGREP
3773fi
3774
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776 fi
3777fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003778{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3779echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003781
3782
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003783
3784{ echo "$as_me:$LINENO: checking for AIX" >&5
3785echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3786cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003787/* confdefs.h. */
3788_ACEOF
3789cat confdefs.h >>conftest.$ac_ext
3790cat >>conftest.$ac_ext <<_ACEOF
3791/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003792#ifdef _AIX
3793 yes
Antoine Pitrou20327222009-05-24 20:39:11 +00003794#endif
3795
Antoine Pitrou20327222009-05-24 20:39:11 +00003796_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3798 $EGREP "yes" >/dev/null 2>&1; then
3799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003801cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003802#define _ALL_SOURCE 1
3803_ACEOF
3804
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003805else
3806 { echo "$as_me:$LINENO: result: no" >&5
3807echo "${ECHO_T}no" >&6; }
3808fi
3809rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003810
3811
3812
3813# Check for unsupported systems
3814case $ac_sys_system/$ac_sys_release in
3815atheos*|Linux*/1*)
3816 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3817 echo See README for details.
3818 exit 1;;
3819esac
3820
3821
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003822{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3823echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003824
3825# Check whether --with-suffix was given.
3826if test "${with_suffix+set}" = set; then
3827 withval=$with_suffix;
3828 case $withval in
3829 no) EXEEXT=;;
3830 yes) EXEEXT=.exe;;
3831 *) EXEEXT=$withval;;
3832 esac
3833fi
3834
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003835{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3836echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003837
3838# Test whether we're running on a non-case-sensitive system, in which
3839# case we give a warning if no ext is given
3840
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003841{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3842echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003843if test ! -d CaseSensitiveTestDir; then
3844mkdir CaseSensitiveTestDir
3845fi
3846
3847if test -d casesensitivetestdir
3848then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003849 { echo "$as_me:$LINENO: result: yes" >&5
3850echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003851 BUILDEXEEXT=.exe
3852else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003853 { echo "$as_me:$LINENO: result: no" >&5
3854echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003855 BUILDEXEEXT=$EXEEXT
3856fi
3857rmdir CaseSensitiveTestDir
3858
3859case $MACHDEP in
3860bsdos*)
3861 case $CC in
3862 gcc) CC="$CC -D_HAVE_BSDI";;
3863 esac;;
3864esac
3865
3866case $ac_sys_system in
3867hp*|HP*)
3868 case $CC in
3869 cc|*/cc) CC="$CC -Ae";;
3870 esac;;
3871Monterey*)
3872 case $CC in
3873 cc) CC="$CC -Wl,-Bexport";;
3874 esac;;
3875SunOS*)
3876 # Some functions have a prototype only with that define, e.g. confstr
3877
3878cat >>confdefs.h <<\_ACEOF
3879#define __EXTENSIONS__ 1
3880_ACEOF
3881
3882 ;;
3883esac
3884
3885
3886
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003887{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3888echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003889if test -z "$LIBRARY"
3890then
3891 LIBRARY='libpython$(VERSION).a'
3892fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003893{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3894echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003895
3896# LDLIBRARY is the name of the library to link against (as opposed to the
3897# name of the library into which to insert object files). BLDLIBRARY is also
3898# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3899# is blank as the main program is not linked directly against LDLIBRARY.
3900# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3901# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3902# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3903# DLLLIBRARY is the shared (i.e., DLL) library.
3904#
3905# RUNSHARED is used to run shared python without installed libraries
3906#
3907# INSTSONAME is the name of the shared library that will be use to install
3908# on the system - some systems like version suffix, others don't
3909
3910
3911
3912
3913
3914
3915LDLIBRARY="$LIBRARY"
3916BLDLIBRARY='$(LDLIBRARY)'
3917INSTSONAME='$(LDLIBRARY)'
3918DLLLIBRARY=''
3919LDLIBRARYDIR=''
3920RUNSHARED=''
3921
3922# LINKCC is the command that links the python executable -- default is $(CC).
3923# If CXX is set, and if it is needed to link a main function that was
3924# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3925# python might then depend on the C++ runtime
3926# This is altered for AIX in order to build the export list before
3927# linking.
3928
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003929{ echo "$as_me:$LINENO: checking LINKCC" >&5
3930echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003931if test -z "$LINKCC"
3932then
3933 LINKCC='$(PURIFY) $(MAINCC)'
3934 case $ac_sys_system in
3935 AIX*)
3936 exp_extra="\"\""
3937 if test $ac_sys_release -ge 5 -o \
3938 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3939 exp_extra="."
3940 fi
3941 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
3942 Monterey64*)
3943 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
3944 QNX*)
3945 # qcc must be used because the other compilers do not
3946 # support -N.
3947 LINKCC=qcc;;
3948 esac
3949fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003950{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3951echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003952
3953# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3954# make sure we default having it set to "no": this is used by
3955# distutils.unixccompiler to know if it should add --enable-new-dtags
3956# to linker command lines, and failing to detect GNU ld simply results
3957# in the same bahaviour as before.
3958
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003959{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3960echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003961ac_prog=ld
3962if test "$GCC" = yes; then
3963 ac_prog=`$CC -print-prog-name=ld`
3964fi
3965case `"$ac_prog" -V 2>&1 < /dev/null` in
3966 *GNU*)
3967 GNULD=yes;;
3968 *)
3969 GNULD=no;;
3970esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003971{ echo "$as_me:$LINENO: result: $GNULD" >&5
3972echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003973
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003974{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3975echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003976# Check whether --enable-shared was given.
3977if test "${enable_shared+set}" = set; then
3978 enableval=$enable_shared;
3979fi
3980
3981
3982if test -z "$enable_shared"
3983then
3984 case $ac_sys_system in
3985 CYGWIN* | atheos*)
3986 enable_shared="yes";;
3987 *)
3988 enable_shared="no";;
3989 esac
3990fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003991{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3992echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003993
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003994{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3995echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003996# Check whether --enable-profiling was given.
3997if test "${enable_profiling+set}" = set; then
3998 enableval=$enable_profiling; ac_save_cc="$CC"
3999 CC="$CC -pg"
4000 if test "$cross_compiling" = yes; then
4001 ac_enable_profiling="no"
4002else
4003 cat >conftest.$ac_ext <<_ACEOF
4004/* confdefs.h. */
4005_ACEOF
4006cat confdefs.h >>conftest.$ac_ext
4007cat >>conftest.$ac_ext <<_ACEOF
4008/* end confdefs.h. */
4009int main() { return 0; }
4010_ACEOF
4011rm -f conftest$ac_exeext
4012if { (ac_try="$ac_link"
4013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004018 (eval "$ac_link") 2>&5
4019 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4022 { (case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004027 (eval "$ac_try") 2>&5
4028 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004030 (exit $ac_status); }; }; then
4031 ac_enable_profiling="yes"
4032else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004033 echo "$as_me: program exited with status $ac_status" >&5
4034echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004035sed 's/^/| /' conftest.$ac_ext >&5
4036
4037( exit $ac_status )
4038ac_enable_profiling="no"
4039fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4041fi
4042
4043
4044 CC="$ac_save_cc"
4045fi
4046
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004047{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4048echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004049
4050case "$ac_enable_profiling" in
4051 "yes")
4052 BASECFLAGS="-pg $BASECFLAGS"
4053 LDFLAGS="-pg $LDFLAGS"
4054 ;;
4055esac
4056
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004057{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4058echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004059
4060# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4061# library that we build, but we do not want to link against it (we
4062# will find it with a -framework option). For this reason there is an
4063# extra variable BLDLIBRARY against which Python and the extension
4064# modules are linked, BLDLIBRARY. This is normally the same as
4065# LDLIBRARY, but empty for MacOSX framework builds.
4066if test "$enable_framework"
4067then
4068 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4069 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4070 BLDLIBRARY=''
4071else
4072 BLDLIBRARY='$(LDLIBRARY)'
4073fi
4074
4075# Other platforms follow
4076if test $enable_shared = "yes"; then
4077
4078cat >>confdefs.h <<\_ACEOF
4079#define Py_ENABLE_SHARED 1
4080_ACEOF
4081
4082 case $ac_sys_system in
4083 CYGWIN*)
4084 LDLIBRARY='libpython$(VERSION).dll.a'
4085 DLLLIBRARY='libpython$(VERSION).dll'
4086 ;;
4087 SunOS*)
4088 LDLIBRARY='libpython$(VERSION).so'
4089 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4090 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4091 INSTSONAME="$LDLIBRARY".$SOVERSION
4092 ;;
4093 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4094 LDLIBRARY='libpython$(VERSION).so'
4095 BLDLIBRARY='-L. -lpython$(VERSION)'
4096 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4097 case $ac_sys_system in
4098 FreeBSD*)
4099 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4100 ;;
4101 esac
4102 INSTSONAME="$LDLIBRARY".$SOVERSION
4103 ;;
4104 hp*|HP*)
4105 case `uname -m` in
4106 ia64)
4107 LDLIBRARY='libpython$(VERSION).so'
4108 ;;
4109 *)
4110 LDLIBRARY='libpython$(VERSION).sl'
4111 ;;
4112 esac
4113 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4114 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4115 ;;
4116 OSF*)
4117 LDLIBRARY='libpython$(VERSION).so'
4118 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4119 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4120 ;;
4121 atheos*)
4122 LDLIBRARY='libpython$(VERSION).so'
4123 BLDLIBRARY='-L. -lpython$(VERSION)'
4124 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4125 ;;
4126 Darwin*)
4127 LDLIBRARY='libpython$(VERSION).dylib'
4128 BLDLIBRARY='-L. -lpython$(VERSION)'
4129 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4130 ;;
4131
4132 esac
4133else # shared is disabled
4134 case $ac_sys_system in
4135 CYGWIN*)
4136 BLDLIBRARY='$(LIBRARY)'
4137 LDLIBRARY='libpython$(VERSION).dll.a'
4138 ;;
4139 esac
4140fi
4141
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004142{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4143echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004144
4145if test -n "$ac_tool_prefix"; then
4146 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4147set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004148{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4149echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004150if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004151 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004152else
4153 if test -n "$RANLIB"; then
4154 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4155else
4156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157for as_dir in $PATH
4158do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
4162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004164 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004165 break 2
4166 fi
4167done
4168done
4169IFS=$as_save_IFS
4170
4171fi
4172fi
4173RANLIB=$ac_cv_prog_RANLIB
4174if test -n "$RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004175 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4176echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004177else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004178 { echo "$as_me:$LINENO: result: no" >&5
4179echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004180fi
4181
4182
4183fi
4184if test -z "$ac_cv_prog_RANLIB"; then
4185 ac_ct_RANLIB=$RANLIB
4186 # Extract the first word of "ranlib", so it can be a program name with args.
4187set dummy ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004190if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004191 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004192else
4193 if test -n "$ac_ct_RANLIB"; then
4194 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4195else
4196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4197for as_dir in $PATH
4198do
4199 IFS=$as_save_IFS
4200 test -z "$as_dir" && as_dir=.
4201 for ac_exec_ext in '' $ac_executable_extensions; do
4202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4203 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004204 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004205 break 2
4206 fi
4207done
4208done
4209IFS=$as_save_IFS
4210
4211fi
4212fi
4213ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4214if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004215 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4216echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004217else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004218 { echo "$as_me:$LINENO: result: no" >&5
4219echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004220fi
4221
4222 if test "x$ac_ct_RANLIB" = x; then
4223 RANLIB=":"
4224 else
4225 case $cross_compiling:$ac_tool_warned in
4226yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004227{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4228whose name does not start with the host triplet. If you think this
4229configuration is useful to you, please write to autoconf@gnu.org." >&5
4230echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4231whose name does not start with the host triplet. If you think this
4232configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004233ac_tool_warned=yes ;;
4234esac
4235 RANLIB=$ac_ct_RANLIB
4236 fi
4237else
4238 RANLIB="$ac_cv_prog_RANLIB"
4239fi
4240
4241
4242for ac_prog in ar aal
4243do
4244 # Extract the first word of "$ac_prog", so it can be a program name with args.
4245set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004248if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004249 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004250else
4251 if test -n "$AR"; then
4252 ac_cv_prog_AR="$AR" # Let the user override the test.
4253else
4254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4255for as_dir in $PATH
4256do
4257 IFS=$as_save_IFS
4258 test -z "$as_dir" && as_dir=.
4259 for ac_exec_ext in '' $ac_executable_extensions; do
4260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4261 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004263 break 2
4264 fi
4265done
4266done
4267IFS=$as_save_IFS
4268
4269fi
4270fi
4271AR=$ac_cv_prog_AR
4272if test -n "$AR"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004273 { echo "$as_me:$LINENO: result: $AR" >&5
4274echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004275else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004276 { echo "$as_me:$LINENO: result: no" >&5
4277echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004278fi
4279
4280
4281 test -n "$AR" && break
4282done
4283test -n "$AR" || AR="ar"
4284
4285
4286# tweak ARFLAGS only if the user didn't set it on the command line
4287
4288if test -z "$ARFLAGS"
4289then
4290 ARFLAGS="rc"
4291fi
4292
4293
4294# Extract the first word of "svnversion", so it can be a program name with args.
4295set dummy svnversion; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004298if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004299 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004300else
4301 if test -n "$SVNVERSION"; then
4302 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4303else
4304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307 IFS=$as_save_IFS
4308 test -z "$as_dir" && as_dir=.
4309 for ac_exec_ext in '' $ac_executable_extensions; do
4310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004313 break 2
4314 fi
4315done
4316done
4317IFS=$as_save_IFS
4318
4319 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4320fi
4321fi
4322SVNVERSION=$ac_cv_prog_SVNVERSION
4323if test -n "$SVNVERSION"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004324 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4325echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004326else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004327 { echo "$as_me:$LINENO: result: no" >&5
4328echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004329fi
4330
4331
4332if test $SVNVERSION = found
4333then
4334 SVNVERSION="svnversion \$(srcdir)"
4335else
4336 SVNVERSION="echo Unversioned directory"
4337fi
4338
4339case $MACHDEP in
4340bsdos*|hp*|HP*)
4341 # install -d does not work on BSDI or HP-UX
4342 if test -z "$INSTALL"
4343 then
4344 INSTALL="${srcdir}/install-sh -c"
4345 fi
4346esac
4347ac_aux_dir=
4348for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4349 if test -f "$ac_dir/install-sh"; then
4350 ac_aux_dir=$ac_dir
4351 ac_install_sh="$ac_aux_dir/install-sh -c"
4352 break
4353 elif test -f "$ac_dir/install.sh"; then
4354 ac_aux_dir=$ac_dir
4355 ac_install_sh="$ac_aux_dir/install.sh -c"
4356 break
4357 elif test -f "$ac_dir/shtool"; then
4358 ac_aux_dir=$ac_dir
4359 ac_install_sh="$ac_aux_dir/shtool install -c"
4360 break
4361 fi
4362done
4363if test -z "$ac_aux_dir"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004364 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4365echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004366 { (exit 1); exit 1; }; }
4367fi
4368
4369# These three variables are undocumented and unsupported,
4370# and are intended to be withdrawn in a future Autoconf release.
4371# They can cause serious problems if a builder's source tree is in a directory
4372# whose full name contains unusual characters.
4373ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4374ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4375ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4376
4377
4378# Find a good install program. We prefer a C program (faster),
4379# so one script is as good as another. But avoid the broken or
4380# incompatible versions:
4381# SysV /etc/install, /usr/sbin/install
4382# SunOS /usr/etc/install
4383# IRIX /sbin/install
4384# AIX /bin/install
4385# AmigaOS /C/install, which installs bootblocks on floppy discs
4386# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4387# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4388# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4389# OS/2's system install, which has a completely different semantic
4390# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004391{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4392echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004393if test -z "$INSTALL"; then
4394if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004395 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004396else
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in $PATH
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
4402 # Account for people who put trailing slashes in PATH elements.
4403case $as_dir/ in
4404 ./ | .// | /cC/* | \
4405 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4406 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4407 /usr/ucb/* ) ;;
4408 *)
4409 # OSF1 and SCO ODT 3.0 have their own names for install.
4410 # Don't use installbsd from OSF since it installs stuff as root
4411 # by default.
4412 for ac_prog in ginstall scoinst install; do
4413 for ac_exec_ext in '' $ac_executable_extensions; do
4414 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4415 if test $ac_prog = install &&
4416 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4417 # AIX install. It has an incompatible calling convention.
4418 :
4419 elif test $ac_prog = install &&
4420 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4421 # program-specific install script used by HP pwplus--don't use.
4422 :
4423 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004424 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4425 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004426 fi
4427 fi
4428 done
4429 done
4430 ;;
4431esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004432done
4433IFS=$as_save_IFS
4434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004435
4436fi
4437 if test "${ac_cv_path_install+set}" = set; then
4438 INSTALL=$ac_cv_path_install
4439 else
4440 # As a last resort, use the slow shell script. Don't cache a
4441 # value for INSTALL within a source directory, because that will
4442 # break other packages using the cache if that directory is
4443 # removed, or if the value is a relative name.
4444 INSTALL=$ac_install_sh
4445 fi
4446fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004447{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4448echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004449
4450# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4451# It thinks the first close brace ends the variable substitution.
4452test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4453
4454test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4455
4456test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4457
4458
4459# Not every filesystem supports hard links
4460
4461if test -z "$LN" ; then
4462 case $ac_sys_system in
4463 CYGWIN*) LN="ln -s";;
4464 atheos*) LN="ln -s";;
4465 *) LN=ln;;
4466 esac
4467fi
4468
4469# Check for --with-pydebug
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004470{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4471echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004472
4473# Check whether --with-pydebug was given.
4474if test "${with_pydebug+set}" = set; then
4475 withval=$with_pydebug;
4476if test "$withval" != no
4477then
4478
4479cat >>confdefs.h <<\_ACEOF
4480#define Py_DEBUG 1
4481_ACEOF
4482
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004483 { echo "$as_me:$LINENO: result: yes" >&5
4484echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004485 Py_DEBUG='true'
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004486else { echo "$as_me:$LINENO: result: no" >&5
4487echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004488fi
4489else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004490 { echo "$as_me:$LINENO: result: no" >&5
4491echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004492fi
4493
4494
4495# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4496# merged with this chunk of code?
4497
4498# Optimizer/debugger flags
4499# ------------------------
4500# (The following bit of code is complicated enough - please keep things
4501# indented properly. Just pretend you're editing Python code. ;-)
4502
4503# There are two parallel sets of case statements below, one that checks to
4504# see if OPT was set and one that does BASECFLAGS setting based upon
4505# compiler and platform. BASECFLAGS tweaks need to be made even if the
4506# user set OPT.
4507
4508# tweak OPT based on compiler and platform, only if the user didn't set
4509# it on the command line
4510
4511if test -z "$OPT"
4512then
4513 case $GCC in
4514 yes)
4515 if test "$CC" != 'g++' ; then
4516 STRICT_PROTO="-Wstrict-prototypes"
4517 fi
4518 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4519 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4520 WRAP="-fwrapv"
4521 fi
4522 case $ac_cv_prog_cc_g in
4523 yes)
4524 if test "$Py_DEBUG" = 'true' ; then
4525 # Optimization messes up debuggers, so turn it off for
4526 # debug builds.
4527 OPT="-g -Wall $STRICT_PROTO"
4528 else
4529 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4530 fi
4531 ;;
4532 *)
4533 OPT="-O3 -Wall $STRICT_PROTO"
4534 ;;
4535 esac
4536 case $ac_sys_system in
4537 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4538 ;;
4539 esac
4540 ;;
4541
4542 *)
4543 OPT="-O"
4544 ;;
4545 esac
4546
4547 # The current (beta) Monterey compiler dies with optimizations
4548 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
4549 case $ac_sys_system in
4550 Monterey*)
4551 OPT=""
4552 ;;
4553 esac
4554
4555fi
4556
4557
4558
4559# The -arch flags for universal builds on OSX
4560UNIVERSAL_ARCH_FLAGS=
4561
4562
4563# tweak BASECFLAGS based on compiler and platform
4564case $GCC in
4565yes)
4566 # Python violates C99 rules, by casting between incompatible
4567 # pointer types. GCC may generate bad code as a result of that,
4568 # so use -fno-strict-aliasing if supported.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004569 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4570echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004571 ac_save_cc="$CC"
4572 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004573 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4574 echo $ECHO_N "(cached) $ECHO_C" >&6
4575else
4576 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004577 ac_cv_no_strict_aliasing_ok=no
4578else
4579 cat >conftest.$ac_ext <<_ACEOF
4580/* confdefs.h. */
4581_ACEOF
4582cat confdefs.h >>conftest.$ac_ext
4583cat >>conftest.$ac_ext <<_ACEOF
4584/* end confdefs.h. */
4585int main() { return 0; }
4586_ACEOF
4587rm -f conftest$ac_exeext
4588if { (ac_try="$ac_link"
4589case "(($ac_try" in
4590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4591 *) ac_try_echo=$ac_try;;
4592esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004594 (eval "$ac_link") 2>&5
4595 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4598 { (case "(($ac_try" in
4599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4600 *) ac_try_echo=$ac_try;;
4601esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603 (eval "$ac_try") 2>&5
4604 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004606 (exit $ac_status); }; }; then
4607 ac_cv_no_strict_aliasing_ok=yes
4608else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004609 echo "$as_me: program exited with status $ac_status" >&5
4610echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004611sed 's/^/| /' conftest.$ac_ext >&5
4612
4613( exit $ac_status )
4614ac_cv_no_strict_aliasing_ok=no
4615fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4617fi
4618
4619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004620fi
4621
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622 CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004623 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4624echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004625 if test $ac_cv_no_strict_aliasing_ok = yes
4626 then
4627 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4628 fi
4629
4630 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4631 # support. Without this, treatment of subnormals doesn't follow
4632 # the standard.
4633 case $ac_sys_machine in
4634 alpha*)
4635 BASECFLAGS="$BASECFLAGS -mieee"
4636 ;;
4637 esac
4638
4639 case $ac_sys_system in
4640 SCO_SV*)
4641 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4642 ;;
4643 # is there any other compiler on Darwin besides gcc?
4644 Darwin*)
4645 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4646 # used to be here, but non-Apple gcc doesn't accept them.
4647
4648
4649 if test "${enable_universalsdk}"; then
4650 UNIVERSAL_ARCH_FLAGS=""
4651 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4652 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4653 ARCH_RUN_32BIT=""
4654
4655 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4656 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4657
4658 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4660 ARCH_RUN_32BIT="arch -i386 -ppc"
4661
4662 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004663 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4664echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665 { (exit 1); exit 1; }; }
4666
4667 fi
4668
4669
4670 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4671 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4672 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4673 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4674 fi
4675 fi
4676
4677 # Calculate the right deployment target for this build.
4678 #
4679 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4680 if test ${cur_target} '>' 10.2; then
4681 cur_target=10.3
4682 fi
4683 if test "${UNIVERSAL_ARCHS}" = "all"; then
4684 # Ensure that the default platform for a 4-way
4685 # universal build is OSX 10.5, that's the first
4686 # OS release where 4-way builds make sense.
4687 cur_target='10.5'
4688 fi
4689 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4690
4691 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4692 # environment with a value that is the same as what we'll use
4693 # in the Makefile to ensure that we'll get the same compiler
4694 # environment during configure and build time.
4695 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4696 export MACOSX_DEPLOYMENT_TARGET
4697 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4698
4699 ;;
4700 OSF*)
4701 BASECFLAGS="$BASECFLAGS -mieee"
4702 ;;
4703 esac
4704 ;;
4705
4706*)
4707 case $ac_sys_system in
4708 OpenUNIX*|UnixWare*)
4709 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4710 ;;
4711 OSF*)
4712 BASECFLAGS="$BASECFLAGS -ieee -std"
4713 ;;
4714 SCO_SV*)
4715 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4716 ;;
4717 esac
4718 ;;
4719esac
4720
4721if test "$Py_DEBUG" = 'true'; then
4722 :
4723else
4724 OPT="-DNDEBUG $OPT"
4725fi
4726
4727if test "$ac_arch_flags"
4728then
4729 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4730fi
4731
4732# disable check for icc since it seems to pass, but generates a warning
4733if test "$CC" = icc
4734then
4735 ac_cv_opt_olimit_ok=no
4736fi
4737
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004738{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4739echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004741 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004742else
4743 ac_save_cc="$CC"
4744CC="$CC -OPT:Olimit=0"
4745if test "$cross_compiling" = yes; then
4746 ac_cv_opt_olimit_ok=no
4747else
4748 cat >conftest.$ac_ext <<_ACEOF
4749/* confdefs.h. */
4750_ACEOF
4751cat confdefs.h >>conftest.$ac_ext
4752cat >>conftest.$ac_ext <<_ACEOF
4753/* end confdefs.h. */
4754int main() { return 0; }
4755_ACEOF
4756rm -f conftest$ac_exeext
4757if { (ac_try="$ac_link"
4758case "(($ac_try" in
4759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760 *) ac_try_echo=$ac_try;;
4761esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004763 (eval "$ac_link") 2>&5
4764 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4767 { (case "(($ac_try" in
4768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4769 *) ac_try_echo=$ac_try;;
4770esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772 (eval "$ac_try") 2>&5
4773 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775 (exit $ac_status); }; }; then
4776 ac_cv_opt_olimit_ok=yes
4777else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004778 echo "$as_me: program exited with status $ac_status" >&5
4779echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780sed 's/^/| /' conftest.$ac_ext >&5
4781
4782( exit $ac_status )
4783ac_cv_opt_olimit_ok=no
4784fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4786fi
4787
4788
4789CC="$ac_save_cc"
4790fi
4791
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004792{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4793echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004794if test $ac_cv_opt_olimit_ok = yes; then
4795 case $ac_sys_system in
4796 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4797 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4798 # environment?
4799 Darwin*)
4800 ;;
4801 *)
4802 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4803 ;;
4804 esac
4805else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004806 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4807echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004808 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004809 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004810else
4811 ac_save_cc="$CC"
4812 CC="$CC -Olimit 1500"
4813 if test "$cross_compiling" = yes; then
4814 ac_cv_olimit_ok=no
4815else
4816 cat >conftest.$ac_ext <<_ACEOF
4817/* confdefs.h. */
4818_ACEOF
4819cat confdefs.h >>conftest.$ac_ext
4820cat >>conftest.$ac_ext <<_ACEOF
4821/* end confdefs.h. */
4822int main() { return 0; }
4823_ACEOF
4824rm -f conftest$ac_exeext
4825if { (ac_try="$ac_link"
4826case "(($ac_try" in
4827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4828 *) ac_try_echo=$ac_try;;
4829esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004831 (eval "$ac_link") 2>&5
4832 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4835 { (case "(($ac_try" in
4836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4837 *) ac_try_echo=$ac_try;;
4838esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840 (eval "$ac_try") 2>&5
4841 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843 (exit $ac_status); }; }; then
4844 ac_cv_olimit_ok=yes
4845else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004846 echo "$as_me: program exited with status $ac_status" >&5
4847echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848sed 's/^/| /' conftest.$ac_ext >&5
4849
4850( exit $ac_status )
4851ac_cv_olimit_ok=no
4852fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4854fi
4855
4856
4857 CC="$ac_save_cc"
4858fi
4859
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004860 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4861echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862 if test $ac_cv_olimit_ok = yes; then
4863 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4864 fi
4865fi
4866
4867# Check whether GCC supports PyArg_ParseTuple format
4868if test "$GCC" = "yes"
4869then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004870 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4871echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 save_CFLAGS=$CFLAGS
4873 CFLAGS="$CFLAGS -Werror"
4874 cat >conftest.$ac_ext <<_ACEOF
4875/* confdefs.h. */
4876_ACEOF
4877cat confdefs.h >>conftest.$ac_ext
4878cat >>conftest.$ac_ext <<_ACEOF
4879/* end confdefs.h. */
4880
4881 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4882
4883int
4884main ()
4885{
4886
4887 ;
4888 return 0;
4889}
4890_ACEOF
4891rm -f conftest.$ac_objext
4892if { (ac_try="$ac_compile"
4893case "(($ac_try" in
4894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4895 *) ac_try_echo=$ac_try;;
4896esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004898 (eval "$ac_compile") 2>conftest.er1
4899 ac_status=$?
4900 grep -v '^ *+' conftest.er1 >conftest.err
4901 rm -f conftest.er1
4902 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004904 (exit $ac_status); } && {
4905 test -z "$ac_c_werror_flag" ||
4906 test ! -s conftest.err
4907 } && test -s conftest.$ac_objext; then
4908
4909cat >>confdefs.h <<\_ACEOF
4910#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4911_ACEOF
4912
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004913 { echo "$as_me:$LINENO: result: yes" >&5
4914echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004916 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004917sed 's/^/| /' conftest.$ac_ext >&5
4918
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004919 { echo "$as_me:$LINENO: result: no" >&5
4920echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004921
4922fi
4923
4924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4925 CFLAGS=$save_CFLAGS
4926fi
4927
4928# On some compilers, pthreads are available without further options
4929# (e.g. MacOS X). On some of these systems, the compiler will not
4930# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4931# So we have to see first whether pthreads are available without
4932# options before we can check whether -Kpthread improves anything.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004933{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4934echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004935if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004936 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004937else
4938 if test "$cross_compiling" = yes; then
4939 ac_cv_pthread_is_default=no
4940else
4941 cat >conftest.$ac_ext <<_ACEOF
4942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
4947
4948#include <pthread.h>
4949
4950void* routine(void* p){return NULL;}
4951
4952int main(){
4953 pthread_t p;
4954 if(pthread_create(&p,NULL,routine,NULL)!=0)
4955 return 1;
4956 (void)pthread_detach(p);
4957 return 0;
4958}
4959
4960_ACEOF
4961rm -f conftest$ac_exeext
4962if { (ac_try="$ac_link"
4963case "(($ac_try" in
4964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4965 *) ac_try_echo=$ac_try;;
4966esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 (eval "$ac_link") 2>&5
4969 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4972 { (case "(($ac_try" in
4973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4974 *) ac_try_echo=$ac_try;;
4975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004977 (eval "$ac_try") 2>&5
4978 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004980 (exit $ac_status); }; }; then
4981
4982 ac_cv_pthread_is_default=yes
4983 ac_cv_kthread=no
4984 ac_cv_pthread=no
4985
4986else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004987 echo "$as_me: program exited with status $ac_status" >&5
4988echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989sed 's/^/| /' conftest.$ac_ext >&5
4990
4991( exit $ac_status )
4992ac_cv_pthread_is_default=no
4993fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4995fi
4996
4997
4998
4999fi
5000
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005001{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5002echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003
5004
5005if test $ac_cv_pthread_is_default = yes
5006then
5007 ac_cv_kpthread=no
5008else
5009# -Kpthread, if available, provides the right #defines
5010# and linker options to make pthread_create available
5011# Some compilers won't report that they do not support -Kpthread,
5012# so we need to run a program to see whether it really made the
5013# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005014{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5015echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005016if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005017 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005018else
5019 ac_save_cc="$CC"
5020CC="$CC -Kpthread"
5021if test "$cross_compiling" = yes; then
5022 ac_cv_kpthread=no
5023else
5024 cat >conftest.$ac_ext <<_ACEOF
5025/* confdefs.h. */
5026_ACEOF
5027cat confdefs.h >>conftest.$ac_ext
5028cat >>conftest.$ac_ext <<_ACEOF
5029/* end confdefs.h. */
5030
5031#include <pthread.h>
5032
5033void* routine(void* p){return NULL;}
5034
5035int main(){
5036 pthread_t p;
5037 if(pthread_create(&p,NULL,routine,NULL)!=0)
5038 return 1;
5039 (void)pthread_detach(p);
5040 return 0;
5041}
5042
5043_ACEOF
5044rm -f conftest$ac_exeext
5045if { (ac_try="$ac_link"
5046case "(($ac_try" in
5047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5048 *) ac_try_echo=$ac_try;;
5049esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051 (eval "$ac_link") 2>&5
5052 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005054 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5055 { (case "(($ac_try" in
5056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5057 *) ac_try_echo=$ac_try;;
5058esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060 (eval "$ac_try") 2>&5
5061 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063 (exit $ac_status); }; }; then
5064 ac_cv_kpthread=yes
5065else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005066 echo "$as_me: program exited with status $ac_status" >&5
5067echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068sed 's/^/| /' conftest.$ac_ext >&5
5069
5070( exit $ac_status )
5071ac_cv_kpthread=no
5072fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5074fi
5075
5076
5077CC="$ac_save_cc"
5078fi
5079
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005080{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5081echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005082fi
5083
5084if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5085then
5086# -Kthread, if available, provides the right #defines
5087# and linker options to make pthread_create available
5088# Some compilers won't report that they do not support -Kthread,
5089# so we need to run a program to see whether it really made the
5090# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005091{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5092echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005094 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095else
5096 ac_save_cc="$CC"
5097CC="$CC -Kthread"
5098if test "$cross_compiling" = yes; then
5099 ac_cv_kthread=no
5100else
5101 cat >conftest.$ac_ext <<_ACEOF
5102/* confdefs.h. */
5103_ACEOF
5104cat confdefs.h >>conftest.$ac_ext
5105cat >>conftest.$ac_ext <<_ACEOF
5106/* end confdefs.h. */
5107
5108#include <pthread.h>
5109
5110void* routine(void* p){return NULL;}
5111
5112int main(){
5113 pthread_t p;
5114 if(pthread_create(&p,NULL,routine,NULL)!=0)
5115 return 1;
5116 (void)pthread_detach(p);
5117 return 0;
5118}
5119
5120_ACEOF
5121rm -f conftest$ac_exeext
5122if { (ac_try="$ac_link"
5123case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005128 (eval "$ac_link") 2>&5
5129 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005131 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5132 { (case "(($ac_try" in
5133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5134 *) ac_try_echo=$ac_try;;
5135esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137 (eval "$ac_try") 2>&5
5138 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140 (exit $ac_status); }; }; then
5141 ac_cv_kthread=yes
5142else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005143 echo "$as_me: program exited with status $ac_status" >&5
5144echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145sed 's/^/| /' conftest.$ac_ext >&5
5146
5147( exit $ac_status )
5148ac_cv_kthread=no
5149fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5151fi
5152
5153
5154CC="$ac_save_cc"
5155fi
5156
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005157{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5158echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005159fi
5160
5161if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5162then
5163# -pthread, if available, provides the right #defines
5164# and linker options to make pthread_create available
5165# Some compilers won't report that they do not support -pthread,
5166# so we need to run a program to see whether it really made the
5167# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005168{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5169echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005170if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005171 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172else
5173 ac_save_cc="$CC"
5174CC="$CC -pthread"
5175if test "$cross_compiling" = yes; then
5176 ac_cv_pthread=no
5177else
5178 cat >conftest.$ac_ext <<_ACEOF
5179/* confdefs.h. */
5180_ACEOF
5181cat confdefs.h >>conftest.$ac_ext
5182cat >>conftest.$ac_ext <<_ACEOF
5183/* end confdefs.h. */
5184
5185#include <pthread.h>
5186
5187void* routine(void* p){return NULL;}
5188
5189int main(){
5190 pthread_t p;
5191 if(pthread_create(&p,NULL,routine,NULL)!=0)
5192 return 1;
5193 (void)pthread_detach(p);
5194 return 0;
5195}
5196
5197_ACEOF
5198rm -f conftest$ac_exeext
5199if { (ac_try="$ac_link"
5200case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205 (eval "$ac_link") 2>&5
5206 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5209 { (case "(($ac_try" in
5210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5211 *) ac_try_echo=$ac_try;;
5212esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005214 (eval "$ac_try") 2>&5
5215 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217 (exit $ac_status); }; }; then
5218 ac_cv_pthread=yes
5219else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005220 echo "$as_me: program exited with status $ac_status" >&5
5221echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222sed 's/^/| /' conftest.$ac_ext >&5
5223
5224( exit $ac_status )
5225ac_cv_pthread=no
5226fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5228fi
5229
5230
5231CC="$ac_save_cc"
5232fi
5233
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005234{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5235echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236fi
5237
5238# If we have set a CC compiler flag for thread support then
5239# check if it works for CXX, too.
5240ac_cv_cxx_thread=no
5241if test ! -z "$CXX"
5242then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005243{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5244echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245ac_save_cxx="$CXX"
5246
5247if test "$ac_cv_kpthread" = "yes"
5248then
5249 CXX="$CXX -Kpthread"
5250 ac_cv_cxx_thread=yes
5251elif test "$ac_cv_kthread" = "yes"
5252then
5253 CXX="$CXX -Kthread"
5254 ac_cv_cxx_thread=yes
5255elif test "$ac_cv_pthread" = "yes"
5256then
5257 CXX="$CXX -pthread"
5258 ac_cv_cxx_thread=yes
5259fi
5260
5261if test $ac_cv_cxx_thread = yes
5262then
5263 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5264 $CXX -c conftest.$ac_ext 2>&5
5265 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5266 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5267 then
5268 ac_cv_cxx_thread=yes
5269 else
5270 ac_cv_cxx_thread=no
5271 fi
5272 rm -fr conftest*
5273fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005274{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5275echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276fi
5277CXX="$ac_save_cxx"
5278
5279
5280# checks for header files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005281{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5282echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005283if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005284 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005285else
5286 cat >conftest.$ac_ext <<_ACEOF
5287/* confdefs.h. */
5288_ACEOF
5289cat confdefs.h >>conftest.$ac_ext
5290cat >>conftest.$ac_ext <<_ACEOF
5291/* end confdefs.h. */
5292#include <stdlib.h>
5293#include <stdarg.h>
5294#include <string.h>
5295#include <float.h>
5296
5297int
5298main ()
5299{
5300
5301 ;
5302 return 0;
5303}
5304_ACEOF
5305rm -f conftest.$ac_objext
5306if { (ac_try="$ac_compile"
5307case "(($ac_try" in
5308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5309 *) ac_try_echo=$ac_try;;
5310esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 (eval "$ac_compile") 2>conftest.er1
5313 ac_status=$?
5314 grep -v '^ *+' conftest.er1 >conftest.err
5315 rm -f conftest.er1
5316 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318 (exit $ac_status); } && {
5319 test -z "$ac_c_werror_flag" ||
5320 test ! -s conftest.err
5321 } && test -s conftest.$ac_objext; then
5322 ac_cv_header_stdc=yes
5323else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005324 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325sed 's/^/| /' conftest.$ac_ext >&5
5326
5327 ac_cv_header_stdc=no
5328fi
5329
5330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5331
5332if test $ac_cv_header_stdc = yes; then
5333 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5334 cat >conftest.$ac_ext <<_ACEOF
5335/* confdefs.h. */
5336_ACEOF
5337cat confdefs.h >>conftest.$ac_ext
5338cat >>conftest.$ac_ext <<_ACEOF
5339/* end confdefs.h. */
5340#include <string.h>
5341
5342_ACEOF
5343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5344 $EGREP "memchr" >/dev/null 2>&1; then
5345 :
5346else
5347 ac_cv_header_stdc=no
5348fi
5349rm -f conftest*
5350
5351fi
5352
5353if test $ac_cv_header_stdc = yes; then
5354 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5355 cat >conftest.$ac_ext <<_ACEOF
5356/* confdefs.h. */
5357_ACEOF
5358cat confdefs.h >>conftest.$ac_ext
5359cat >>conftest.$ac_ext <<_ACEOF
5360/* end confdefs.h. */
5361#include <stdlib.h>
5362
5363_ACEOF
5364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5365 $EGREP "free" >/dev/null 2>&1; then
5366 :
5367else
5368 ac_cv_header_stdc=no
5369fi
5370rm -f conftest*
5371
5372fi
5373
5374if test $ac_cv_header_stdc = yes; then
5375 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5376 if test "$cross_compiling" = yes; then
5377 :
5378else
5379 cat >conftest.$ac_ext <<_ACEOF
5380/* confdefs.h. */
5381_ACEOF
5382cat confdefs.h >>conftest.$ac_ext
5383cat >>conftest.$ac_ext <<_ACEOF
5384/* end confdefs.h. */
5385#include <ctype.h>
5386#include <stdlib.h>
5387#if ((' ' & 0x0FF) == 0x020)
5388# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5389# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5390#else
5391# define ISLOWER(c) \
5392 (('a' <= (c) && (c) <= 'i') \
5393 || ('j' <= (c) && (c) <= 'r') \
5394 || ('s' <= (c) && (c) <= 'z'))
5395# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5396#endif
5397
5398#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5399int
5400main ()
5401{
5402 int i;
5403 for (i = 0; i < 256; i++)
5404 if (XOR (islower (i), ISLOWER (i))
5405 || toupper (i) != TOUPPER (i))
5406 return 2;
5407 return 0;
5408}
5409_ACEOF
5410rm -f conftest$ac_exeext
5411if { (ac_try="$ac_link"
5412case "(($ac_try" in
5413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5414 *) ac_try_echo=$ac_try;;
5415esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 (eval "$ac_link") 2>&5
5418 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5421 { (case "(($ac_try" in
5422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5423 *) ac_try_echo=$ac_try;;
5424esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 (eval "$ac_try") 2>&5
5427 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429 (exit $ac_status); }; }; then
5430 :
5431else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005432 echo "$as_me: program exited with status $ac_status" >&5
5433echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434sed 's/^/| /' conftest.$ac_ext >&5
5435
5436( exit $ac_status )
5437ac_cv_header_stdc=no
5438fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5440fi
5441
5442
5443fi
5444fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005445{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5446echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447if test $ac_cv_header_stdc = yes; then
5448
5449cat >>confdefs.h <<\_ACEOF
5450#define STDC_HEADERS 1
5451_ACEOF
5452
5453fi
5454
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5466 inttypes.h stdint.h unistd.h
5467do
5468as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5469{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5470echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5471if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5472 echo $ECHO_N "(cached) $ECHO_C" >&6
5473else
5474 cat >conftest.$ac_ext <<_ACEOF
5475/* confdefs.h. */
5476_ACEOF
5477cat confdefs.h >>conftest.$ac_ext
5478cat >>conftest.$ac_ext <<_ACEOF
5479/* end confdefs.h. */
5480$ac_includes_default
5481
5482#include <$ac_header>
5483_ACEOF
5484rm -f conftest.$ac_objext
5485if { (ac_try="$ac_compile"
5486case "(($ac_try" in
5487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5488 *) ac_try_echo=$ac_try;;
5489esac
5490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5491 (eval "$ac_compile") 2>conftest.er1
5492 ac_status=$?
5493 grep -v '^ *+' conftest.er1 >conftest.err
5494 rm -f conftest.er1
5495 cat conftest.err >&5
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); } && {
5498 test -z "$ac_c_werror_flag" ||
5499 test ! -s conftest.err
5500 } && test -s conftest.$ac_objext; then
5501 eval "$as_ac_Header=yes"
5502else
5503 echo "$as_me: failed program was:" >&5
5504sed 's/^/| /' conftest.$ac_ext >&5
5505
5506 eval "$as_ac_Header=no"
5507fi
5508
5509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5510fi
5511ac_res=`eval echo '${'$as_ac_Header'}'`
5512 { echo "$as_me:$LINENO: result: $ac_res" >&5
5513echo "${ECHO_T}$ac_res" >&6; }
5514if test `eval echo '${'$as_ac_Header'}'` = yes; then
5515 cat >>confdefs.h <<_ACEOF
5516#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5517_ACEOF
5518
5519fi
5520
5521done
5522
5523
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
Martin v. Löwis11437992002-04-12 09:54:03 +00005525
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
5551
5552
5553
5554
5555
5556
5557
5558
5559
Anthony Baxter8a560de2004-10-13 15:30:56 +00005560
Martin v. Löwisc3001752005-01-23 09:27:24 +00005561
Martin v. Löwis11017b12006-01-14 18:12:57 +00005562
Thomas Wouters477c8d52006-05-27 19:21:47 +00005563
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005564
5565
5566
5567
5568
5569
5570
5571
Thomas Wouters89f507f2006-12-13 04:49:30 +00005572
Christian Heimes043d6f62008-01-07 17:19:16 +00005573
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005574
5575
Christian Heimesbbe741d2008-03-28 10:53:29 +00005576
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005577
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005578for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5579fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005580ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005581shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005582unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005583sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5584sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005585sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005586sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005587sys/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 +00005588sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005589bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005590do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005591as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005592if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005593 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5594echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005595if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005596 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005597fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005598ac_res=`eval echo '${'$as_ac_Header'}'`
5599 { echo "$as_me:$LINENO: result: $ac_res" >&5
5600echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601else
Martin v. Löwis11437992002-04-12 09:54:03 +00005602 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005603{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5604echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005606/* confdefs.h. */
5607_ACEOF
5608cat confdefs.h >>conftest.$ac_ext
5609cat >>conftest.$ac_ext <<_ACEOF
5610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005611$ac_includes_default
5612#include <$ac_header>
5613_ACEOF
5614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005615if { (ac_try="$ac_compile"
5616case "(($ac_try" in
5617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5618 *) ac_try_echo=$ac_try;;
5619esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005623 grep -v '^ *+' conftest.er1 >conftest.err
5624 rm -f conftest.er1
5625 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005627 (exit $ac_status); } && {
5628 test -z "$ac_c_werror_flag" ||
5629 test ! -s conftest.err
5630 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005631 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005632else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005634sed 's/^/| /' conftest.$ac_ext >&5
5635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005636 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005638
5639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005640{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5641echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005642
5643# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005644{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5645echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005647/* confdefs.h. */
5648_ACEOF
5649cat confdefs.h >>conftest.$ac_ext
5650cat >>conftest.$ac_ext <<_ACEOF
5651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005652#include <$ac_header>
5653_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005654if { (ac_try="$ac_cpp conftest.$ac_ext"
5655case "(($ac_try" in
5656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5657 *) ac_try_echo=$ac_try;;
5658esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005660 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005661 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005662 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005663 rm -f conftest.er1
5664 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005666 (exit $ac_status); } >/dev/null && {
5667 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5668 test ! -s conftest.err
5669 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_header_preproc=yes
5671else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005673sed 's/^/| /' conftest.$ac_ext >&5
5674
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005677
Martin v. Löwis11437992002-04-12 09:54:03 +00005678rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005679{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5680echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005681
5682# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005683case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5684 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005685 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5686echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5687 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5688echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005689 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005690 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005691 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005692 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5693echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5694 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5695echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5696 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5697echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5698 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5699echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5700 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5701echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5702 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5703echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005704 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005705## -------------------------------------- ##
5706## Report this to http://bugs.python.org/ ##
5707## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005708_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005709 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005710 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005711esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005712{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005715 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005716else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005717 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005719ac_res=`eval echo '${'$as_ac_Header'}'`
5720 { echo "$as_me:$LINENO: result: $ac_res" >&5
5721echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005722
5723fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005724if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005725 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005726#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005727_ACEOF
5728
5729fi
5730
Guido van Rossum627b2d71993-12-24 10:39:16 +00005731done
5732
Martin v. Löwis11437992002-04-12 09:54:03 +00005733
5734
5735
5736
5737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005738ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005739for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005740 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5741{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5742echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005743if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005745else
Martin v. Löwis11437992002-04-12 09:54:03 +00005746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005747/* confdefs.h. */
5748_ACEOF
5749cat confdefs.h >>conftest.$ac_ext
5750cat >>conftest.$ac_ext <<_ACEOF
5751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752#include <sys/types.h>
5753#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005754
Martin v. Löwis11437992002-04-12 09:54:03 +00005755int
5756main ()
5757{
5758if ((DIR *) 0)
5759return 0;
5760 ;
5761 return 0;
5762}
5763_ACEOF
5764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005765if { (ac_try="$ac_compile"
5766case "(($ac_try" in
5767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5768 *) ac_try_echo=$ac_try;;
5769esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005773 grep -v '^ *+' conftest.er1 >conftest.err
5774 rm -f conftest.er1
5775 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005777 (exit $ac_status); } && {
5778 test -z "$ac_c_werror_flag" ||
5779 test ! -s conftest.err
5780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005781 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005782else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005784sed 's/^/| /' conftest.$ac_ext >&5
5785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005786 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005788
5789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005790fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005791ac_res=`eval echo '${'$as_ac_Header'}'`
5792 { echo "$as_me:$LINENO: result: $ac_res" >&5
5793echo "${ECHO_T}$ac_res" >&6; }
5794if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005795 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005796#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005797_ACEOF
5798
5799ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802done
5803# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5804if test $ac_header_dirent = dirent.h; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005805 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5806echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005807if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005808 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809else
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005812/* confdefs.h. */
5813_ACEOF
5814cat confdefs.h >>conftest.$ac_ext
5815cat >>conftest.$ac_ext <<_ACEOF
5816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005818/* Override any GCC internal prototype to avoid an error.
5819 Use char because int might match the return type of a GCC
5820 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005821#ifdef __cplusplus
5822extern "C"
5823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005824char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005825int
5826main ()
5827{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005828return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 ;
5830 return 0;
5831}
5832_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005833for ac_lib in '' dir; do
5834 if test -z "$ac_lib"; then
5835 ac_res="none required"
5836 else
5837 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005838 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005839 fi
5840 rm -f conftest.$ac_objext conftest$ac_exeext
5841if { (ac_try="$ac_link"
5842case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005847 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005848 ac_status=$?
5849 grep -v '^ *+' conftest.er1 >conftest.err
5850 rm -f conftest.er1
5851 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005853 (exit $ac_status); } && {
5854 test -z "$ac_c_werror_flag" ||
5855 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005856 } && test -s conftest$ac_exeext &&
5857 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005859else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005860 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863
Thomas Wouters477c8d52006-05-27 19:21:47 +00005864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005865
5866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5867 conftest$ac_exeext
5868 if test "${ac_cv_search_opendir+set}" = set; then
5869 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005871done
5872if test "${ac_cv_search_opendir+set}" = set; then
5873 :
5874else
5875 ac_cv_search_opendir=no
5876fi
5877rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005878LIBS=$ac_func_search_save_LIBS
5879fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005880{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5881echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005882ac_res=$ac_cv_search_opendir
5883if test "$ac_res" != no; then
5884 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005887
Michael W. Hudson54241132001-12-07 15:38:26 +00005888else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005889 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5890echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005891if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005892 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005893else
5894 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005895cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005896/* confdefs.h. */
5897_ACEOF
5898cat confdefs.h >>conftest.$ac_ext
5899cat >>conftest.$ac_ext <<_ACEOF
5900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005902/* Override any GCC internal prototype to avoid an error.
5903 Use char because int might match the return type of a GCC
5904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005905#ifdef __cplusplus
5906extern "C"
5907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005908char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005909int
5910main ()
5911{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005912return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005913 ;
5914 return 0;
5915}
5916_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005917for ac_lib in '' x; do
5918 if test -z "$ac_lib"; then
5919 ac_res="none required"
5920 else
5921 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005922 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005923 fi
5924 rm -f conftest.$ac_objext conftest$ac_exeext
5925if { (ac_try="$ac_link"
5926case "(($ac_try" in
5927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5928 *) ac_try_echo=$ac_try;;
5929esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005931 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005932 ac_status=$?
5933 grep -v '^ *+' conftest.er1 >conftest.err
5934 rm -f conftest.er1
5935 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937 (exit $ac_status); } && {
5938 test -z "$ac_c_werror_flag" ||
5939 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005940 } && test -s conftest$ac_exeext &&
5941 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005943else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005944 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005945sed 's/^/| /' conftest.$ac_ext >&5
5946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947
Thomas Wouters477c8d52006-05-27 19:21:47 +00005948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005949
5950rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5951 conftest$ac_exeext
5952 if test "${ac_cv_search_opendir+set}" = set; then
5953 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005955done
5956if test "${ac_cv_search_opendir+set}" = set; then
5957 :
5958else
5959 ac_cv_search_opendir=no
5960fi
5961rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005962LIBS=$ac_func_search_save_LIBS
5963fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005964{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5965echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005966ac_res=$ac_cv_search_opendir
5967if test "$ac_res" != no; then
5968 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005969
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005970fi
5971
5972fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005973
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005974{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5975echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005976if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005977 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005978else
5979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005980/* confdefs.h. */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005985#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986int
5987main ()
5988{
5989return makedev(0, 0);
5990 ;
5991 return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005995if { (ac_try="$ac_link"
5996case "(($ac_try" in
5997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5998 *) ac_try_echo=$ac_try;;
5999esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006001 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006003 grep -v '^ *+' conftest.er1 >conftest.err
6004 rm -f conftest.er1
6005 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006007 (exit $ac_status); } && {
6008 test -z "$ac_c_werror_flag" ||
6009 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006010 } && test -s conftest$ac_exeext &&
6011 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012 ac_cv_header_sys_types_h_makedev=yes
6013else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006015sed 's/^/| /' conftest.$ac_ext >&5
6016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006017 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006019
6020rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006021 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022
6023fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006024{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6025echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026
6027if test $ac_cv_header_sys_types_h_makedev = no; then
6028if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006029 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6030echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006032 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006034{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6035echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036else
6037 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006038{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6039echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006041/* confdefs.h. */
6042_ACEOF
6043cat confdefs.h >>conftest.$ac_ext
6044cat >>conftest.$ac_ext <<_ACEOF
6045/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046$ac_includes_default
6047#include <sys/mkdev.h>
6048_ACEOF
6049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006050if { (ac_try="$ac_compile"
6051case "(($ac_try" in
6052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6053 *) ac_try_echo=$ac_try;;
6054esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006058 grep -v '^ *+' conftest.er1 >conftest.err
6059 rm -f conftest.er1
6060 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006062 (exit $ac_status); } && {
6063 test -z "$ac_c_werror_flag" ||
6064 test ! -s conftest.err
6065 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006066 ac_header_compiler=yes
6067else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006069sed 's/^/| /' conftest.$ac_ext >&5
6070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006071 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006073
6074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006075{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6076echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006077
6078# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006079{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6080echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006082/* confdefs.h. */
6083_ACEOF
6084cat confdefs.h >>conftest.$ac_ext
6085cat >>conftest.$ac_ext <<_ACEOF
6086/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087#include <sys/mkdev.h>
6088_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089if { (ac_try="$ac_cpp conftest.$ac_ext"
6090case "(($ac_try" in
6091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6092 *) ac_try_echo=$ac_try;;
6093esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006095 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006096 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006097 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006098 rm -f conftest.er1
6099 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006101 (exit $ac_status); } >/dev/null && {
6102 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6103 test ! -s conftest.err
6104 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_header_preproc=yes
6106else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006108sed 's/^/| /' conftest.$ac_ext >&5
6109
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110 ac_header_preproc=no
6111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006113rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006114{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6115echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006116
6117# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6119 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006120 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6121echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006125 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006126 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006127 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6128echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6129 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6130echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6131 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6132echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6133 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6134echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6135 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6136echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006140## -------------------------------------- ##
6141## Report this to http://bugs.python.org/ ##
6142## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006143_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006145 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006147{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6148echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006150 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151else
6152 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6153fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006154{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6155echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156
6157fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006158if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159
6160cat >>confdefs.h <<\_ACEOF
6161#define MAJOR_IN_MKDEV 1
6162_ACEOF
6163
6164fi
6165
6166
6167
6168 if test $ac_cv_header_sys_mkdev_h = no; then
6169 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006170 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6171echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006173 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006174fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006175{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6176echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006177else
6178 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006179{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6180echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006182/* confdefs.h. */
6183_ACEOF
6184cat confdefs.h >>conftest.$ac_ext
6185cat >>conftest.$ac_ext <<_ACEOF
6186/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187$ac_includes_default
6188#include <sys/sysmacros.h>
6189_ACEOF
6190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006191if { (ac_try="$ac_compile"
6192case "(($ac_try" in
6193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6194 *) ac_try_echo=$ac_try;;
6195esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006199 grep -v '^ *+' conftest.er1 >conftest.err
6200 rm -f conftest.er1
6201 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 (exit $ac_status); } && {
6204 test -z "$ac_c_werror_flag" ||
6205 test ! -s conftest.err
6206 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 ac_header_compiler=yes
6208else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006209 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006210sed 's/^/| /' conftest.$ac_ext >&5
6211
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214
6215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006216{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6217echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006218
6219# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006220{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6221echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006223/* confdefs.h. */
6224_ACEOF
6225cat confdefs.h >>conftest.$ac_ext
6226cat >>conftest.$ac_ext <<_ACEOF
6227/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228#include <sys/sysmacros.h>
6229_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006230if { (ac_try="$ac_cpp conftest.$ac_ext"
6231case "(($ac_try" in
6232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6233 *) ac_try_echo=$ac_try;;
6234esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006236 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006238 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006239 rm -f conftest.er1
6240 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006242 (exit $ac_status); } >/dev/null && {
6243 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6244 test ! -s conftest.err
6245 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_header_preproc=yes
6247else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006249sed 's/^/| /' conftest.$ac_ext >&5
6250
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251 ac_header_preproc=no
6252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006253
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006254rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006255{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6256echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006257
6258# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6260 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006261 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6262echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006265 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006266 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006267 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006268 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6269echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6270 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6271echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6272 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6273echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6274 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6275echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6276 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6277echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006280 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006281## -------------------------------------- ##
6282## Report this to http://bugs.python.org/ ##
6283## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006284_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006285 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006286 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006288{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6289echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006291 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292else
6293 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6294fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006295{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6296echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297
6298fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006299if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300
6301cat >>confdefs.h <<\_ACEOF
6302#define MAJOR_IN_SYSMACROS 1
6303_ACEOF
6304
6305fi
6306
6307
6308 fi
6309fi
6310
Michael W. Hudson54241132001-12-07 15:38:26 +00006311
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006312# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006313
6314for ac_header in term.h
6315do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006316as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006320 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006321else
6322 cat >conftest.$ac_ext <<_ACEOF
6323/* confdefs.h. */
6324_ACEOF
6325cat confdefs.h >>conftest.$ac_ext
6326cat >>conftest.$ac_ext <<_ACEOF
6327/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006328
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006329#ifdef HAVE_CURSES_H
6330#include <curses.h>
6331#endif
6332
6333
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006334#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006335_ACEOF
6336rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006337if { (ac_try="$ac_compile"
6338case "(($ac_try" in
6339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6340 *) ac_try_echo=$ac_try;;
6341esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006343 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006344 ac_status=$?
6345 grep -v '^ *+' conftest.er1 >conftest.err
6346 rm -f conftest.er1
6347 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006349 (exit $ac_status); } && {
6350 test -z "$ac_c_werror_flag" ||
6351 test ! -s conftest.err
6352 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006353 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006355 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006356sed 's/^/| /' conftest.$ac_ext >&5
6357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006358 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006360
6361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006363ac_res=`eval echo '${'$as_ac_Header'}'`
6364 { echo "$as_me:$LINENO: result: $ac_res" >&5
6365echo "${ECHO_T}$ac_res" >&6; }
6366if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006367 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006368#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006369_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006370
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006371fi
6372
6373done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374
6375
Martin v. Löwis11017b12006-01-14 18:12:57 +00006376# On Linux, netlink.h requires asm/types.h
6377
6378for ac_header in linux/netlink.h
6379do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6381{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006385else
6386 cat >conftest.$ac_ext <<_ACEOF
6387/* confdefs.h. */
6388_ACEOF
6389cat confdefs.h >>conftest.$ac_ext
6390cat >>conftest.$ac_ext <<_ACEOF
6391/* end confdefs.h. */
6392
6393#ifdef HAVE_ASM_TYPES_H
6394#include <asm/types.h>
6395#endif
6396#ifdef HAVE_SYS_SOCKET_H
6397#include <sys/socket.h>
6398#endif
6399
6400
6401#include <$ac_header>
6402_ACEOF
6403rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006404if { (ac_try="$ac_compile"
6405case "(($ac_try" in
6406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6407 *) ac_try_echo=$ac_try;;
6408esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006410 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006411 ac_status=$?
6412 grep -v '^ *+' conftest.er1 >conftest.err
6413 rm -f conftest.er1
6414 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006416 (exit $ac_status); } && {
6417 test -z "$ac_c_werror_flag" ||
6418 test ! -s conftest.err
6419 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006420 eval "$as_ac_Header=yes"
6421else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006422 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006423sed 's/^/| /' conftest.$ac_ext >&5
6424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006425 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006427
6428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006430ac_res=`eval echo '${'$as_ac_Header'}'`
6431 { echo "$as_me:$LINENO: result: $ac_res" >&5
6432echo "${ECHO_T}$ac_res" >&6; }
6433if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006434 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006435#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436_ACEOF
6437
6438fi
6439
6440done
6441
6442
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006444was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006445{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6446echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006448/* confdefs.h. */
6449_ACEOF
6450cat confdefs.h >>conftest.$ac_ext
6451cat >>conftest.$ac_ext <<_ACEOF
6452/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006454
6455_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006457 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006458 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459else
Martin v. Löwis11437992002-04-12 09:54:03 +00006460
6461
6462cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006464_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006465
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006466
Guido van Rossum627b2d71993-12-24 10:39:16 +00006467fi
6468rm -f conftest*
6469
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006470{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6471echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006472
Neal Norwitz11690112002-07-30 01:08:28 +00006473# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006474{ echo "$as_me:$LINENO: checking for makedev" >&5
6475echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006477/* confdefs.h. */
6478_ACEOF
6479cat confdefs.h >>conftest.$ac_ext
6480cat >>conftest.$ac_ext <<_ACEOF
6481/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006482#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006483int
6484main ()
6485{
6486 makedev(0, 0)
6487 ;
6488 return 0;
6489}
6490_ACEOF
6491rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006492if { (ac_try="$ac_link"
6493case "(($ac_try" in
6494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6495 *) ac_try_echo=$ac_try;;
6496esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006498 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006500 grep -v '^ *+' conftest.er1 >conftest.err
6501 rm -f conftest.er1
6502 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006504 (exit $ac_status); } && {
6505 test -z "$ac_c_werror_flag" ||
6506 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006507 } && test -s conftest$ac_exeext &&
6508 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006509 ac_cv_has_makedev=yes
6510else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006512sed 's/^/| /' conftest.$ac_ext >&5
6513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006514 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006516
6517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006518 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006519if test "$ac_cv_has_makedev" = "no"; then
6520 # we didn't link, try if _OSF_SOURCE will allow us to link
6521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006522/* confdefs.h. */
6523_ACEOF
6524cat confdefs.h >>conftest.$ac_ext
6525cat >>conftest.$ac_ext <<_ACEOF
6526/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006527
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006528#define _OSF_SOURCE 1
6529#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006530
Neal Norwitz11690112002-07-30 01:08:28 +00006531int
6532main ()
6533{
6534 makedev(0, 0)
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540if { (ac_try="$ac_link"
6541case "(($ac_try" in
6542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6543 *) ac_try_echo=$ac_try;;
6544esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006546 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552 (exit $ac_status); } && {
6553 test -z "$ac_c_werror_flag" ||
6554 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006555 } && test -s conftest$ac_exeext &&
6556 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006557 ac_cv_has_makedev=yes
6558else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006560sed 's/^/| /' conftest.$ac_ext >&5
6561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564
6565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006567 if test "$ac_cv_has_makedev" = "yes"; then
6568
6569cat >>confdefs.h <<\_ACEOF
6570#define _OSF_SOURCE 1
6571_ACEOF
6572
6573 fi
6574fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006575{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6576echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006577if test "$ac_cv_has_makedev" = "yes"; then
6578
6579cat >>confdefs.h <<\_ACEOF
6580#define HAVE_MAKEDEV 1
6581_ACEOF
6582
6583fi
6584
Martin v. Löwis399a6892002-10-04 10:22:02 +00006585# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6586# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6587# defined, but the compiler does not support pragma redefine_extname,
6588# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6589# structures (such as rlimit64) without declaring them. As a
6590# work-around, disable LFS on such configurations
6591
6592use_lfs=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006593{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6594echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006596/* confdefs.h. */
6597_ACEOF
6598cat confdefs.h >>conftest.$ac_ext
6599cat >>conftest.$ac_ext <<_ACEOF
6600/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006601
6602#define _LARGEFILE_SOURCE 1
6603#define _FILE_OFFSET_BITS 64
6604#include <sys/resource.h>
6605
Martin v. Löwis399a6892002-10-04 10:22:02 +00006606int
6607main ()
6608{
6609struct rlimit foo;
6610 ;
6611 return 0;
6612}
6613_ACEOF
6614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006615if { (ac_try="$ac_compile"
6616case "(($ac_try" in
6617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6618 *) ac_try_echo=$ac_try;;
6619esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006622 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006623 grep -v '^ *+' conftest.er1 >conftest.err
6624 rm -f conftest.er1
6625 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627 (exit $ac_status); } && {
6628 test -z "$ac_c_werror_flag" ||
6629 test ! -s conftest.err
6630 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006631 sol_lfs_bug=no
6632else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006634sed 's/^/| /' conftest.$ac_ext >&5
6635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006636 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006638
6639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006640{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6641echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006642if test "$sol_lfs_bug" = "yes"; then
6643 use_lfs=no
6644fi
6645
6646if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006647# Two defines needed to enable largefile support on various platforms
6648# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006649
Martin v. Löwis11437992002-04-12 09:54:03 +00006650cat >>confdefs.h <<\_ACEOF
6651#define _LARGEFILE_SOURCE 1
6652_ACEOF
6653
6654
6655cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006656#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006657_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006658
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006660
Guido van Rossum84e7b241996-08-19 21:59:00 +00006661# Add some code to confdefs.h so that the test for off_t works on SCO
6662cat >> confdefs.h <<\EOF
6663#if defined(SCO_DS)
6664#undef _OFF_T
6665#endif
6666EOF
6667
Guido van Rossumef2255b2000-03-10 22:30:29 +00006668# Type availability checks
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006669{ echo "$as_me:$LINENO: checking for mode_t" >&5
6670echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006671if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006672 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674 cat >conftest.$ac_ext <<_ACEOF
6675/* confdefs.h. */
6676_ACEOF
6677cat confdefs.h >>conftest.$ac_ext
6678cat >>conftest.$ac_ext <<_ACEOF
6679/* end confdefs.h. */
6680$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006681typedef mode_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682int
6683main ()
6684{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006685if ((ac__type_new_ *) 0)
6686 return 0;
6687if (sizeof (ac__type_new_))
6688 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689 ;
6690 return 0;
6691}
6692_ACEOF
6693rm -f conftest.$ac_objext
6694if { (ac_try="$ac_compile"
6695case "(($ac_try" in
6696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6697 *) ac_try_echo=$ac_try;;
6698esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700 (eval "$ac_compile") 2>conftest.er1
6701 ac_status=$?
6702 grep -v '^ *+' conftest.er1 >conftest.err
6703 rm -f conftest.er1
6704 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706 (exit $ac_status); } && {
6707 test -z "$ac_c_werror_flag" ||
6708 test ! -s conftest.err
6709 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006710 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006711else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006713sed 's/^/| /' conftest.$ac_ext >&5
6714
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006715 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717
6718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006719fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006720{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6721echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6722if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006723 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006724else
Martin v. Löwis11437992002-04-12 09:54:03 +00006725
6726cat >>confdefs.h <<_ACEOF
6727#define mode_t int
6728_ACEOF
6729
6730fi
6731
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006732{ echo "$as_me:$LINENO: checking for off_t" >&5
6733echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006734if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006735 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006736else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 cat >conftest.$ac_ext <<_ACEOF
6738/* confdefs.h. */
6739_ACEOF
6740cat confdefs.h >>conftest.$ac_ext
6741cat >>conftest.$ac_ext <<_ACEOF
6742/* end confdefs.h. */
6743$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006744typedef off_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745int
6746main ()
6747{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006748if ((ac__type_new_ *) 0)
6749 return 0;
6750if (sizeof (ac__type_new_))
6751 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752 ;
6753 return 0;
6754}
6755_ACEOF
6756rm -f conftest.$ac_objext
6757if { (ac_try="$ac_compile"
6758case "(($ac_try" in
6759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6760 *) ac_try_echo=$ac_try;;
6761esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 (eval "$ac_compile") 2>conftest.er1
6764 ac_status=$?
6765 grep -v '^ *+' conftest.er1 >conftest.err
6766 rm -f conftest.er1
6767 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769 (exit $ac_status); } && {
6770 test -z "$ac_c_werror_flag" ||
6771 test ! -s conftest.err
6772 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006773 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006774else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006776sed 's/^/| /' conftest.$ac_ext >&5
6777
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006778 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006780
6781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006782fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006783{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6784echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6785if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006787else
Martin v. Löwis11437992002-04-12 09:54:03 +00006788
6789cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006791_ACEOF
6792
6793fi
6794
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006795{ echo "$as_me:$LINENO: checking for pid_t" >&5
6796echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006797if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006798 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006799else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800 cat >conftest.$ac_ext <<_ACEOF
6801/* confdefs.h. */
6802_ACEOF
6803cat confdefs.h >>conftest.$ac_ext
6804cat >>conftest.$ac_ext <<_ACEOF
6805/* end confdefs.h. */
6806$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006807typedef pid_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808int
6809main ()
6810{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006811if ((ac__type_new_ *) 0)
6812 return 0;
6813if (sizeof (ac__type_new_))
6814 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815 ;
6816 return 0;
6817}
6818_ACEOF
6819rm -f conftest.$ac_objext
6820if { (ac_try="$ac_compile"
6821case "(($ac_try" in
6822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6823 *) ac_try_echo=$ac_try;;
6824esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826 (eval "$ac_compile") 2>conftest.er1
6827 ac_status=$?
6828 grep -v '^ *+' conftest.er1 >conftest.err
6829 rm -f conftest.er1
6830 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832 (exit $ac_status); } && {
6833 test -z "$ac_c_werror_flag" ||
6834 test ! -s conftest.err
6835 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006836 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006837else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006839sed 's/^/| /' conftest.$ac_ext >&5
6840
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006841 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006843
6844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006845fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006846{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6847echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6848if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006849 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850else
Martin v. Löwis11437992002-04-12 09:54:03 +00006851
6852cat >>confdefs.h <<_ACEOF
6853#define pid_t int
6854_ACEOF
6855
6856fi
6857
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006858{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6859echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006860if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006861 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006862else
6863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006864/* confdefs.h. */
6865_ACEOF
6866cat confdefs.h >>conftest.$ac_ext
6867cat >>conftest.$ac_ext <<_ACEOF
6868/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006869#include <sys/types.h>
6870#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006871
Martin v. Löwis11437992002-04-12 09:54:03 +00006872int
6873main ()
6874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006875return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 ;
6877 return 0;
6878}
6879_ACEOF
6880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006881if { (ac_try="$ac_compile"
6882case "(($ac_try" in
6883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6884 *) ac_try_echo=$ac_try;;
6885esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006889 grep -v '^ *+' conftest.er1 >conftest.err
6890 rm -f conftest.er1
6891 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893 (exit $ac_status); } && {
6894 test -z "$ac_c_werror_flag" ||
6895 test ! -s conftest.err
6896 } && test -s conftest.$ac_objext; then
6897 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006898else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006900sed 's/^/| /' conftest.$ac_ext >&5
6901
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904
6905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006906fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006907{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6908echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006909
Martin v. Löwis11437992002-04-12 09:54:03 +00006910cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006912_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006913
Michael W. Hudson54241132001-12-07 15:38:26 +00006914
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006915{ echo "$as_me:$LINENO: checking for size_t" >&5
6916echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006917if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006919else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920 cat >conftest.$ac_ext <<_ACEOF
6921/* confdefs.h. */
6922_ACEOF
6923cat confdefs.h >>conftest.$ac_ext
6924cat >>conftest.$ac_ext <<_ACEOF
6925/* end confdefs.h. */
6926$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006927typedef size_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928int
6929main ()
6930{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006931if ((ac__type_new_ *) 0)
6932 return 0;
6933if (sizeof (ac__type_new_))
6934 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935 ;
6936 return 0;
6937}
6938_ACEOF
6939rm -f conftest.$ac_objext
6940if { (ac_try="$ac_compile"
6941case "(($ac_try" in
6942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6943 *) ac_try_echo=$ac_try;;
6944esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946 (eval "$ac_compile") 2>conftest.er1
6947 ac_status=$?
6948 grep -v '^ *+' conftest.er1 >conftest.err
6949 rm -f conftest.er1
6950 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952 (exit $ac_status); } && {
6953 test -z "$ac_c_werror_flag" ||
6954 test ! -s conftest.err
6955 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006956 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006957else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006959sed 's/^/| /' conftest.$ac_ext >&5
6960
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006961 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963
6964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006965fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006966{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6967echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6968if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970else
Martin v. Löwis11437992002-04-12 09:54:03 +00006971
6972cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006974_ACEOF
6975
6976fi
6977
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006978{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6979echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006980if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006981 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006982else
6983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006984/* confdefs.h. */
6985_ACEOF
6986cat confdefs.h >>conftest.$ac_ext
6987cat >>conftest.$ac_ext <<_ACEOF
6988/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006990
6991_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006993 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006994 ac_cv_type_uid_t=yes
6995else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006996 ac_cv_type_uid_t=no
6997fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006998rm -f conftest*
6999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007001{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7002echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007003if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004
Martin v. Löwis11437992002-04-12 09:54:03 +00007005cat >>confdefs.h <<\_ACEOF
7006#define uid_t int
7007_ACEOF
7008
7009
7010cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007011#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007012_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013
7014fi
7015
Mark Dickinsonbd792642009-03-18 20:06:12 +00007016
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007017 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7018echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007019if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007020 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007021else
7022 ac_cv_c_uint32_t=no
7023 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7024 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7025 cat >conftest.$ac_ext <<_ACEOF
7026/* confdefs.h. */
7027_ACEOF
7028cat confdefs.h >>conftest.$ac_ext
7029cat >>conftest.$ac_ext <<_ACEOF
7030/* end confdefs.h. */
7031$ac_includes_default
7032int
7033main ()
7034{
7035static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7036test_array [0] = 0
7037
7038 ;
7039 return 0;
7040}
7041_ACEOF
7042rm -f conftest.$ac_objext
7043if { (ac_try="$ac_compile"
7044case "(($ac_try" in
7045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7046 *) ac_try_echo=$ac_try;;
7047esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007049 (eval "$ac_compile") 2>conftest.er1
7050 ac_status=$?
7051 grep -v '^ *+' conftest.er1 >conftest.err
7052 rm -f conftest.er1
7053 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007055 (exit $ac_status); } && {
7056 test -z "$ac_c_werror_flag" ||
7057 test ! -s conftest.err
7058 } && test -s conftest.$ac_objext; then
7059 case $ac_type in
7060 uint32_t) ac_cv_c_uint32_t=yes ;;
7061 *) ac_cv_c_uint32_t=$ac_type ;;
7062esac
7063
7064else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007065 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007066sed 's/^/| /' conftest.$ac_ext >&5
7067
7068
7069fi
7070
7071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7072 test "$ac_cv_c_uint32_t" != no && break
7073 done
7074fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007075{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7076echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007077 case $ac_cv_c_uint32_t in #(
7078 no|yes) ;; #(
7079 *)
7080
7081cat >>confdefs.h <<\_ACEOF
7082#define _UINT32_T 1
7083_ACEOF
7084
7085
7086cat >>confdefs.h <<_ACEOF
7087#define uint32_t $ac_cv_c_uint32_t
7088_ACEOF
7089;;
7090 esac
7091
7092
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007093 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7094echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007095if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007096 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007097else
7098 ac_cv_c_uint64_t=no
7099 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7100 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7101 cat >conftest.$ac_ext <<_ACEOF
7102/* confdefs.h. */
7103_ACEOF
7104cat confdefs.h >>conftest.$ac_ext
7105cat >>conftest.$ac_ext <<_ACEOF
7106/* end confdefs.h. */
7107$ac_includes_default
7108int
7109main ()
7110{
7111static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7112test_array [0] = 0
7113
7114 ;
7115 return 0;
7116}
7117_ACEOF
7118rm -f conftest.$ac_objext
7119if { (ac_try="$ac_compile"
7120case "(($ac_try" in
7121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7122 *) ac_try_echo=$ac_try;;
7123esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007125 (eval "$ac_compile") 2>conftest.er1
7126 ac_status=$?
7127 grep -v '^ *+' conftest.er1 >conftest.err
7128 rm -f conftest.er1
7129 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007131 (exit $ac_status); } && {
7132 test -z "$ac_c_werror_flag" ||
7133 test ! -s conftest.err
7134 } && test -s conftest.$ac_objext; then
7135 case $ac_type in
7136 uint64_t) ac_cv_c_uint64_t=yes ;;
7137 *) ac_cv_c_uint64_t=$ac_type ;;
7138esac
7139
7140else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007141 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007142sed 's/^/| /' conftest.$ac_ext >&5
7143
7144
7145fi
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7148 test "$ac_cv_c_uint64_t" != no && break
7149 done
7150fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007151{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7152echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007153 case $ac_cv_c_uint64_t in #(
7154 no|yes) ;; #(
7155 *)
7156
7157cat >>confdefs.h <<\_ACEOF
7158#define _UINT64_T 1
7159_ACEOF
7160
7161
7162cat >>confdefs.h <<_ACEOF
7163#define uint64_t $ac_cv_c_uint64_t
7164_ACEOF
7165;;
7166 esac
7167
7168
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007169 { echo "$as_me:$LINENO: checking for int32_t" >&5
7170echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007171if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007172 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007173else
7174 ac_cv_c_int32_t=no
7175 for ac_type in 'int32_t' 'int' 'long int' \
7176 'long long int' 'short int' 'signed char'; do
7177 cat >conftest.$ac_ext <<_ACEOF
7178/* confdefs.h. */
7179_ACEOF
7180cat confdefs.h >>conftest.$ac_ext
7181cat >>conftest.$ac_ext <<_ACEOF
7182/* end confdefs.h. */
7183$ac_includes_default
7184int
7185main ()
7186{
7187static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7188test_array [0] = 0
7189
7190 ;
7191 return 0;
7192}
7193_ACEOF
7194rm -f conftest.$ac_objext
7195if { (ac_try="$ac_compile"
7196case "(($ac_try" in
7197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7198 *) ac_try_echo=$ac_try;;
7199esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007201 (eval "$ac_compile") 2>conftest.er1
7202 ac_status=$?
7203 grep -v '^ *+' conftest.er1 >conftest.err
7204 rm -f conftest.er1
7205 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007207 (exit $ac_status); } && {
7208 test -z "$ac_c_werror_flag" ||
7209 test ! -s conftest.err
7210 } && test -s conftest.$ac_objext; then
7211 cat >conftest.$ac_ext <<_ACEOF
7212/* confdefs.h. */
7213_ACEOF
7214cat confdefs.h >>conftest.$ac_ext
7215cat >>conftest.$ac_ext <<_ACEOF
7216/* end confdefs.h. */
7217$ac_includes_default
7218int
7219main ()
7220{
7221static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007222 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007223test_array [0] = 0
7224
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229rm -f conftest.$ac_objext
7230if { (ac_try="$ac_compile"
7231case "(($ac_try" in
7232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233 *) ac_try_echo=$ac_try;;
7234esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007236 (eval "$ac_compile") 2>conftest.er1
7237 ac_status=$?
7238 grep -v '^ *+' conftest.er1 >conftest.err
7239 rm -f conftest.er1
7240 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007242 (exit $ac_status); } && {
7243 test -z "$ac_c_werror_flag" ||
7244 test ! -s conftest.err
7245 } && test -s conftest.$ac_objext; then
7246 :
7247else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007248 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007249sed 's/^/| /' conftest.$ac_ext >&5
7250
7251 case $ac_type in
7252 int32_t) ac_cv_c_int32_t=yes ;;
7253 *) ac_cv_c_int32_t=$ac_type ;;
7254esac
7255
7256fi
7257
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007260 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007261sed 's/^/| /' conftest.$ac_ext >&5
7262
7263
7264fi
7265
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267 test "$ac_cv_c_int32_t" != no && break
7268 done
7269fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007270{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7271echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007272 case $ac_cv_c_int32_t in #(
7273 no|yes) ;; #(
7274 *)
7275
7276cat >>confdefs.h <<_ACEOF
7277#define int32_t $ac_cv_c_int32_t
7278_ACEOF
7279;;
7280 esac
7281
7282
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007283 { echo "$as_me:$LINENO: checking for int64_t" >&5
7284echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007285if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007286 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007287else
7288 ac_cv_c_int64_t=no
7289 for ac_type in 'int64_t' 'int' 'long int' \
7290 'long long int' 'short int' 'signed char'; do
7291 cat >conftest.$ac_ext <<_ACEOF
7292/* confdefs.h. */
7293_ACEOF
7294cat confdefs.h >>conftest.$ac_ext
7295cat >>conftest.$ac_ext <<_ACEOF
7296/* end confdefs.h. */
7297$ac_includes_default
7298int
7299main ()
7300{
7301static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7302test_array [0] = 0
7303
7304 ;
7305 return 0;
7306}
7307_ACEOF
7308rm -f conftest.$ac_objext
7309if { (ac_try="$ac_compile"
7310case "(($ac_try" in
7311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7312 *) ac_try_echo=$ac_try;;
7313esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007315 (eval "$ac_compile") 2>conftest.er1
7316 ac_status=$?
7317 grep -v '^ *+' conftest.er1 >conftest.err
7318 rm -f conftest.er1
7319 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007321 (exit $ac_status); } && {
7322 test -z "$ac_c_werror_flag" ||
7323 test ! -s conftest.err
7324 } && test -s conftest.$ac_objext; then
7325 cat >conftest.$ac_ext <<_ACEOF
7326/* confdefs.h. */
7327_ACEOF
7328cat confdefs.h >>conftest.$ac_ext
7329cat >>conftest.$ac_ext <<_ACEOF
7330/* end confdefs.h. */
7331$ac_includes_default
7332int
7333main ()
7334{
7335static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007336 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007337test_array [0] = 0
7338
7339 ;
7340 return 0;
7341}
7342_ACEOF
7343rm -f conftest.$ac_objext
7344if { (ac_try="$ac_compile"
7345case "(($ac_try" in
7346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7347 *) ac_try_echo=$ac_try;;
7348esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007350 (eval "$ac_compile") 2>conftest.er1
7351 ac_status=$?
7352 grep -v '^ *+' conftest.er1 >conftest.err
7353 rm -f conftest.er1
7354 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007356 (exit $ac_status); } && {
7357 test -z "$ac_c_werror_flag" ||
7358 test ! -s conftest.err
7359 } && test -s conftest.$ac_objext; then
7360 :
7361else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007362 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007363sed 's/^/| /' conftest.$ac_ext >&5
7364
7365 case $ac_type in
7366 int64_t) ac_cv_c_int64_t=yes ;;
7367 *) ac_cv_c_int64_t=$ac_type ;;
7368esac
7369
7370fi
7371
7372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7373else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007374 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007375sed 's/^/| /' conftest.$ac_ext >&5
7376
7377
7378fi
7379
7380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7381 test "$ac_cv_c_int64_t" != no && break
7382 done
7383fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007384{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7385echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007386 case $ac_cv_c_int64_t in #(
7387 no|yes) ;; #(
7388 *)
7389
7390cat >>confdefs.h <<_ACEOF
7391#define int64_t $ac_cv_c_int64_t
7392_ACEOF
7393;;
7394 esac
7395
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007396{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7397echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007398if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007400else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401 cat >conftest.$ac_ext <<_ACEOF
7402/* confdefs.h. */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h. */
7407$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007408typedef ssize_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007409int
7410main ()
7411{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007412if ((ac__type_new_ *) 0)
7413 return 0;
7414if (sizeof (ac__type_new_))
7415 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416 ;
7417 return 0;
7418}
7419_ACEOF
7420rm -f conftest.$ac_objext
7421if { (ac_try="$ac_compile"
7422case "(($ac_try" in
7423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7424 *) ac_try_echo=$ac_try;;
7425esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427 (eval "$ac_compile") 2>conftest.er1
7428 ac_status=$?
7429 grep -v '^ *+' conftest.er1 >conftest.err
7430 rm -f conftest.er1
7431 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433 (exit $ac_status); } && {
7434 test -z "$ac_c_werror_flag" ||
7435 test ! -s conftest.err
7436 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007437 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007438else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007439 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007440sed 's/^/| /' conftest.$ac_ext >&5
7441
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007442 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007444
7445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007446fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007447{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7448echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7449if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450
7451cat >>confdefs.h <<\_ACEOF
7452#define HAVE_SSIZE_T 1
7453_ACEOF
7454
7455fi
7456
Jack Jansendd19cf82001-12-06 22:36:17 +00007457
Michael W. Hudson54241132001-12-07 15:38:26 +00007458# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007459# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007460{ echo "$as_me:$LINENO: checking for int" >&5
7461echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7462if test "${ac_cv_type_int+set}" = set; then
7463 echo $ECHO_N "(cached) $ECHO_C" >&6
7464else
7465 cat >conftest.$ac_ext <<_ACEOF
7466/* confdefs.h. */
7467_ACEOF
7468cat confdefs.h >>conftest.$ac_ext
7469cat >>conftest.$ac_ext <<_ACEOF
7470/* end confdefs.h. */
7471$ac_includes_default
7472typedef int ac__type_new_;
7473int
7474main ()
7475{
7476if ((ac__type_new_ *) 0)
7477 return 0;
7478if (sizeof (ac__type_new_))
7479 return 0;
7480 ;
7481 return 0;
7482}
7483_ACEOF
7484rm -f conftest.$ac_objext
7485if { (ac_try="$ac_compile"
7486case "(($ac_try" in
7487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7488 *) ac_try_echo=$ac_try;;
7489esac
7490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7491 (eval "$ac_compile") 2>conftest.er1
7492 ac_status=$?
7493 grep -v '^ *+' conftest.er1 >conftest.err
7494 rm -f conftest.er1
7495 cat conftest.err >&5
7496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7497 (exit $ac_status); } && {
7498 test -z "$ac_c_werror_flag" ||
7499 test ! -s conftest.err
7500 } && test -s conftest.$ac_objext; then
7501 ac_cv_type_int=yes
7502else
7503 echo "$as_me: failed program was:" >&5
7504sed 's/^/| /' conftest.$ac_ext >&5
7505
7506 ac_cv_type_int=no
7507fi
7508
7509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7510fi
7511{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7512echo "${ECHO_T}$ac_cv_type_int" >&6; }
7513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007514# The cast to long int works around a bug in the HP C Compiler
7515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7517# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007518{ echo "$as_me:$LINENO: checking size of int" >&5
7519echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007520if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007522else
Martin v. Löwis11437992002-04-12 09:54:03 +00007523 if test "$cross_compiling" = yes; then
7524 # Depending upon the size, compute the lo and hi bounds.
7525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007526/* confdefs.h. */
7527_ACEOF
7528cat confdefs.h >>conftest.$ac_ext
7529cat >>conftest.$ac_ext <<_ACEOF
7530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007531$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007532 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007533int
7534main ()
7535{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007536static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007537test_array [0] = 0
7538
7539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 ac_lo=0 ac_mid=0
7561 while :; do
7562 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007568$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007569 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007570int
7571main ()
7572{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007574test_array [0] = 0
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581if { (ac_try="$ac_compile"
7582case "(($ac_try" in
7583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7584 *) ac_try_echo=$ac_try;;
7585esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007589 grep -v '^ *+' conftest.er1 >conftest.err
7590 rm -f conftest.er1
7591 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 (exit $ac_status); } && {
7594 test -z "$ac_c_werror_flag" ||
7595 test ! -s conftest.err
7596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_hi=$ac_mid; break
7598else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007600sed 's/^/| /' conftest.$ac_ext >&5
7601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602 ac_lo=`expr $ac_mid + 1`
7603 if test $ac_lo -le $ac_mid; then
7604 ac_lo= ac_hi=
7605 break
7606 fi
7607 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609
7610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 done
7612else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007613 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007614sed 's/^/| /' conftest.$ac_ext >&5
7615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007617/* confdefs.h. */
7618_ACEOF
7619cat confdefs.h >>conftest.$ac_ext
7620cat >>conftest.$ac_ext <<_ACEOF
7621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007622$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007623 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007624int
7625main ()
7626{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007628test_array [0] = 0
7629
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635if { (ac_try="$ac_compile"
7636case "(($ac_try" in
7637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7638 *) ac_try_echo=$ac_try;;
7639esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007643 grep -v '^ *+' conftest.er1 >conftest.err
7644 rm -f conftest.er1
7645 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647 (exit $ac_status); } && {
7648 test -z "$ac_c_werror_flag" ||
7649 test ! -s conftest.err
7650 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 ac_hi=-1 ac_mid=-1
7652 while :; do
7653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007654/* confdefs.h. */
7655_ACEOF
7656cat confdefs.h >>conftest.$ac_ext
7657cat >>conftest.$ac_ext <<_ACEOF
7658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007659$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007660 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007661int
7662main ()
7663{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007665test_array [0] = 0
7666
7667 ;
7668 return 0;
7669}
7670_ACEOF
7671rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672if { (ac_try="$ac_compile"
7673case "(($ac_try" in
7674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7675 *) ac_try_echo=$ac_try;;
7676esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007680 grep -v '^ *+' conftest.er1 >conftest.err
7681 rm -f conftest.er1
7682 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 (exit $ac_status); } && {
7685 test -z "$ac_c_werror_flag" ||
7686 test ! -s conftest.err
7687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007688 ac_lo=$ac_mid; break
7689else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007691sed 's/^/| /' conftest.$ac_ext >&5
7692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693 ac_hi=`expr '(' $ac_mid ')' - 1`
7694 if test $ac_mid -le $ac_hi; then
7695 ac_lo= ac_hi=
7696 break
7697 fi
7698 ac_mid=`expr 2 '*' $ac_mid`
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 +00007702 done
7703else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007705sed 's/^/| /' conftest.$ac_ext >&5
7706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007709
7710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712
7713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007714# Binary search between lo and hi bounds.
7715while test "x$ac_lo" != "x$ac_hi"; do
7716 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007718/* confdefs.h. */
7719_ACEOF
7720cat confdefs.h >>conftest.$ac_ext
7721cat >>conftest.$ac_ext <<_ACEOF
7722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007723$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007724 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007725int
7726main ()
7727{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007728static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007729test_array [0] = 0
7730
7731 ;
7732 return 0;
7733}
7734_ACEOF
7735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736if { (ac_try="$ac_compile"
7737case "(($ac_try" in
7738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739 *) ac_try_echo=$ac_try;;
7740esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007742 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007744 grep -v '^ *+' conftest.er1 >conftest.err
7745 rm -f conftest.er1
7746 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 (exit $ac_status); } && {
7749 test -z "$ac_c_werror_flag" ||
7750 test ! -s conftest.err
7751 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007752 ac_hi=$ac_mid
7753else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007755sed 's/^/| /' conftest.$ac_ext >&5
7756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007757 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759
7760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007761done
7762case $ac_lo in
7763?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007765 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007766See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007767echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007768See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007769 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770 else
7771 ac_cv_sizeof_int=0
7772 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007773esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007774else
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007776/* confdefs.h. */
7777_ACEOF
7778cat confdefs.h >>conftest.$ac_ext
7779cat >>conftest.$ac_ext <<_ACEOF
7780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007781$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007782 typedef int ac__type_sizeof_;
7783static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7784static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007785#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007786#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007787int
7788main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007789{
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
7791 FILE *f = fopen ("conftest.val", "w");
7792 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007794 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007797 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007799 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 }
7801 else
7802 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007804 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007806 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007809
7810 ;
7811 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007812}
Martin v. Löwis11437992002-04-12 09:54:03 +00007813_ACEOF
7814rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815if { (ac_try="$ac_link"
7816case "(($ac_try" in
7817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7818 *) ac_try_echo=$ac_try;;
7819esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007822 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007824 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 { (case "(($ac_try" in
7826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7827 *) ac_try_echo=$ac_try;;
7828esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007833 (exit $ac_status); }; }; then
7834 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007835else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007836 echo "$as_me: program exited with status $ac_status" >&5
7837echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007838sed 's/^/| /' conftest.$ac_ext >&5
7839
Martin v. Löwis11437992002-04-12 09:54:03 +00007840( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007842 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007843See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007844echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007845See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007846 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 else
7848 ac_cv_sizeof_int=0
7849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851rm -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 +00007852fi
7853rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007854fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007855{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7856echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857
7858
7859
Martin v. Löwis11437992002-04-12 09:54:03 +00007860cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007861#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007862_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007863
7864
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007865{ echo "$as_me:$LINENO: checking for long" >&5
7866echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7867if test "${ac_cv_type_long+set}" = set; then
7868 echo $ECHO_N "(cached) $ECHO_C" >&6
7869else
7870 cat >conftest.$ac_ext <<_ACEOF
7871/* confdefs.h. */
7872_ACEOF
7873cat confdefs.h >>conftest.$ac_ext
7874cat >>conftest.$ac_ext <<_ACEOF
7875/* end confdefs.h. */
7876$ac_includes_default
7877typedef long ac__type_new_;
7878int
7879main ()
7880{
7881if ((ac__type_new_ *) 0)
7882 return 0;
7883if (sizeof (ac__type_new_))
7884 return 0;
7885 ;
7886 return 0;
7887}
7888_ACEOF
7889rm -f conftest.$ac_objext
7890if { (ac_try="$ac_compile"
7891case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
7895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7896 (eval "$ac_compile") 2>conftest.er1
7897 ac_status=$?
7898 grep -v '^ *+' conftest.er1 >conftest.err
7899 rm -f conftest.er1
7900 cat conftest.err >&5
7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7902 (exit $ac_status); } && {
7903 test -z "$ac_c_werror_flag" ||
7904 test ! -s conftest.err
7905 } && test -s conftest.$ac_objext; then
7906 ac_cv_type_long=yes
7907else
7908 echo "$as_me: failed program was:" >&5
7909sed 's/^/| /' conftest.$ac_ext >&5
7910
7911 ac_cv_type_long=no
7912fi
7913
7914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7915fi
7916{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7917echo "${ECHO_T}$ac_cv_type_long" >&6; }
7918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919# The cast to long int works around a bug in the HP C Compiler
7920# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7921# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7922# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007923{ echo "$as_me:$LINENO: checking size of long" >&5
7924echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007925if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007926 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007927else
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 if test "$cross_compiling" = yes; then
7929 # Depending upon the size, compute the lo and hi bounds.
7930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007936$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007937 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007942test_array [0] = 0
7943
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949if { (ac_try="$ac_compile"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961 (exit $ac_status); } && {
7962 test -z "$ac_c_werror_flag" ||
7963 test ! -s conftest.err
7964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_lo=0 ac_mid=0
7966 while :; do
7967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007968/* confdefs.h. */
7969_ACEOF
7970cat confdefs.h >>conftest.$ac_ext
7971cat >>conftest.$ac_ext <<_ACEOF
7972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007973$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007974 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007975int
7976main ()
7977{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007979test_array [0] = 0
7980
7981 ;
7982 return 0;
7983}
7984_ACEOF
7985rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986if { (ac_try="$ac_compile"
7987case "(($ac_try" in
7988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7989 *) ac_try_echo=$ac_try;;
7990esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007994 grep -v '^ *+' conftest.er1 >conftest.err
7995 rm -f conftest.er1
7996 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 (exit $ac_status); } && {
7999 test -z "$ac_c_werror_flag" ||
8000 test ! -s conftest.err
8001 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ac_hi=$ac_mid; break
8003else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008005sed 's/^/| /' conftest.$ac_ext >&5
8006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 ac_lo=`expr $ac_mid + 1`
8008 if test $ac_lo -le $ac_mid; then
8009 ac_lo= ac_hi=
8010 break
8011 fi
8012 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014
8015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 done
8017else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008019sed 's/^/| /' conftest.$ac_ext >&5
8020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* confdefs.h. */
8023_ACEOF
8024cat confdefs.h >>conftest.$ac_ext
8025cat >>conftest.$ac_ext <<_ACEOF
8026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008027$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008028 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008029int
8030main ()
8031{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008032static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008033test_array [0] = 0
8034
8035 ;
8036 return 0;
8037}
8038_ACEOF
8039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040if { (ac_try="$ac_compile"
8041case "(($ac_try" in
8042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8043 *) ac_try_echo=$ac_try;;
8044esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008048 grep -v '^ *+' conftest.er1 >conftest.err
8049 rm -f conftest.er1
8050 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 (exit $ac_status); } && {
8053 test -z "$ac_c_werror_flag" ||
8054 test ! -s conftest.err
8055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_hi=-1 ac_mid=-1
8057 while :; do
8058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008059/* confdefs.h. */
8060_ACEOF
8061cat confdefs.h >>conftest.$ac_ext
8062cat >>conftest.$ac_ext <<_ACEOF
8063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008064$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008065 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008066int
8067main ()
8068{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008070test_array [0] = 0
8071
8072 ;
8073 return 0;
8074}
8075_ACEOF
8076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077if { (ac_try="$ac_compile"
8078case "(($ac_try" in
8079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8080 *) ac_try_echo=$ac_try;;
8081esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008085 grep -v '^ *+' conftest.er1 >conftest.err
8086 rm -f conftest.er1
8087 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 (exit $ac_status); } && {
8090 test -z "$ac_c_werror_flag" ||
8091 test ! -s conftest.err
8092 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 ac_lo=$ac_mid; break
8094else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008096sed 's/^/| /' conftest.$ac_ext >&5
8097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098 ac_hi=`expr '(' $ac_mid ')' - 1`
8099 if test $ac_mid -le $ac_hi; then
8100 ac_lo= ac_hi=
8101 break
8102 fi
8103 ac_mid=`expr 2 '*' $ac_mid`
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 +00008107 done
8108else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008110sed 's/^/| /' conftest.$ac_ext >&5
8111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114
8115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117
8118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008119# Binary search between lo and hi bounds.
8120while test "x$ac_lo" != "x$ac_hi"; do
8121 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008123/* confdefs.h. */
8124_ACEOF
8125cat confdefs.h >>conftest.$ac_ext
8126cat >>conftest.$ac_ext <<_ACEOF
8127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008128$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008129 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008130int
8131main ()
8132{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008134test_array [0] = 0
8135
8136 ;
8137 return 0;
8138}
8139_ACEOF
8140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008141if { (ac_try="$ac_compile"
8142case "(($ac_try" in
8143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8144 *) ac_try_echo=$ac_try;;
8145esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008149 grep -v '^ *+' conftest.er1 >conftest.err
8150 rm -f conftest.er1
8151 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008153 (exit $ac_status); } && {
8154 test -z "$ac_c_werror_flag" ||
8155 test ! -s conftest.err
8156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008157 ac_hi=$ac_mid
8158else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008160sed 's/^/| /' conftest.$ac_ext >&5
8161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164
8165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008166done
8167case $ac_lo in
8168?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008170 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008171See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008172echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008173See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008174 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008175 else
8176 ac_cv_sizeof_long=0
8177 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008178esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008179else
Martin v. Löwis11437992002-04-12 09:54:03 +00008180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008181/* confdefs.h. */
8182_ACEOF
8183cat confdefs.h >>conftest.$ac_ext
8184cat >>conftest.$ac_ext <<_ACEOF
8185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008186$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008187 typedef long ac__type_sizeof_;
8188static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8189static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008190#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008191#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008194{
Martin v. Löwis11437992002-04-12 09:54:03 +00008195
8196 FILE *f = fopen ("conftest.val", "w");
8197 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008198 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008199 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008201 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008202 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008204 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 }
8206 else
8207 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008209 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008211 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008214
8215 ;
8216 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008217}
Martin v. Löwis11437992002-04-12 09:54:03 +00008218_ACEOF
8219rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220if { (ac_try="$ac_link"
8221case "(($ac_try" in
8222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8223 *) ac_try_echo=$ac_try;;
8224esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008226 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008229 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 { (case "(($ac_try" in
8231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8232 *) ac_try_echo=$ac_try;;
8233esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008238 (exit $ac_status); }; }; then
8239 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008240else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008241 echo "$as_me: program exited with status $ac_status" >&5
8242echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008243sed 's/^/| /' conftest.$ac_ext >&5
8244
Martin v. Löwis11437992002-04-12 09:54:03 +00008245( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008247 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008248See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008249echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008250See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008251 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 else
8253 ac_cv_sizeof_long=0
8254 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256rm -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 +00008257fi
8258rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008259fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008260{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8261echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262
8263
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008267_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008268
8269
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008270{ echo "$as_me:$LINENO: checking for void *" >&5
8271echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8272if test "${ac_cv_type_void_p+set}" = set; then
8273 echo $ECHO_N "(cached) $ECHO_C" >&6
8274else
8275 cat >conftest.$ac_ext <<_ACEOF
8276/* confdefs.h. */
8277_ACEOF
8278cat confdefs.h >>conftest.$ac_ext
8279cat >>conftest.$ac_ext <<_ACEOF
8280/* end confdefs.h. */
8281$ac_includes_default
8282typedef void * ac__type_new_;
8283int
8284main ()
8285{
8286if ((ac__type_new_ *) 0)
8287 return 0;
8288if (sizeof (ac__type_new_))
8289 return 0;
8290 ;
8291 return 0;
8292}
8293_ACEOF
8294rm -f conftest.$ac_objext
8295if { (ac_try="$ac_compile"
8296case "(($ac_try" in
8297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8298 *) ac_try_echo=$ac_try;;
8299esac
8300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8301 (eval "$ac_compile") 2>conftest.er1
8302 ac_status=$?
8303 grep -v '^ *+' conftest.er1 >conftest.err
8304 rm -f conftest.er1
8305 cat conftest.err >&5
8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8307 (exit $ac_status); } && {
8308 test -z "$ac_c_werror_flag" ||
8309 test ! -s conftest.err
8310 } && test -s conftest.$ac_objext; then
8311 ac_cv_type_void_p=yes
8312else
8313 echo "$as_me: failed program was:" >&5
8314sed 's/^/| /' conftest.$ac_ext >&5
8315
8316 ac_cv_type_void_p=no
8317fi
8318
8319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8320fi
8321{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8322echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324# The cast to long int works around a bug in the HP C Compiler
8325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8327# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008328{ echo "$as_me:$LINENO: checking size of void *" >&5
8329echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008330if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008331 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008332else
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 if test "$cross_compiling" = yes; then
8334 # Depending upon the size, compute the lo and hi bounds.
8335cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* confdefs.h. */
8337_ACEOF
8338cat confdefs.h >>conftest.$ac_ext
8339cat >>conftest.$ac_ext <<_ACEOF
8340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008341$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008342 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008343int
8344main ()
8345{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008347test_array [0] = 0
8348
8349 ;
8350 return 0;
8351}
8352_ACEOF
8353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008354if { (ac_try="$ac_compile"
8355case "(($ac_try" in
8356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8357 *) ac_try_echo=$ac_try;;
8358esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008362 grep -v '^ *+' conftest.er1 >conftest.err
8363 rm -f conftest.er1
8364 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 (exit $ac_status); } && {
8367 test -z "$ac_c_werror_flag" ||
8368 test ! -s conftest.err
8369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_lo=0 ac_mid=0
8371 while :; do
8372 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008373/* confdefs.h. */
8374_ACEOF
8375cat confdefs.h >>conftest.$ac_ext
8376cat >>conftest.$ac_ext <<_ACEOF
8377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008378$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008379 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008383static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008384test_array [0] = 0
8385
8386 ;
8387 return 0;
8388}
8389_ACEOF
8390rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008391if { (ac_try="$ac_compile"
8392case "(($ac_try" in
8393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8394 *) ac_try_echo=$ac_try;;
8395esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008399 grep -v '^ *+' conftest.er1 >conftest.err
8400 rm -f conftest.er1
8401 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 (exit $ac_status); } && {
8404 test -z "$ac_c_werror_flag" ||
8405 test ! -s conftest.err
8406 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 ac_hi=$ac_mid; break
8408else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008410sed 's/^/| /' conftest.$ac_ext >&5
8411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008412 ac_lo=`expr $ac_mid + 1`
8413 if test $ac_lo -le $ac_mid; then
8414 ac_lo= ac_hi=
8415 break
8416 fi
8417 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419
8420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008421 done
8422else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008424sed 's/^/| /' conftest.$ac_ext >&5
8425
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* confdefs.h. */
8428_ACEOF
8429cat confdefs.h >>conftest.$ac_ext
8430cat >>conftest.$ac_ext <<_ACEOF
8431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008432$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008433 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008434int
8435main ()
8436{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008437static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008438test_array [0] = 0
8439
8440 ;
8441 return 0;
8442}
8443_ACEOF
8444rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445if { (ac_try="$ac_compile"
8446case "(($ac_try" in
8447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8448 *) ac_try_echo=$ac_try;;
8449esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008453 grep -v '^ *+' conftest.er1 >conftest.err
8454 rm -f conftest.er1
8455 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 (exit $ac_status); } && {
8458 test -z "$ac_c_werror_flag" ||
8459 test ! -s conftest.err
8460 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 ac_hi=-1 ac_mid=-1
8462 while :; do
8463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* confdefs.h. */
8465_ACEOF
8466cat confdefs.h >>conftest.$ac_ext
8467cat >>conftest.$ac_ext <<_ACEOF
8468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008469$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008470 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008471int
8472main ()
8473{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008475test_array [0] = 0
8476
8477 ;
8478 return 0;
8479}
8480_ACEOF
8481rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482if { (ac_try="$ac_compile"
8483case "(($ac_try" in
8484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8485 *) ac_try_echo=$ac_try;;
8486esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008490 grep -v '^ *+' conftest.er1 >conftest.err
8491 rm -f conftest.er1
8492 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 (exit $ac_status); } && {
8495 test -z "$ac_c_werror_flag" ||
8496 test ! -s conftest.err
8497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008498 ac_lo=$ac_mid; break
8499else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008501sed 's/^/| /' conftest.$ac_ext >&5
8502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 ac_hi=`expr '(' $ac_mid ')' - 1`
8504 if test $ac_mid -le $ac_hi; then
8505 ac_lo= ac_hi=
8506 break
8507 fi
8508 ac_mid=`expr 2 '*' $ac_mid`
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 +00008512 done
8513else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008514 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008515sed 's/^/| /' conftest.$ac_ext >&5
8516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008519
8520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
8523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008524# Binary search between lo and hi bounds.
8525while test "x$ac_lo" != "x$ac_hi"; do
8526 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008528/* confdefs.h. */
8529_ACEOF
8530cat confdefs.h >>conftest.$ac_ext
8531cat >>conftest.$ac_ext <<_ACEOF
8532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008533$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008534 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008535int
8536main ()
8537{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008539test_array [0] = 0
8540
8541 ;
8542 return 0;
8543}
8544_ACEOF
8545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546if { (ac_try="$ac_compile"
8547case "(($ac_try" in
8548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8549 *) ac_try_echo=$ac_try;;
8550esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008554 grep -v '^ *+' conftest.er1 >conftest.err
8555 rm -f conftest.er1
8556 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 (exit $ac_status); } && {
8559 test -z "$ac_c_werror_flag" ||
8560 test ! -s conftest.err
8561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_hi=$ac_mid
8563else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008565sed 's/^/| /' conftest.$ac_ext >&5
8566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569
8570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008571done
8572case $ac_lo in
8573?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008575 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008576See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008577echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008578See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008579 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580 else
8581 ac_cv_sizeof_void_p=0
8582 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008583esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008584else
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008586/* confdefs.h. */
8587_ACEOF
8588cat confdefs.h >>conftest.$ac_ext
8589cat >>conftest.$ac_ext <<_ACEOF
8590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008591$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008592 typedef void * ac__type_sizeof_;
8593static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8594static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008595#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008596#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008597int
8598main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008599{
Martin v. Löwis11437992002-04-12 09:54:03 +00008600
8601 FILE *f = fopen ("conftest.val", "w");
8602 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008604 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008607 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008609 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 }
8611 else
8612 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008614 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008616 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
8620 ;
8621 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008622}
Martin v. Löwis11437992002-04-12 09:54:03 +00008623_ACEOF
8624rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625if { (ac_try="$ac_link"
8626case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 { (case "(($ac_try" in
8636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8637 *) ac_try_echo=$ac_try;;
8638esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008643 (exit $ac_status); }; }; then
8644 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008645else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008646 echo "$as_me: program exited with status $ac_status" >&5
8647echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008648sed 's/^/| /' conftest.$ac_ext >&5
8649
Martin v. Löwis11437992002-04-12 09:54:03 +00008650( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008652 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008653See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008654echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008655See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008656 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_void_p=0
8659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661rm -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 +00008662fi
8663rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008664fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008665{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8666echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667
8668
8669
Martin v. Löwis11437992002-04-12 09:54:03 +00008670cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008671#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008672_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008673
8674
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008675{ echo "$as_me:$LINENO: checking for short" >&5
8676echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8677if test "${ac_cv_type_short+set}" = set; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
8679else
8680 cat >conftest.$ac_ext <<_ACEOF
8681/* confdefs.h. */
8682_ACEOF
8683cat confdefs.h >>conftest.$ac_ext
8684cat >>conftest.$ac_ext <<_ACEOF
8685/* end confdefs.h. */
8686$ac_includes_default
8687typedef short ac__type_new_;
8688int
8689main ()
8690{
8691if ((ac__type_new_ *) 0)
8692 return 0;
8693if (sizeof (ac__type_new_))
8694 return 0;
8695 ;
8696 return 0;
8697}
8698_ACEOF
8699rm -f conftest.$ac_objext
8700if { (ac_try="$ac_compile"
8701case "(($ac_try" in
8702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8703 *) ac_try_echo=$ac_try;;
8704esac
8705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8706 (eval "$ac_compile") 2>conftest.er1
8707 ac_status=$?
8708 grep -v '^ *+' conftest.er1 >conftest.err
8709 rm -f conftest.er1
8710 cat conftest.err >&5
8711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8712 (exit $ac_status); } && {
8713 test -z "$ac_c_werror_flag" ||
8714 test ! -s conftest.err
8715 } && test -s conftest.$ac_objext; then
8716 ac_cv_type_short=yes
8717else
8718 echo "$as_me: failed program was:" >&5
8719sed 's/^/| /' conftest.$ac_ext >&5
8720
8721 ac_cv_type_short=no
8722fi
8723
8724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8725fi
8726{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8727echo "${ECHO_T}$ac_cv_type_short" >&6; }
8728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729# The cast to long int works around a bug in the HP C Compiler
8730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8732# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008733{ echo "$as_me:$LINENO: checking size of short" >&5
8734echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008735if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008736 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008737else
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 if test "$cross_compiling" = yes; then
8739 # Depending upon the size, compute the lo and hi bounds.
8740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* confdefs.h. */
8742_ACEOF
8743cat confdefs.h >>conftest.$ac_ext
8744cat >>conftest.$ac_ext <<_ACEOF
8745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008746$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008747 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008748int
8749main ()
8750{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008752test_array [0] = 0
8753
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759if { (ac_try="$ac_compile"
8760case "(($ac_try" in
8761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8762 *) ac_try_echo=$ac_try;;
8763esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008767 grep -v '^ *+' conftest.er1 >conftest.err
8768 rm -f conftest.er1
8769 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 (exit $ac_status); } && {
8772 test -z "$ac_c_werror_flag" ||
8773 test ! -s conftest.err
8774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_lo=0 ac_mid=0
8776 while :; do
8777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008778/* confdefs.h. */
8779_ACEOF
8780cat confdefs.h >>conftest.$ac_ext
8781cat >>conftest.$ac_ext <<_ACEOF
8782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008783$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008784 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008789test_array [0] = 0
8790
8791 ;
8792 return 0;
8793}
8794_ACEOF
8795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796if { (ac_try="$ac_compile"
8797case "(($ac_try" in
8798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8799 *) ac_try_echo=$ac_try;;
8800esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008804 grep -v '^ *+' conftest.er1 >conftest.err
8805 rm -f conftest.er1
8806 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808 (exit $ac_status); } && {
8809 test -z "$ac_c_werror_flag" ||
8810 test ! -s conftest.err
8811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_hi=$ac_mid; break
8813else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008815sed 's/^/| /' conftest.$ac_ext >&5
8816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817 ac_lo=`expr $ac_mid + 1`
8818 if test $ac_lo -le $ac_mid; then
8819 ac_lo= ac_hi=
8820 break
8821 fi
8822 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824
8825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 done
8827else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* confdefs.h. */
8833_ACEOF
8834cat confdefs.h >>conftest.$ac_ext
8835cat >>conftest.$ac_ext <<_ACEOF
8836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008838 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008839int
8840main ()
8841{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008843test_array [0] = 0
8844
8845 ;
8846 return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850if { (ac_try="$ac_compile"
8851case "(($ac_try" in
8852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8853 *) ac_try_echo=$ac_try;;
8854esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008858 grep -v '^ *+' conftest.er1 >conftest.err
8859 rm -f conftest.er1
8860 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008862 (exit $ac_status); } && {
8863 test -z "$ac_c_werror_flag" ||
8864 test ! -s conftest.err
8865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 ac_hi=-1 ac_mid=-1
8867 while :; do
8868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008869/* confdefs.h. */
8870_ACEOF
8871cat confdefs.h >>conftest.$ac_ext
8872cat >>conftest.$ac_ext <<_ACEOF
8873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008874$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008875 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008876int
8877main ()
8878{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008879static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008880test_array [0] = 0
8881
8882 ;
8883 return 0;
8884}
8885_ACEOF
8886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887if { (ac_try="$ac_compile"
8888case "(($ac_try" in
8889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8890 *) ac_try_echo=$ac_try;;
8891esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008895 grep -v '^ *+' conftest.er1 >conftest.err
8896 rm -f conftest.er1
8897 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 (exit $ac_status); } && {
8900 test -z "$ac_c_werror_flag" ||
8901 test ! -s conftest.err
8902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_lo=$ac_mid; break
8904else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008906sed 's/^/| /' conftest.$ac_ext >&5
8907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908 ac_hi=`expr '(' $ac_mid ')' - 1`
8909 if test $ac_mid -le $ac_hi; then
8910 ac_lo= ac_hi=
8911 break
8912 fi
8913 ac_mid=`expr 2 '*' $ac_mid`
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 +00008917 done
8918else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008920sed 's/^/| /' conftest.$ac_ext >&5
8921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924
8925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927
8928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008929# Binary search between lo and hi bounds.
8930while test "x$ac_lo" != "x$ac_hi"; do
8931 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008933/* confdefs.h. */
8934_ACEOF
8935cat confdefs.h >>conftest.$ac_ext
8936cat >>conftest.$ac_ext <<_ACEOF
8937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008939 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008940int
8941main ()
8942{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008944test_array [0] = 0
8945
8946 ;
8947 return 0;
8948}
8949_ACEOF
8950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951if { (ac_try="$ac_compile"
8952case "(($ac_try" in
8953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8954 *) ac_try_echo=$ac_try;;
8955esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008959 grep -v '^ *+' conftest.er1 >conftest.err
8960 rm -f conftest.er1
8961 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963 (exit $ac_status); } && {
8964 test -z "$ac_c_werror_flag" ||
8965 test ! -s conftest.err
8966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_hi=$ac_mid
8968else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008970sed 's/^/| /' conftest.$ac_ext >&5
8971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974
8975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008976done
8977case $ac_lo in
8978?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008980 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008981See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008982echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008983See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008984 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985 else
8986 ac_cv_sizeof_short=0
8987 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008988esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008989else
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008991/* confdefs.h. */
8992_ACEOF
8993cat confdefs.h >>conftest.$ac_ext
8994cat >>conftest.$ac_ext <<_ACEOF
8995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008997 typedef short ac__type_sizeof_;
8998static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8999static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009000#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009001#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009004{
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
9006 FILE *f = fopen ("conftest.val", "w");
9007 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009009 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009012 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009014 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 }
9016 else
9017 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009019 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009020 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009021 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009024
9025 ;
9026 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009027}
Martin v. Löwis11437992002-04-12 09:54:03 +00009028_ACEOF
9029rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030if { (ac_try="$ac_link"
9031case "(($ac_try" in
9032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9033 *) ac_try_echo=$ac_try;;
9034esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009036 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 { (case "(($ac_try" in
9041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9042 *) ac_try_echo=$ac_try;;
9043esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 (exit $ac_status); }; }; then
9049 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009050else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009051 echo "$as_me: program exited with status $ac_status" >&5
9052echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009053sed 's/^/| /' conftest.$ac_ext >&5
9054
Martin v. Löwis11437992002-04-12 09:54:03 +00009055( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009056if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009057 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009058See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009059echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009060See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009061 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062 else
9063 ac_cv_sizeof_short=0
9064 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066rm -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 +00009067fi
9068rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009069fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009070{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9071echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072
9073
9074
Martin v. Löwis11437992002-04-12 09:54:03 +00009075cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009076#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009077_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009078
9079
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009080{ echo "$as_me:$LINENO: checking for float" >&5
9081echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9082if test "${ac_cv_type_float+set}" = set; then
9083 echo $ECHO_N "(cached) $ECHO_C" >&6
9084else
9085 cat >conftest.$ac_ext <<_ACEOF
9086/* confdefs.h. */
9087_ACEOF
9088cat confdefs.h >>conftest.$ac_ext
9089cat >>conftest.$ac_ext <<_ACEOF
9090/* end confdefs.h. */
9091$ac_includes_default
9092typedef float ac__type_new_;
9093int
9094main ()
9095{
9096if ((ac__type_new_ *) 0)
9097 return 0;
9098if (sizeof (ac__type_new_))
9099 return 0;
9100 ;
9101 return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext
9105if { (ac_try="$ac_compile"
9106case "(($ac_try" in
9107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9108 *) ac_try_echo=$ac_try;;
9109esac
9110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9111 (eval "$ac_compile") 2>conftest.er1
9112 ac_status=$?
9113 grep -v '^ *+' conftest.er1 >conftest.err
9114 rm -f conftest.er1
9115 cat conftest.err >&5
9116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9117 (exit $ac_status); } && {
9118 test -z "$ac_c_werror_flag" ||
9119 test ! -s conftest.err
9120 } && test -s conftest.$ac_objext; then
9121 ac_cv_type_float=yes
9122else
9123 echo "$as_me: failed program was:" >&5
9124sed 's/^/| /' conftest.$ac_ext >&5
9125
9126 ac_cv_type_float=no
9127fi
9128
9129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9130fi
9131{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9132echo "${ECHO_T}$ac_cv_type_float" >&6; }
9133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# The cast to long int works around a bug in the HP C Compiler
9135# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9136# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9137# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009138{ echo "$as_me:$LINENO: checking size of float" >&5
9139echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009140if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009141 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009142else
Martin v. Löwis11437992002-04-12 09:54:03 +00009143 if test "$cross_compiling" = yes; then
9144 # Depending upon the size, compute the lo and hi bounds.
9145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* confdefs.h. */
9147_ACEOF
9148cat confdefs.h >>conftest.$ac_ext
9149cat >>conftest.$ac_ext <<_ACEOF
9150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009152 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153int
9154main ()
9155{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009157test_array [0] = 0
9158
9159 ;
9160 return 0;
9161}
9162_ACEOF
9163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009164if { (ac_try="$ac_compile"
9165case "(($ac_try" in
9166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9167 *) ac_try_echo=$ac_try;;
9168esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1
9174 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009176 (exit $ac_status); } && {
9177 test -z "$ac_c_werror_flag" ||
9178 test ! -s conftest.err
9179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_lo=0 ac_mid=0
9181 while :; do
9182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009183/* confdefs.h. */
9184_ACEOF
9185cat confdefs.h >>conftest.$ac_ext
9186cat >>conftest.$ac_ext <<_ACEOF
9187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009188$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009189 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190int
9191main ()
9192{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009193static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009194test_array [0] = 0
9195
9196 ;
9197 return 0;
9198}
9199_ACEOF
9200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201if { (ac_try="$ac_compile"
9202case "(($ac_try" in
9203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9204 *) ac_try_echo=$ac_try;;
9205esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009209 grep -v '^ *+' conftest.er1 >conftest.err
9210 rm -f conftest.er1
9211 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213 (exit $ac_status); } && {
9214 test -z "$ac_c_werror_flag" ||
9215 test ! -s conftest.err
9216 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_hi=$ac_mid; break
9218else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009220sed 's/^/| /' conftest.$ac_ext >&5
9221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222 ac_lo=`expr $ac_mid + 1`
9223 if test $ac_lo -le $ac_mid; then
9224 ac_lo= ac_hi=
9225 break
9226 fi
9227 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229
9230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 done
9232else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009234sed 's/^/| /' conftest.$ac_ext >&5
9235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009237/* confdefs.h. */
9238_ACEOF
9239cat confdefs.h >>conftest.$ac_ext
9240cat >>conftest.$ac_ext <<_ACEOF
9241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009242$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009243 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009244int
9245main ()
9246{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009248test_array [0] = 0
9249
9250 ;
9251 return 0;
9252}
9253_ACEOF
9254rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255if { (ac_try="$ac_compile"
9256case "(($ac_try" in
9257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9258 *) ac_try_echo=$ac_try;;
9259esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009263 grep -v '^ *+' conftest.er1 >conftest.err
9264 rm -f conftest.er1
9265 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 (exit $ac_status); } && {
9268 test -z "$ac_c_werror_flag" ||
9269 test ! -s conftest.err
9270 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 ac_hi=-1 ac_mid=-1
9272 while :; do
9273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009274/* confdefs.h. */
9275_ACEOF
9276cat confdefs.h >>conftest.$ac_ext
9277cat >>conftest.$ac_ext <<_ACEOF
9278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009279$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009280 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009281int
9282main ()
9283{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009284static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009285test_array [0] = 0
9286
9287 ;
9288 return 0;
9289}
9290_ACEOF
9291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292if { (ac_try="$ac_compile"
9293case "(($ac_try" in
9294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9295 *) ac_try_echo=$ac_try;;
9296esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009300 grep -v '^ *+' conftest.er1 >conftest.err
9301 rm -f conftest.er1
9302 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304 (exit $ac_status); } && {
9305 test -z "$ac_c_werror_flag" ||
9306 test ! -s conftest.err
9307 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009308 ac_lo=$ac_mid; break
9309else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009311sed 's/^/| /' conftest.$ac_ext >&5
9312
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313 ac_hi=`expr '(' $ac_mid ')' - 1`
9314 if test $ac_mid -le $ac_hi; then
9315 ac_lo= ac_hi=
9316 break
9317 fi
9318 ac_mid=`expr 2 '*' $ac_mid`
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 +00009322 done
9323else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009325sed 's/^/| /' conftest.$ac_ext >&5
9326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009329
9330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009332
9333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009334# Binary search between lo and hi bounds.
9335while test "x$ac_lo" != "x$ac_hi"; do
9336 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* confdefs.h. */
9339_ACEOF
9340cat confdefs.h >>conftest.$ac_ext
9341cat >>conftest.$ac_ext <<_ACEOF
9342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009344 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009345int
9346main ()
9347{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009349test_array [0] = 0
9350
9351 ;
9352 return 0;
9353}
9354_ACEOF
9355rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356if { (ac_try="$ac_compile"
9357case "(($ac_try" in
9358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9359 *) ac_try_echo=$ac_try;;
9360esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009364 grep -v '^ *+' conftest.er1 >conftest.err
9365 rm -f conftest.er1
9366 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368 (exit $ac_status); } && {
9369 test -z "$ac_c_werror_flag" ||
9370 test ! -s conftest.err
9371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_hi=$ac_mid
9373else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009375sed 's/^/| /' conftest.$ac_ext >&5
9376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379
9380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009381done
9382case $ac_lo in
9383?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009385 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009386See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009387echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009388See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009389 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009390 else
9391 ac_cv_sizeof_float=0
9392 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009393esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009394else
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* confdefs.h. */
9397_ACEOF
9398cat confdefs.h >>conftest.$ac_ext
9399cat >>conftest.$ac_ext <<_ACEOF
9400/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009401$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009402 typedef float ac__type_sizeof_;
9403static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9404static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009405#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009406#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009407int
9408main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009409{
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
9411 FILE *f = fopen ("conftest.val", "w");
9412 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009414 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009417 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009419 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 }
9421 else
9422 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009426 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009429
9430 ;
9431 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009432}
Martin v. Löwis11437992002-04-12 09:54:03 +00009433_ACEOF
9434rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435if { (ac_try="$ac_link"
9436case "(($ac_try" in
9437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9438 *) ac_try_echo=$ac_try;;
9439esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009441 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 { (case "(($ac_try" in
9446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9447 *) ac_try_echo=$ac_try;;
9448esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 (exit $ac_status); }; }; then
9454 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009455else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009456 echo "$as_me: program exited with status $ac_status" >&5
9457echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009458sed 's/^/| /' conftest.$ac_ext >&5
9459
Martin v. Löwis11437992002-04-12 09:54:03 +00009460( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009462 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009463See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009464echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009465See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009466 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 else
9468 ac_cv_sizeof_float=0
9469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471rm -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 +00009472fi
9473rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009474fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009475{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9476echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477
9478
9479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009481#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009482_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009483
9484
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009485{ echo "$as_me:$LINENO: checking for double" >&5
9486echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9487if test "${ac_cv_type_double+set}" = set; then
9488 echo $ECHO_N "(cached) $ECHO_C" >&6
9489else
9490 cat >conftest.$ac_ext <<_ACEOF
9491/* confdefs.h. */
9492_ACEOF
9493cat confdefs.h >>conftest.$ac_ext
9494cat >>conftest.$ac_ext <<_ACEOF
9495/* end confdefs.h. */
9496$ac_includes_default
9497typedef double ac__type_new_;
9498int
9499main ()
9500{
9501if ((ac__type_new_ *) 0)
9502 return 0;
9503if (sizeof (ac__type_new_))
9504 return 0;
9505 ;
9506 return 0;
9507}
9508_ACEOF
9509rm -f conftest.$ac_objext
9510if { (ac_try="$ac_compile"
9511case "(($ac_try" in
9512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9513 *) ac_try_echo=$ac_try;;
9514esac
9515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9516 (eval "$ac_compile") 2>conftest.er1
9517 ac_status=$?
9518 grep -v '^ *+' conftest.er1 >conftest.err
9519 rm -f conftest.er1
9520 cat conftest.err >&5
9521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9522 (exit $ac_status); } && {
9523 test -z "$ac_c_werror_flag" ||
9524 test ! -s conftest.err
9525 } && test -s conftest.$ac_objext; then
9526 ac_cv_type_double=yes
9527else
9528 echo "$as_me: failed program was:" >&5
9529sed 's/^/| /' conftest.$ac_ext >&5
9530
9531 ac_cv_type_double=no
9532fi
9533
9534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9535fi
9536{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9537echo "${ECHO_T}$ac_cv_type_double" >&6; }
9538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539# The cast to long int works around a bug in the HP C Compiler
9540# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9541# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9542# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009543{ echo "$as_me:$LINENO: checking size of double" >&5
9544echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009545if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009546 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009547else
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 if test "$cross_compiling" = yes; then
9549 # Depending upon the size, compute the lo and hi bounds.
9550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009551/* confdefs.h. */
9552_ACEOF
9553cat confdefs.h >>conftest.$ac_ext
9554cat >>conftest.$ac_ext <<_ACEOF
9555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009556$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009557 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009558int
9559main ()
9560{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009562test_array [0] = 0
9563
9564 ;
9565 return 0;
9566}
9567_ACEOF
9568rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569if { (ac_try="$ac_compile"
9570case "(($ac_try" in
9571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572 *) ac_try_echo=$ac_try;;
9573esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009577 grep -v '^ *+' conftest.er1 >conftest.err
9578 rm -f conftest.er1
9579 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581 (exit $ac_status); } && {
9582 test -z "$ac_c_werror_flag" ||
9583 test ! -s conftest.err
9584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_lo=0 ac_mid=0
9586 while :; do
9587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009588/* confdefs.h. */
9589_ACEOF
9590cat confdefs.h >>conftest.$ac_ext
9591cat >>conftest.$ac_ext <<_ACEOF
9592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009593$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009594 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009595int
9596main ()
9597{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009598static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009599test_array [0] = 0
9600
9601 ;
9602 return 0;
9603}
9604_ACEOF
9605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606if { (ac_try="$ac_compile"
9607case "(($ac_try" in
9608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9609 *) ac_try_echo=$ac_try;;
9610esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009614 grep -v '^ *+' conftest.er1 >conftest.err
9615 rm -f conftest.er1
9616 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 (exit $ac_status); } && {
9619 test -z "$ac_c_werror_flag" ||
9620 test ! -s conftest.err
9621 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ac_hi=$ac_mid; break
9623else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009625sed 's/^/| /' conftest.$ac_ext >&5
9626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009627 ac_lo=`expr $ac_mid + 1`
9628 if test $ac_lo -le $ac_mid; then
9629 ac_lo= ac_hi=
9630 break
9631 fi
9632 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634
9635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 done
9637else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009639sed 's/^/| /' conftest.$ac_ext >&5
9640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009642/* confdefs.h. */
9643_ACEOF
9644cat confdefs.h >>conftest.$ac_ext
9645cat >>conftest.$ac_ext <<_ACEOF
9646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009647$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009648 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009649int
9650main ()
9651{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009652static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009653test_array [0] = 0
9654
9655 ;
9656 return 0;
9657}
9658_ACEOF
9659rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660if { (ac_try="$ac_compile"
9661case "(($ac_try" in
9662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9663 *) ac_try_echo=$ac_try;;
9664esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009668 grep -v '^ *+' conftest.er1 >conftest.err
9669 rm -f conftest.er1
9670 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672 (exit $ac_status); } && {
9673 test -z "$ac_c_werror_flag" ||
9674 test ! -s conftest.err
9675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_hi=-1 ac_mid=-1
9677 while :; do
9678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* confdefs.h. */
9680_ACEOF
9681cat confdefs.h >>conftest.$ac_ext
9682cat >>conftest.$ac_ext <<_ACEOF
9683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009684$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009685 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009686int
9687main ()
9688{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009689static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009690test_array [0] = 0
9691
9692 ;
9693 return 0;
9694}
9695_ACEOF
9696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697if { (ac_try="$ac_compile"
9698case "(($ac_try" in
9699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9700 *) ac_try_echo=$ac_try;;
9701esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009705 grep -v '^ *+' conftest.er1 >conftest.err
9706 rm -f conftest.er1
9707 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009709 (exit $ac_status); } && {
9710 test -z "$ac_c_werror_flag" ||
9711 test ! -s conftest.err
9712 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_lo=$ac_mid; break
9714else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009716sed 's/^/| /' conftest.$ac_ext >&5
9717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718 ac_hi=`expr '(' $ac_mid ')' - 1`
9719 if test $ac_mid -le $ac_hi; then
9720 ac_lo= ac_hi=
9721 break
9722 fi
9723 ac_mid=`expr 2 '*' $ac_mid`
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 +00009727 done
9728else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009730sed 's/^/| /' conftest.$ac_ext >&5
9731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734
9735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737
9738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009739# Binary search between lo and hi bounds.
9740while test "x$ac_lo" != "x$ac_hi"; do
9741 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009743/* confdefs.h. */
9744_ACEOF
9745cat confdefs.h >>conftest.$ac_ext
9746cat >>conftest.$ac_ext <<_ACEOF
9747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009748$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009749 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009750int
9751main ()
9752{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009754test_array [0] = 0
9755
9756 ;
9757 return 0;
9758}
9759_ACEOF
9760rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761if { (ac_try="$ac_compile"
9762case "(($ac_try" in
9763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9764 *) ac_try_echo=$ac_try;;
9765esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009769 grep -v '^ *+' conftest.er1 >conftest.err
9770 rm -f conftest.er1
9771 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 (exit $ac_status); } && {
9774 test -z "$ac_c_werror_flag" ||
9775 test ! -s conftest.err
9776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ac_hi=$ac_mid
9778else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009780sed 's/^/| /' conftest.$ac_ext >&5
9781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784
9785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009786done
9787case $ac_lo in
9788?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009790 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009791See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009792echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009793See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009794 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795 else
9796 ac_cv_sizeof_double=0
9797 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009798esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009801/* confdefs.h. */
9802_ACEOF
9803cat confdefs.h >>conftest.$ac_ext
9804cat >>conftest.$ac_ext <<_ACEOF
9805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009806$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009807 typedef double ac__type_sizeof_;
9808static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9809static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009812int
9813main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009814{
Martin v. Löwis11437992002-04-12 09:54:03 +00009815
9816 FILE *f = fopen ("conftest.val", "w");
9817 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009819 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009822 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009824 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 }
9826 else
9827 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009829 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009831 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009834
9835 ;
9836 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009837}
Martin v. Löwis11437992002-04-12 09:54:03 +00009838_ACEOF
9839rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840if { (ac_try="$ac_link"
9841case "(($ac_try" in
9842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9843 *) ac_try_echo=$ac_try;;
9844esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009846 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 { (case "(($ac_try" in
9851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9852 *) ac_try_echo=$ac_try;;
9853esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009858 (exit $ac_status); }; }; then
9859 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009860else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009861 echo "$as_me: program exited with status $ac_status" >&5
9862echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009863sed 's/^/| /' conftest.$ac_ext >&5
9864
Martin v. Löwis11437992002-04-12 09:54:03 +00009865( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009867 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009868See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009869echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009870See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009871 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872 else
9873 ac_cv_sizeof_double=0
9874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876rm -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 +00009877fi
9878rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009879fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009880{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9881echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882
9883
9884
Martin v. Löwis11437992002-04-12 09:54:03 +00009885cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009886#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009888
9889
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009890{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9891echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9892if test "${ac_cv_type_fpos_t+set}" = set; then
9893 echo $ECHO_N "(cached) $ECHO_C" >&6
9894else
9895 cat >conftest.$ac_ext <<_ACEOF
9896/* confdefs.h. */
9897_ACEOF
9898cat confdefs.h >>conftest.$ac_ext
9899cat >>conftest.$ac_ext <<_ACEOF
9900/* end confdefs.h. */
9901$ac_includes_default
9902typedef fpos_t ac__type_new_;
9903int
9904main ()
9905{
9906if ((ac__type_new_ *) 0)
9907 return 0;
9908if (sizeof (ac__type_new_))
9909 return 0;
9910 ;
9911 return 0;
9912}
9913_ACEOF
9914rm -f conftest.$ac_objext
9915if { (ac_try="$ac_compile"
9916case "(($ac_try" in
9917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9918 *) ac_try_echo=$ac_try;;
9919esac
9920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9921 (eval "$ac_compile") 2>conftest.er1
9922 ac_status=$?
9923 grep -v '^ *+' conftest.er1 >conftest.err
9924 rm -f conftest.er1
9925 cat conftest.err >&5
9926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9927 (exit $ac_status); } && {
9928 test -z "$ac_c_werror_flag" ||
9929 test ! -s conftest.err
9930 } && test -s conftest.$ac_objext; then
9931 ac_cv_type_fpos_t=yes
9932else
9933 echo "$as_me: failed program was:" >&5
9934sed 's/^/| /' conftest.$ac_ext >&5
9935
9936 ac_cv_type_fpos_t=no
9937fi
9938
9939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9940fi
9941{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9942echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944# The cast to long int works around a bug in the HP C Compiler
9945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9947# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009948{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9949echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009950if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009951 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009952else
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 if test "$cross_compiling" = yes; then
9954 # Depending upon the size, compute the lo and hi bounds.
9955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* confdefs.h. */
9957_ACEOF
9958cat confdefs.h >>conftest.$ac_ext
9959cat >>conftest.$ac_ext <<_ACEOF
9960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009961$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009962 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009963int
9964main ()
9965{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009967test_array [0] = 0
9968
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974if { (ac_try="$ac_compile"
9975case "(($ac_try" in
9976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9977 *) ac_try_echo=$ac_try;;
9978esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009982 grep -v '^ *+' conftest.er1 >conftest.err
9983 rm -f conftest.er1
9984 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986 (exit $ac_status); } && {
9987 test -z "$ac_c_werror_flag" ||
9988 test ! -s conftest.err
9989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ac_lo=0 ac_mid=0
9991 while :; do
9992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* confdefs.h. */
9994_ACEOF
9995cat confdefs.h >>conftest.$ac_ext
9996cat >>conftest.$ac_ext <<_ACEOF
9997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009998$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009999 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010000int
10001main ()
10002{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010004test_array [0] = 0
10005
10006 ;
10007 return 0;
10008}
10009_ACEOF
10010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011if { (ac_try="$ac_compile"
10012case "(($ac_try" in
10013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10014 *) ac_try_echo=$ac_try;;
10015esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010019 grep -v '^ *+' conftest.er1 >conftest.err
10020 rm -f conftest.er1
10021 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 (exit $ac_status); } && {
10024 test -z "$ac_c_werror_flag" ||
10025 test ! -s conftest.err
10026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 ac_hi=$ac_mid; break
10028else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010029 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010030sed 's/^/| /' conftest.$ac_ext >&5
10031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032 ac_lo=`expr $ac_mid + 1`
10033 if test $ac_lo -le $ac_mid; then
10034 ac_lo= ac_hi=
10035 break
10036 fi
10037 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039
10040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 done
10042else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010044sed 's/^/| /' conftest.$ac_ext >&5
10045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010047/* confdefs.h. */
10048_ACEOF
10049cat confdefs.h >>conftest.$ac_ext
10050cat >>conftest.$ac_ext <<_ACEOF
10051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010052$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010053 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010054int
10055main ()
10056{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010058test_array [0] = 0
10059
10060 ;
10061 return 0;
10062}
10063_ACEOF
10064rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065if { (ac_try="$ac_compile"
10066case "(($ac_try" in
10067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10068 *) ac_try_echo=$ac_try;;
10069esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010073 grep -v '^ *+' conftest.er1 >conftest.err
10074 rm -f conftest.er1
10075 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 (exit $ac_status); } && {
10078 test -z "$ac_c_werror_flag" ||
10079 test ! -s conftest.err
10080 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_hi=-1 ac_mid=-1
10082 while :; do
10083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010084/* confdefs.h. */
10085_ACEOF
10086cat confdefs.h >>conftest.$ac_ext
10087cat >>conftest.$ac_ext <<_ACEOF
10088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010089$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010090 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010091int
10092main ()
10093{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010094static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010095test_array [0] = 0
10096
10097 ;
10098 return 0;
10099}
10100_ACEOF
10101rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102if { (ac_try="$ac_compile"
10103case "(($ac_try" in
10104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10105 *) ac_try_echo=$ac_try;;
10106esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010110 grep -v '^ *+' conftest.er1 >conftest.err
10111 rm -f conftest.er1
10112 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114 (exit $ac_status); } && {
10115 test -z "$ac_c_werror_flag" ||
10116 test ! -s conftest.err
10117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_lo=$ac_mid; break
10119else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010121sed 's/^/| /' conftest.$ac_ext >&5
10122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123 ac_hi=`expr '(' $ac_mid ')' - 1`
10124 if test $ac_mid -le $ac_hi; then
10125 ac_lo= ac_hi=
10126 break
10127 fi
10128 ac_mid=`expr 2 '*' $ac_mid`
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 +000010132 done
10133else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010135sed 's/^/| /' conftest.$ac_ext >&5
10136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139
10140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142
10143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010144# Binary search between lo and hi bounds.
10145while test "x$ac_lo" != "x$ac_hi"; do
10146 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010148/* confdefs.h. */
10149_ACEOF
10150cat confdefs.h >>conftest.$ac_ext
10151cat >>conftest.$ac_ext <<_ACEOF
10152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010154 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010155int
10156main ()
10157{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010159test_array [0] = 0
10160
10161 ;
10162 return 0;
10163}
10164_ACEOF
10165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010166if { (ac_try="$ac_compile"
10167case "(($ac_try" in
10168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10169 *) ac_try_echo=$ac_try;;
10170esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010174 grep -v '^ *+' conftest.er1 >conftest.err
10175 rm -f conftest.er1
10176 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178 (exit $ac_status); } && {
10179 test -z "$ac_c_werror_flag" ||
10180 test ! -s conftest.err
10181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010182 ac_hi=$ac_mid
10183else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010185sed 's/^/| /' conftest.$ac_ext >&5
10186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189
10190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010191done
10192case $ac_lo in
10193?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010195 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010196See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010197echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010198See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010199 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200 else
10201 ac_cv_sizeof_fpos_t=0
10202 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010203esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010204else
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010206/* confdefs.h. */
10207_ACEOF
10208cat confdefs.h >>conftest.$ac_ext
10209cat >>conftest.$ac_ext <<_ACEOF
10210/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010211$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010212 typedef fpos_t ac__type_sizeof_;
10213static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10214static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010215#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010216#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010217int
10218main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010219{
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
10221 FILE *f = fopen ("conftest.val", "w");
10222 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010224 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010227 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010229 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010230 }
10231 else
10232 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010234 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010236 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010239
10240 ;
10241 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010242}
Martin v. Löwis11437992002-04-12 09:54:03 +000010243_ACEOF
10244rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245if { (ac_try="$ac_link"
10246case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010252 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 { (case "(($ac_try" in
10256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10257 *) ac_try_echo=$ac_try;;
10258esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 (exit $ac_status); }; }; then
10264 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010265else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010266 echo "$as_me: program exited with status $ac_status" >&5
10267echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010268sed 's/^/| /' conftest.$ac_ext >&5
10269
Martin v. Löwis11437992002-04-12 09:54:03 +000010270( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010272 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010273See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010274echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010275See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010276 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 else
10278 ac_cv_sizeof_fpos_t=0
10279 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281rm -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 +000010282fi
10283rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010284fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010285{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10286echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287
10288
10289
Martin v. Löwis11437992002-04-12 09:54:03 +000010290cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010291#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010292_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010293
Michael W. Hudson54241132001-12-07 15:38:26 +000010294
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010295{ echo "$as_me:$LINENO: checking for size_t" >&5
10296echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10297if test "${ac_cv_type_size_t+set}" = set; then
10298 echo $ECHO_N "(cached) $ECHO_C" >&6
10299else
10300 cat >conftest.$ac_ext <<_ACEOF
10301/* confdefs.h. */
10302_ACEOF
10303cat confdefs.h >>conftest.$ac_ext
10304cat >>conftest.$ac_ext <<_ACEOF
10305/* end confdefs.h. */
10306$ac_includes_default
10307typedef size_t ac__type_new_;
10308int
10309main ()
10310{
10311if ((ac__type_new_ *) 0)
10312 return 0;
10313if (sizeof (ac__type_new_))
10314 return 0;
10315 ;
10316 return 0;
10317}
10318_ACEOF
10319rm -f conftest.$ac_objext
10320if { (ac_try="$ac_compile"
10321case "(($ac_try" in
10322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10323 *) ac_try_echo=$ac_try;;
10324esac
10325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10326 (eval "$ac_compile") 2>conftest.er1
10327 ac_status=$?
10328 grep -v '^ *+' conftest.er1 >conftest.err
10329 rm -f conftest.er1
10330 cat conftest.err >&5
10331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10332 (exit $ac_status); } && {
10333 test -z "$ac_c_werror_flag" ||
10334 test ! -s conftest.err
10335 } && test -s conftest.$ac_objext; then
10336 ac_cv_type_size_t=yes
10337else
10338 echo "$as_me: failed program was:" >&5
10339sed 's/^/| /' conftest.$ac_ext >&5
10340
10341 ac_cv_type_size_t=no
10342fi
10343
10344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10345fi
10346{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10347echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349# The cast to long int works around a bug in the HP C Compiler
10350# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10351# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10352# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010353{ echo "$as_me:$LINENO: checking size of size_t" >&5
10354echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010355if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010356 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010357else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010358 if test "$cross_compiling" = yes; then
10359 # Depending upon the size, compute the lo and hi bounds.
10360cat >conftest.$ac_ext <<_ACEOF
10361/* confdefs.h. */
10362_ACEOF
10363cat confdefs.h >>conftest.$ac_ext
10364cat >>conftest.$ac_ext <<_ACEOF
10365/* end confdefs.h. */
10366$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010367 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010368int
10369main ()
10370{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010372test_array [0] = 0
10373
10374 ;
10375 return 0;
10376}
10377_ACEOF
10378rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379if { (ac_try="$ac_compile"
10380case "(($ac_try" in
10381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10382 *) ac_try_echo=$ac_try;;
10383esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010386 ac_status=$?
10387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010391 (exit $ac_status); } && {
10392 test -z "$ac_c_werror_flag" ||
10393 test ! -s conftest.err
10394 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010395 ac_lo=0 ac_mid=0
10396 while :; do
10397 cat >conftest.$ac_ext <<_ACEOF
10398/* confdefs.h. */
10399_ACEOF
10400cat confdefs.h >>conftest.$ac_ext
10401cat >>conftest.$ac_ext <<_ACEOF
10402/* end confdefs.h. */
10403$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010404 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010405int
10406main ()
10407{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010408static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010409test_array [0] = 0
10410
10411 ;
10412 return 0;
10413}
10414_ACEOF
10415rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416if { (ac_try="$ac_compile"
10417case "(($ac_try" in
10418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419 *) ac_try_echo=$ac_try;;
10420esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010423 ac_status=$?
10424 grep -v '^ *+' conftest.er1 >conftest.err
10425 rm -f conftest.er1
10426 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428 (exit $ac_status); } && {
10429 test -z "$ac_c_werror_flag" ||
10430 test ! -s conftest.err
10431 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010432 ac_hi=$ac_mid; break
10433else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010434 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010435sed 's/^/| /' conftest.$ac_ext >&5
10436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437 ac_lo=`expr $ac_mid + 1`
10438 if test $ac_lo -le $ac_mid; then
10439 ac_lo= ac_hi=
10440 break
10441 fi
10442 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444
10445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010446 done
10447else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010448 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010449sed 's/^/| /' conftest.$ac_ext >&5
10450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010452/* confdefs.h. */
10453_ACEOF
10454cat confdefs.h >>conftest.$ac_ext
10455cat >>conftest.$ac_ext <<_ACEOF
10456/* end confdefs.h. */
10457$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010458 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459int
10460main ()
10461{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010462static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010463test_array [0] = 0
10464
10465 ;
10466 return 0;
10467}
10468_ACEOF
10469rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470if { (ac_try="$ac_compile"
10471case "(($ac_try" in
10472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10473 *) ac_try_echo=$ac_try;;
10474esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010477 ac_status=$?
10478 grep -v '^ *+' conftest.er1 >conftest.err
10479 rm -f conftest.er1
10480 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010482 (exit $ac_status); } && {
10483 test -z "$ac_c_werror_flag" ||
10484 test ! -s conftest.err
10485 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010486 ac_hi=-1 ac_mid=-1
10487 while :; do
10488 cat >conftest.$ac_ext <<_ACEOF
10489/* confdefs.h. */
10490_ACEOF
10491cat confdefs.h >>conftest.$ac_ext
10492cat >>conftest.$ac_ext <<_ACEOF
10493/* end confdefs.h. */
10494$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010495 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496int
10497main ()
10498{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010499static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010500test_array [0] = 0
10501
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010507if { (ac_try="$ac_compile"
10508case "(($ac_try" in
10509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10510 *) ac_try_echo=$ac_try;;
10511esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010514 ac_status=$?
10515 grep -v '^ *+' conftest.er1 >conftest.err
10516 rm -f conftest.er1
10517 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 (exit $ac_status); } && {
10520 test -z "$ac_c_werror_flag" ||
10521 test ! -s conftest.err
10522 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010523 ac_lo=$ac_mid; break
10524else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010525 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010526sed 's/^/| /' conftest.$ac_ext >&5
10527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528 ac_hi=`expr '(' $ac_mid ')' - 1`
10529 if test $ac_mid -le $ac_hi; then
10530 ac_lo= ac_hi=
10531 break
10532 fi
10533 ac_mid=`expr 2 '*' $ac_mid`
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 +000010537 done
10538else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010539 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010540sed 's/^/| /' conftest.$ac_ext >&5
10541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544
10545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010547
10548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549# Binary search between lo and hi bounds.
10550while test "x$ac_lo" != "x$ac_hi"; do
10551 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10552 cat >conftest.$ac_ext <<_ACEOF
10553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
10558$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010559 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560int
10561main ()
10562{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564test_array [0] = 0
10565
10566 ;
10567 return 0;
10568}
10569_ACEOF
10570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571if { (ac_try="$ac_compile"
10572case "(($ac_try" in
10573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10574 *) ac_try_echo=$ac_try;;
10575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578 ac_status=$?
10579 grep -v '^ *+' conftest.er1 >conftest.err
10580 rm -f conftest.er1
10581 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583 (exit $ac_status); } && {
10584 test -z "$ac_c_werror_flag" ||
10585 test ! -s conftest.err
10586 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587 ac_hi=$ac_mid
10588else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010589 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590sed 's/^/| /' conftest.$ac_ext >&5
10591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010592 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594
10595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596done
10597case $ac_lo in
10598?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010600 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010602echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010604 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605 else
10606 ac_cv_sizeof_size_t=0
10607 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010608esac
10609else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610 cat >conftest.$ac_ext <<_ACEOF
10611/* confdefs.h. */
10612_ACEOF
10613cat confdefs.h >>conftest.$ac_ext
10614cat >>conftest.$ac_ext <<_ACEOF
10615/* end confdefs.h. */
10616$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010617 typedef size_t ac__type_sizeof_;
10618static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10619static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620#include <stdio.h>
10621#include <stdlib.h>
10622int
10623main ()
10624{
10625
10626 FILE *f = fopen ("conftest.val", "w");
10627 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010629 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010632 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010634 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010635 }
10636 else
10637 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010639 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010641 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010642 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010644
10645 ;
10646 return 0;
10647}
10648_ACEOF
10649rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650if { (ac_try="$ac_link"
10651case "(($ac_try" in
10652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10653 *) ac_try_echo=$ac_try;;
10654esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010657 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 { (case "(($ac_try" in
10661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10662 *) ac_try_echo=$ac_try;;
10663esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010666 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668 (exit $ac_status); }; }; then
10669 ac_cv_sizeof_size_t=`cat conftest.val`
10670else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010671 echo "$as_me: program exited with status $ac_status" >&5
10672echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673sed 's/^/| /' conftest.$ac_ext >&5
10674
10675( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010677 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010679echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010681 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682 else
10683 ac_cv_sizeof_size_t=0
10684 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686rm -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 +000010687fi
10688rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010689fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010690{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10691echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692
10693
10694
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695cat >>confdefs.h <<_ACEOF
10696#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10697_ACEOF
10698
10699
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010700{ echo "$as_me:$LINENO: checking for pid_t" >&5
10701echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10702if test "${ac_cv_type_pid_t+set}" = set; then
10703 echo $ECHO_N "(cached) $ECHO_C" >&6
10704else
10705 cat >conftest.$ac_ext <<_ACEOF
10706/* confdefs.h. */
10707_ACEOF
10708cat confdefs.h >>conftest.$ac_ext
10709cat >>conftest.$ac_ext <<_ACEOF
10710/* end confdefs.h. */
10711$ac_includes_default
10712typedef pid_t ac__type_new_;
10713int
10714main ()
10715{
10716if ((ac__type_new_ *) 0)
10717 return 0;
10718if (sizeof (ac__type_new_))
10719 return 0;
10720 ;
10721 return 0;
10722}
10723_ACEOF
10724rm -f conftest.$ac_objext
10725if { (ac_try="$ac_compile"
10726case "(($ac_try" in
10727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10728 *) ac_try_echo=$ac_try;;
10729esac
10730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10731 (eval "$ac_compile") 2>conftest.er1
10732 ac_status=$?
10733 grep -v '^ *+' conftest.er1 >conftest.err
10734 rm -f conftest.er1
10735 cat conftest.err >&5
10736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737 (exit $ac_status); } && {
10738 test -z "$ac_c_werror_flag" ||
10739 test ! -s conftest.err
10740 } && test -s conftest.$ac_objext; then
10741 ac_cv_type_pid_t=yes
10742else
10743 echo "$as_me: failed program was:" >&5
10744sed 's/^/| /' conftest.$ac_ext >&5
10745
10746 ac_cv_type_pid_t=no
10747fi
10748
10749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10750fi
10751{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10752echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10753
Christian Heimes400adb02008-02-01 08:12:03 +000010754# The cast to long int works around a bug in the HP C Compiler
10755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10757# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010758{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10759echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010760if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010761 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010762else
10763 if test "$cross_compiling" = yes; then
10764 # Depending upon the size, compute the lo and hi bounds.
10765cat >conftest.$ac_ext <<_ACEOF
10766/* confdefs.h. */
10767_ACEOF
10768cat confdefs.h >>conftest.$ac_ext
10769cat >>conftest.$ac_ext <<_ACEOF
10770/* end confdefs.h. */
10771$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010772 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010773int
10774main ()
10775{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010777test_array [0] = 0
10778
10779 ;
10780 return 0;
10781}
10782_ACEOF
10783rm -f conftest.$ac_objext
10784if { (ac_try="$ac_compile"
10785case "(($ac_try" in
10786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10787 *) ac_try_echo=$ac_try;;
10788esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010790 (eval "$ac_compile") 2>conftest.er1
10791 ac_status=$?
10792 grep -v '^ *+' conftest.er1 >conftest.err
10793 rm -f conftest.er1
10794 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010796 (exit $ac_status); } && {
10797 test -z "$ac_c_werror_flag" ||
10798 test ! -s conftest.err
10799 } && test -s conftest.$ac_objext; then
10800 ac_lo=0 ac_mid=0
10801 while :; do
10802 cat >conftest.$ac_ext <<_ACEOF
10803/* confdefs.h. */
10804_ACEOF
10805cat confdefs.h >>conftest.$ac_ext
10806cat >>conftest.$ac_ext <<_ACEOF
10807/* end confdefs.h. */
10808$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010809 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010810int
10811main ()
10812{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010813static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010814test_array [0] = 0
10815
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820rm -f conftest.$ac_objext
10821if { (ac_try="$ac_compile"
10822case "(($ac_try" in
10823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10824 *) ac_try_echo=$ac_try;;
10825esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010827 (eval "$ac_compile") 2>conftest.er1
10828 ac_status=$?
10829 grep -v '^ *+' conftest.er1 >conftest.err
10830 rm -f conftest.er1
10831 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010833 (exit $ac_status); } && {
10834 test -z "$ac_c_werror_flag" ||
10835 test ! -s conftest.err
10836 } && test -s conftest.$ac_objext; then
10837 ac_hi=$ac_mid; break
10838else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010839 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010840sed 's/^/| /' conftest.$ac_ext >&5
10841
10842 ac_lo=`expr $ac_mid + 1`
10843 if test $ac_lo -le $ac_mid; then
10844 ac_lo= ac_hi=
10845 break
10846 fi
10847 ac_mid=`expr 2 '*' $ac_mid + 1`
10848fi
10849
10850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10851 done
10852else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010853 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854sed 's/^/| /' conftest.$ac_ext >&5
10855
10856 cat >conftest.$ac_ext <<_ACEOF
10857/* confdefs.h. */
10858_ACEOF
10859cat confdefs.h >>conftest.$ac_ext
10860cat >>conftest.$ac_ext <<_ACEOF
10861/* end confdefs.h. */
10862$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010863 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010864int
10865main ()
10866{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010867static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010868test_array [0] = 0
10869
10870 ;
10871 return 0;
10872}
10873_ACEOF
10874rm -f conftest.$ac_objext
10875if { (ac_try="$ac_compile"
10876case "(($ac_try" in
10877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10878 *) ac_try_echo=$ac_try;;
10879esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010881 (eval "$ac_compile") 2>conftest.er1
10882 ac_status=$?
10883 grep -v '^ *+' conftest.er1 >conftest.err
10884 rm -f conftest.er1
10885 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010887 (exit $ac_status); } && {
10888 test -z "$ac_c_werror_flag" ||
10889 test ! -s conftest.err
10890 } && test -s conftest.$ac_objext; then
10891 ac_hi=-1 ac_mid=-1
10892 while :; do
10893 cat >conftest.$ac_ext <<_ACEOF
10894/* confdefs.h. */
10895_ACEOF
10896cat confdefs.h >>conftest.$ac_ext
10897cat >>conftest.$ac_ext <<_ACEOF
10898/* end confdefs.h. */
10899$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010900 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010901int
10902main ()
10903{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010904static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010905test_array [0] = 0
10906
10907 ;
10908 return 0;
10909}
10910_ACEOF
10911rm -f conftest.$ac_objext
10912if { (ac_try="$ac_compile"
10913case "(($ac_try" in
10914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10915 *) ac_try_echo=$ac_try;;
10916esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010918 (eval "$ac_compile") 2>conftest.er1
10919 ac_status=$?
10920 grep -v '^ *+' conftest.er1 >conftest.err
10921 rm -f conftest.er1
10922 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924 (exit $ac_status); } && {
10925 test -z "$ac_c_werror_flag" ||
10926 test ! -s conftest.err
10927 } && test -s conftest.$ac_objext; then
10928 ac_lo=$ac_mid; break
10929else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010930 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010931sed 's/^/| /' conftest.$ac_ext >&5
10932
10933 ac_hi=`expr '(' $ac_mid ')' - 1`
10934 if test $ac_mid -le $ac_hi; then
10935 ac_lo= ac_hi=
10936 break
10937 fi
10938 ac_mid=`expr 2 '*' $ac_mid`
10939fi
10940
10941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942 done
10943else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010944 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010945sed 's/^/| /' conftest.$ac_ext >&5
10946
10947 ac_lo= ac_hi=
10948fi
10949
10950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951fi
10952
10953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10954# Binary search between lo and hi bounds.
10955while test "x$ac_lo" != "x$ac_hi"; do
10956 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10957 cat >conftest.$ac_ext <<_ACEOF
10958/* confdefs.h. */
10959_ACEOF
10960cat confdefs.h >>conftest.$ac_ext
10961cat >>conftest.$ac_ext <<_ACEOF
10962/* end confdefs.h. */
10963$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010964 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010965int
10966main ()
10967{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010969test_array [0] = 0
10970
10971 ;
10972 return 0;
10973}
10974_ACEOF
10975rm -f conftest.$ac_objext
10976if { (ac_try="$ac_compile"
10977case "(($ac_try" in
10978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10979 *) ac_try_echo=$ac_try;;
10980esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010982 (eval "$ac_compile") 2>conftest.er1
10983 ac_status=$?
10984 grep -v '^ *+' conftest.er1 >conftest.err
10985 rm -f conftest.er1
10986 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010988 (exit $ac_status); } && {
10989 test -z "$ac_c_werror_flag" ||
10990 test ! -s conftest.err
10991 } && test -s conftest.$ac_objext; then
10992 ac_hi=$ac_mid
10993else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010994 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010995sed 's/^/| /' conftest.$ac_ext >&5
10996
10997 ac_lo=`expr '(' $ac_mid ')' + 1`
10998fi
10999
11000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11001done
11002case $ac_lo in
11003?*) ac_cv_sizeof_pid_t=$ac_lo;;
11004'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011005 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011006See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011007echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011008See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011009 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011010 else
11011 ac_cv_sizeof_pid_t=0
11012 fi ;;
11013esac
11014else
11015 cat >conftest.$ac_ext <<_ACEOF
11016/* confdefs.h. */
11017_ACEOF
11018cat confdefs.h >>conftest.$ac_ext
11019cat >>conftest.$ac_ext <<_ACEOF
11020/* end confdefs.h. */
11021$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011022 typedef pid_t ac__type_sizeof_;
11023static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11024static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011025#include <stdio.h>
11026#include <stdlib.h>
11027int
11028main ()
11029{
11030
11031 FILE *f = fopen ("conftest.val", "w");
11032 if (! f)
11033 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011034 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011035 {
11036 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011037 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011038 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011039 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011040 }
11041 else
11042 {
11043 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011045 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011046 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011047 }
11048 return ferror (f) || fclose (f) != 0;
11049
11050 ;
11051 return 0;
11052}
11053_ACEOF
11054rm -f conftest$ac_exeext
11055if { (ac_try="$ac_link"
11056case "(($ac_try" in
11057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11058 *) ac_try_echo=$ac_try;;
11059esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011061 (eval "$ac_link") 2>&5
11062 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11065 { (case "(($ac_try" in
11066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11067 *) ac_try_echo=$ac_try;;
11068esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011070 (eval "$ac_try") 2>&5
11071 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011073 (exit $ac_status); }; }; then
11074 ac_cv_sizeof_pid_t=`cat conftest.val`
11075else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011076 echo "$as_me: program exited with status $ac_status" >&5
11077echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011078sed 's/^/| /' conftest.$ac_ext >&5
11079
11080( exit $ac_status )
11081if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011082 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011083See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011084echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011085See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011086 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011087 else
11088 ac_cv_sizeof_pid_t=0
11089 fi
11090fi
11091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11092fi
11093rm -f conftest.val
11094fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011095{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11096echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011097
11098
11099
11100cat >>confdefs.h <<_ACEOF
11101#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11102_ACEOF
11103
11104
Michael W. Hudson54241132001-12-07 15:38:26 +000011105
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011106{ echo "$as_me:$LINENO: checking for long long support" >&5
11107echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011108have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* confdefs.h. */
11111_ACEOF
11112cat confdefs.h >>conftest.$ac_ext
11113cat >>conftest.$ac_ext <<_ACEOF
11114/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116int
11117main ()
11118{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011119long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
11124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125if { (ac_try="$ac_compile"
11126case "(($ac_try" in
11127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11128 *) ac_try_echo=$ac_try;;
11129esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011133 grep -v '^ *+' conftest.er1 >conftest.err
11134 rm -f conftest.er1
11135 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011137 (exit $ac_status); } && {
11138 test -z "$ac_c_werror_flag" ||
11139 test ! -s conftest.err
11140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011141
11142
11143cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011144#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011145_ACEOF
11146
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011147 have_long_long=yes
11148
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011149else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011150 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011151sed 's/^/| /' conftest.$ac_ext >&5
11152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011153
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155
11156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011157{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11158echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011159if test "$have_long_long" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011160{ echo "$as_me:$LINENO: checking for long long" >&5
11161echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11162if test "${ac_cv_type_long_long+set}" = set; then
11163 echo $ECHO_N "(cached) $ECHO_C" >&6
11164else
11165 cat >conftest.$ac_ext <<_ACEOF
11166/* confdefs.h. */
11167_ACEOF
11168cat confdefs.h >>conftest.$ac_ext
11169cat >>conftest.$ac_ext <<_ACEOF
11170/* end confdefs.h. */
11171$ac_includes_default
11172typedef long long ac__type_new_;
11173int
11174main ()
11175{
11176if ((ac__type_new_ *) 0)
11177 return 0;
11178if (sizeof (ac__type_new_))
11179 return 0;
11180 ;
11181 return 0;
11182}
11183_ACEOF
11184rm -f conftest.$ac_objext
11185if { (ac_try="$ac_compile"
11186case "(($ac_try" in
11187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11188 *) ac_try_echo=$ac_try;;
11189esac
11190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11191 (eval "$ac_compile") 2>conftest.er1
11192 ac_status=$?
11193 grep -v '^ *+' conftest.er1 >conftest.err
11194 rm -f conftest.er1
11195 cat conftest.err >&5
11196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11197 (exit $ac_status); } && {
11198 test -z "$ac_c_werror_flag" ||
11199 test ! -s conftest.err
11200 } && test -s conftest.$ac_objext; then
11201 ac_cv_type_long_long=yes
11202else
11203 echo "$as_me: failed program was:" >&5
11204sed 's/^/| /' conftest.$ac_ext >&5
11205
11206 ac_cv_type_long_long=no
11207fi
11208
11209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11210fi
11211{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11212echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214# The cast to long int works around a bug in the HP C Compiler
11215# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11216# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11217# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011218{ echo "$as_me:$LINENO: checking size of long long" >&5
11219echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011220if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011221 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011222else
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 if test "$cross_compiling" = yes; then
11224 # Depending upon the size, compute the lo and hi bounds.
11225cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011226/* confdefs.h. */
11227_ACEOF
11228cat confdefs.h >>conftest.$ac_ext
11229cat >>conftest.$ac_ext <<_ACEOF
11230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011231$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011232 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011233int
11234main ()
11235{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011236static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011237test_array [0] = 0
11238
11239 ;
11240 return 0;
11241}
11242_ACEOF
11243rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244if { (ac_try="$ac_compile"
11245case "(($ac_try" in
11246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11247 *) ac_try_echo=$ac_try;;
11248esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011252 grep -v '^ *+' conftest.er1 >conftest.err
11253 rm -f conftest.er1
11254 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011256 (exit $ac_status); } && {
11257 test -z "$ac_c_werror_flag" ||
11258 test ! -s conftest.err
11259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ac_lo=0 ac_mid=0
11261 while :; do
11262 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* confdefs.h. */
11264_ACEOF
11265cat confdefs.h >>conftest.$ac_ext
11266cat >>conftest.$ac_ext <<_ACEOF
11267/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011268$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011269 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011270int
11271main ()
11272{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011273static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011274test_array [0] = 0
11275
11276 ;
11277 return 0;
11278}
11279_ACEOF
11280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011281if { (ac_try="$ac_compile"
11282case "(($ac_try" in
11283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11284 *) ac_try_echo=$ac_try;;
11285esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011289 grep -v '^ *+' conftest.er1 >conftest.err
11290 rm -f conftest.er1
11291 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293 (exit $ac_status); } && {
11294 test -z "$ac_c_werror_flag" ||
11295 test ! -s conftest.err
11296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011297 ac_hi=$ac_mid; break
11298else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011300sed 's/^/| /' conftest.$ac_ext >&5
11301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011302 ac_lo=`expr $ac_mid + 1`
11303 if test $ac_lo -le $ac_mid; then
11304 ac_lo= ac_hi=
11305 break
11306 fi
11307 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011309
11310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 done
11312else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011313 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011314sed 's/^/| /' conftest.$ac_ext >&5
11315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* confdefs.h. */
11318_ACEOF
11319cat confdefs.h >>conftest.$ac_ext
11320cat >>conftest.$ac_ext <<_ACEOF
11321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011322$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011323 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011324int
11325main ()
11326{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011327static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011328test_array [0] = 0
11329
11330 ;
11331 return 0;
11332}
11333_ACEOF
11334rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011335if { (ac_try="$ac_compile"
11336case "(($ac_try" in
11337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11338 *) ac_try_echo=$ac_try;;
11339esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011343 grep -v '^ *+' conftest.er1 >conftest.err
11344 rm -f conftest.er1
11345 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347 (exit $ac_status); } && {
11348 test -z "$ac_c_werror_flag" ||
11349 test ! -s conftest.err
11350 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ac_hi=-1 ac_mid=-1
11352 while :; do
11353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* confdefs.h. */
11355_ACEOF
11356cat confdefs.h >>conftest.$ac_ext
11357cat >>conftest.$ac_ext <<_ACEOF
11358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011359$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011360 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011361int
11362main ()
11363{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011364static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011365test_array [0] = 0
11366
11367 ;
11368 return 0;
11369}
11370_ACEOF
11371rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372if { (ac_try="$ac_compile"
11373case "(($ac_try" in
11374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11375 *) ac_try_echo=$ac_try;;
11376esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011380 grep -v '^ *+' conftest.er1 >conftest.err
11381 rm -f conftest.er1
11382 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384 (exit $ac_status); } && {
11385 test -z "$ac_c_werror_flag" ||
11386 test ! -s conftest.err
11387 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011388 ac_lo=$ac_mid; break
11389else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011390 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011391sed 's/^/| /' conftest.$ac_ext >&5
11392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393 ac_hi=`expr '(' $ac_mid ')' - 1`
11394 if test $ac_mid -le $ac_hi; then
11395 ac_lo= ac_hi=
11396 break
11397 fi
11398 ac_mid=`expr 2 '*' $ac_mid`
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 +000011402 done
11403else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011405sed 's/^/| /' conftest.$ac_ext >&5
11406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409
11410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412
11413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011414# Binary search between lo and hi bounds.
11415while test "x$ac_lo" != "x$ac_hi"; do
11416 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011418/* confdefs.h. */
11419_ACEOF
11420cat confdefs.h >>conftest.$ac_ext
11421cat >>conftest.$ac_ext <<_ACEOF
11422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011423$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011424 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011428static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011429test_array [0] = 0
11430
11431 ;
11432 return 0;
11433}
11434_ACEOF
11435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011436if { (ac_try="$ac_compile"
11437case "(($ac_try" in
11438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11439 *) ac_try_echo=$ac_try;;
11440esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011444 grep -v '^ *+' conftest.er1 >conftest.err
11445 rm -f conftest.er1
11446 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448 (exit $ac_status); } && {
11449 test -z "$ac_c_werror_flag" ||
11450 test ! -s conftest.err
11451 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011452 ac_hi=$ac_mid
11453else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011455sed 's/^/| /' conftest.$ac_ext >&5
11456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459
11460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011461done
11462case $ac_lo in
11463?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011464'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011465 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011466See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011467echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011468See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011469 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470 else
11471 ac_cv_sizeof_long_long=0
11472 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011473esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011474else
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* confdefs.h. */
11477_ACEOF
11478cat confdefs.h >>conftest.$ac_ext
11479cat >>conftest.$ac_ext <<_ACEOF
11480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011481$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011482 typedef long long ac__type_sizeof_;
11483static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11484static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011485#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011486#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011489{
Martin v. Löwis11437992002-04-12 09:54:03 +000011490
11491 FILE *f = fopen ("conftest.val", "w");
11492 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011494 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011499 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 }
11501 else
11502 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011504 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011506 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011507 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
11510 ;
11511 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011512}
Martin v. Löwis11437992002-04-12 09:54:03 +000011513_ACEOF
11514rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515if { (ac_try="$ac_link"
11516case "(($ac_try" in
11517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11518 *) ac_try_echo=$ac_try;;
11519esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 { (case "(($ac_try" in
11526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11527 *) ac_try_echo=$ac_try;;
11528esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 (exit $ac_status); }; }; then
11534 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011535else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011536 echo "$as_me: program exited with status $ac_status" >&5
11537echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011538sed 's/^/| /' conftest.$ac_ext >&5
11539
Martin v. Löwis11437992002-04-12 09:54:03 +000011540( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011542 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011543See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011544echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011545See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011546 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011547 else
11548 ac_cv_sizeof_long_long=0
11549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551rm -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 +000011552fi
11553rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011554fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011555{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11556echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557
11558
11559
Martin v. Löwis11437992002-04-12 09:54:03 +000011560cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011561#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011562_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011563
Michael W. Hudson54241132001-12-07 15:38:26 +000011564
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565fi
11566
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011567{ echo "$as_me:$LINENO: checking for long double support" >&5
11568echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011569have_long_double=no
11570cat >conftest.$ac_ext <<_ACEOF
11571/* confdefs.h. */
11572_ACEOF
11573cat confdefs.h >>conftest.$ac_ext
11574cat >>conftest.$ac_ext <<_ACEOF
11575/* end confdefs.h. */
11576
11577int
11578main ()
11579{
11580long double x; x = (long double)0;
11581 ;
11582 return 0;
11583}
11584_ACEOF
11585rm -f conftest.$ac_objext
11586if { (ac_try="$ac_compile"
11587case "(($ac_try" in
11588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11589 *) ac_try_echo=$ac_try;;
11590esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011592 (eval "$ac_compile") 2>conftest.er1
11593 ac_status=$?
11594 grep -v '^ *+' conftest.er1 >conftest.err
11595 rm -f conftest.er1
11596 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011598 (exit $ac_status); } && {
11599 test -z "$ac_c_werror_flag" ||
11600 test ! -s conftest.err
11601 } && test -s conftest.$ac_objext; then
11602
11603
11604cat >>confdefs.h <<\_ACEOF
11605#define HAVE_LONG_DOUBLE 1
11606_ACEOF
11607
11608 have_long_double=yes
11609
11610else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011611 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011612sed 's/^/| /' conftest.$ac_ext >&5
11613
11614
11615fi
11616
11617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011618{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11619echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011620if test "$have_long_double" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011621{ echo "$as_me:$LINENO: checking for long double" >&5
11622echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11623if test "${ac_cv_type_long_double+set}" = set; then
11624 echo $ECHO_N "(cached) $ECHO_C" >&6
11625else
11626 cat >conftest.$ac_ext <<_ACEOF
11627/* confdefs.h. */
11628_ACEOF
11629cat confdefs.h >>conftest.$ac_ext
11630cat >>conftest.$ac_ext <<_ACEOF
11631/* end confdefs.h. */
11632$ac_includes_default
11633typedef long double ac__type_new_;
11634int
11635main ()
11636{
11637if ((ac__type_new_ *) 0)
11638 return 0;
11639if (sizeof (ac__type_new_))
11640 return 0;
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext
11646if { (ac_try="$ac_compile"
11647case "(($ac_try" in
11648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11649 *) ac_try_echo=$ac_try;;
11650esac
11651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11652 (eval "$ac_compile") 2>conftest.er1
11653 ac_status=$?
11654 grep -v '^ *+' conftest.er1 >conftest.err
11655 rm -f conftest.er1
11656 cat conftest.err >&5
11657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11658 (exit $ac_status); } && {
11659 test -z "$ac_c_werror_flag" ||
11660 test ! -s conftest.err
11661 } && test -s conftest.$ac_objext; then
11662 ac_cv_type_long_double=yes
11663else
11664 echo "$as_me: failed program was:" >&5
11665sed 's/^/| /' conftest.$ac_ext >&5
11666
11667 ac_cv_type_long_double=no
11668fi
11669
11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671fi
11672{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11673echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11674
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011675# The cast to long int works around a bug in the HP C Compiler
11676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11678# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011679{ echo "$as_me:$LINENO: checking size of long double" >&5
11680echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011681if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011682 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011683else
11684 if test "$cross_compiling" = yes; then
11685 # Depending upon the size, compute the lo and hi bounds.
11686cat >conftest.$ac_ext <<_ACEOF
11687/* confdefs.h. */
11688_ACEOF
11689cat confdefs.h >>conftest.$ac_ext
11690cat >>conftest.$ac_ext <<_ACEOF
11691/* end confdefs.h. */
11692$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011693 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011694int
11695main ()
11696{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011697static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011698test_array [0] = 0
11699
11700 ;
11701 return 0;
11702}
11703_ACEOF
11704rm -f conftest.$ac_objext
11705if { (ac_try="$ac_compile"
11706case "(($ac_try" in
11707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11708 *) ac_try_echo=$ac_try;;
11709esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011711 (eval "$ac_compile") 2>conftest.er1
11712 ac_status=$?
11713 grep -v '^ *+' conftest.er1 >conftest.err
11714 rm -f conftest.er1
11715 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011717 (exit $ac_status); } && {
11718 test -z "$ac_c_werror_flag" ||
11719 test ! -s conftest.err
11720 } && test -s conftest.$ac_objext; then
11721 ac_lo=0 ac_mid=0
11722 while :; do
11723 cat >conftest.$ac_ext <<_ACEOF
11724/* confdefs.h. */
11725_ACEOF
11726cat confdefs.h >>conftest.$ac_ext
11727cat >>conftest.$ac_ext <<_ACEOF
11728/* end confdefs.h. */
11729$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011730 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011731int
11732main ()
11733{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735test_array [0] = 0
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (ac_try="$ac_compile"
11743case "(($ac_try" in
11744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11745 *) ac_try_echo=$ac_try;;
11746esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011748 (eval "$ac_compile") 2>conftest.er1
11749 ac_status=$?
11750 grep -v '^ *+' conftest.er1 >conftest.err
11751 rm -f conftest.er1
11752 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011754 (exit $ac_status); } && {
11755 test -z "$ac_c_werror_flag" ||
11756 test ! -s conftest.err
11757 } && test -s conftest.$ac_objext; then
11758 ac_hi=$ac_mid; break
11759else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011760 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011761sed 's/^/| /' conftest.$ac_ext >&5
11762
11763 ac_lo=`expr $ac_mid + 1`
11764 if test $ac_lo -le $ac_mid; then
11765 ac_lo= ac_hi=
11766 break
11767 fi
11768 ac_mid=`expr 2 '*' $ac_mid + 1`
11769fi
11770
11771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11772 done
11773else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011774 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 cat >conftest.$ac_ext <<_ACEOF
11778/* confdefs.h. */
11779_ACEOF
11780cat confdefs.h >>conftest.$ac_ext
11781cat >>conftest.$ac_ext <<_ACEOF
11782/* end confdefs.h. */
11783$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011784 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011785int
11786main ()
11787{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011788static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011789test_array [0] = 0
11790
11791 ;
11792 return 0;
11793}
11794_ACEOF
11795rm -f conftest.$ac_objext
11796if { (ac_try="$ac_compile"
11797case "(($ac_try" in
11798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11799 *) ac_try_echo=$ac_try;;
11800esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011802 (eval "$ac_compile") 2>conftest.er1
11803 ac_status=$?
11804 grep -v '^ *+' conftest.er1 >conftest.err
11805 rm -f conftest.er1
11806 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011808 (exit $ac_status); } && {
11809 test -z "$ac_c_werror_flag" ||
11810 test ! -s conftest.err
11811 } && test -s conftest.$ac_objext; then
11812 ac_hi=-1 ac_mid=-1
11813 while :; do
11814 cat >conftest.$ac_ext <<_ACEOF
11815/* confdefs.h. */
11816_ACEOF
11817cat confdefs.h >>conftest.$ac_ext
11818cat >>conftest.$ac_ext <<_ACEOF
11819/* end confdefs.h. */
11820$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011821 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011822int
11823main ()
11824{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011825static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011826test_array [0] = 0
11827
11828 ;
11829 return 0;
11830}
11831_ACEOF
11832rm -f conftest.$ac_objext
11833if { (ac_try="$ac_compile"
11834case "(($ac_try" in
11835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11836 *) ac_try_echo=$ac_try;;
11837esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011839 (eval "$ac_compile") 2>conftest.er1
11840 ac_status=$?
11841 grep -v '^ *+' conftest.er1 >conftest.err
11842 rm -f conftest.er1
11843 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845 (exit $ac_status); } && {
11846 test -z "$ac_c_werror_flag" ||
11847 test ! -s conftest.err
11848 } && test -s conftest.$ac_objext; then
11849 ac_lo=$ac_mid; break
11850else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011851 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011852sed 's/^/| /' conftest.$ac_ext >&5
11853
11854 ac_hi=`expr '(' $ac_mid ')' - 1`
11855 if test $ac_mid -le $ac_hi; then
11856 ac_lo= ac_hi=
11857 break
11858 fi
11859 ac_mid=`expr 2 '*' $ac_mid`
11860fi
11861
11862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11863 done
11864else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011865 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866sed 's/^/| /' conftest.$ac_ext >&5
11867
11868 ac_lo= ac_hi=
11869fi
11870
11871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11872fi
11873
11874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11875# Binary search between lo and hi bounds.
11876while test "x$ac_lo" != "x$ac_hi"; do
11877 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11878 cat >conftest.$ac_ext <<_ACEOF
11879/* confdefs.h. */
11880_ACEOF
11881cat confdefs.h >>conftest.$ac_ext
11882cat >>conftest.$ac_ext <<_ACEOF
11883/* end confdefs.h. */
11884$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011885 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011886int
11887main ()
11888{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011890test_array [0] = 0
11891
11892 ;
11893 return 0;
11894}
11895_ACEOF
11896rm -f conftest.$ac_objext
11897if { (ac_try="$ac_compile"
11898case "(($ac_try" in
11899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11900 *) ac_try_echo=$ac_try;;
11901esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011903 (eval "$ac_compile") 2>conftest.er1
11904 ac_status=$?
11905 grep -v '^ *+' conftest.er1 >conftest.err
11906 rm -f conftest.er1
11907 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011909 (exit $ac_status); } && {
11910 test -z "$ac_c_werror_flag" ||
11911 test ! -s conftest.err
11912 } && test -s conftest.$ac_objext; then
11913 ac_hi=$ac_mid
11914else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011915 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011916sed 's/^/| /' conftest.$ac_ext >&5
11917
11918 ac_lo=`expr '(' $ac_mid ')' + 1`
11919fi
11920
11921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11922done
11923case $ac_lo in
11924?*) ac_cv_sizeof_long_double=$ac_lo;;
11925'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011927See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011928echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011929See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011930 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011931 else
11932 ac_cv_sizeof_long_double=0
11933 fi ;;
11934esac
11935else
11936 cat >conftest.$ac_ext <<_ACEOF
11937/* confdefs.h. */
11938_ACEOF
11939cat confdefs.h >>conftest.$ac_ext
11940cat >>conftest.$ac_ext <<_ACEOF
11941/* end confdefs.h. */
11942$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011943 typedef long double ac__type_sizeof_;
11944static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11945static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011946#include <stdio.h>
11947#include <stdlib.h>
11948int
11949main ()
11950{
11951
11952 FILE *f = fopen ("conftest.val", "w");
11953 if (! f)
11954 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956 {
11957 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011958 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011959 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011960 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 }
11962 else
11963 {
11964 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011965 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011967 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011968 }
11969 return ferror (f) || fclose (f) != 0;
11970
11971 ;
11972 return 0;
11973}
11974_ACEOF
11975rm -f conftest$ac_exeext
11976if { (ac_try="$ac_link"
11977case "(($ac_try" in
11978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11979 *) ac_try_echo=$ac_try;;
11980esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011982 (eval "$ac_link") 2>&5
11983 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011985 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11986 { (case "(($ac_try" in
11987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11988 *) ac_try_echo=$ac_try;;
11989esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011991 (eval "$ac_try") 2>&5
11992 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994 (exit $ac_status); }; }; then
11995 ac_cv_sizeof_long_double=`cat conftest.val`
11996else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011997 echo "$as_me: program exited with status $ac_status" >&5
11998echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999sed 's/^/| /' conftest.$ac_ext >&5
12000
12001( exit $ac_status )
12002if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012003 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012005echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012006See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012007 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008 else
12009 ac_cv_sizeof_long_double=0
12010 fi
12011fi
12012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12013fi
12014rm -f conftest.val
12015fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012016{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12017echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018
12019
12020
12021cat >>confdefs.h <<_ACEOF
12022#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12023_ACEOF
12024
12025
12026fi
12027
12028
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012029{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12030echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012031have_c99_bool=no
12032cat >conftest.$ac_ext <<_ACEOF
12033/* confdefs.h. */
12034_ACEOF
12035cat confdefs.h >>conftest.$ac_ext
12036cat >>conftest.$ac_ext <<_ACEOF
12037/* end confdefs.h. */
12038
12039int
12040main ()
12041{
12042_Bool x; x = (_Bool)0;
12043 ;
12044 return 0;
12045}
12046_ACEOF
12047rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048if { (ac_try="$ac_compile"
12049case "(($ac_try" in
12050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12051 *) ac_try_echo=$ac_try;;
12052esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012055 ac_status=$?
12056 grep -v '^ *+' conftest.er1 >conftest.err
12057 rm -f conftest.er1
12058 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060 (exit $ac_status); } && {
12061 test -z "$ac_c_werror_flag" ||
12062 test ! -s conftest.err
12063 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012064
12065
12066cat >>confdefs.h <<\_ACEOF
12067#define HAVE_C99_BOOL 1
12068_ACEOF
12069
12070 have_c99_bool=yes
12071
12072else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012073 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012074sed 's/^/| /' conftest.$ac_ext >&5
12075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012076
Thomas Woutersb2137042007-02-01 18:02:27 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078
12079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012080{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12081echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012082if test "$have_c99_bool" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012083{ echo "$as_me:$LINENO: checking for _Bool" >&5
12084echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12085if test "${ac_cv_type__Bool+set}" = set; then
12086 echo $ECHO_N "(cached) $ECHO_C" >&6
12087else
12088 cat >conftest.$ac_ext <<_ACEOF
12089/* confdefs.h. */
12090_ACEOF
12091cat confdefs.h >>conftest.$ac_ext
12092cat >>conftest.$ac_ext <<_ACEOF
12093/* end confdefs.h. */
12094$ac_includes_default
12095typedef _Bool ac__type_new_;
12096int
12097main ()
12098{
12099if ((ac__type_new_ *) 0)
12100 return 0;
12101if (sizeof (ac__type_new_))
12102 return 0;
12103 ;
12104 return 0;
12105}
12106_ACEOF
12107rm -f conftest.$ac_objext
12108if { (ac_try="$ac_compile"
12109case "(($ac_try" in
12110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12111 *) ac_try_echo=$ac_try;;
12112esac
12113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12114 (eval "$ac_compile") 2>conftest.er1
12115 ac_status=$?
12116 grep -v '^ *+' conftest.er1 >conftest.err
12117 rm -f conftest.er1
12118 cat conftest.err >&5
12119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12120 (exit $ac_status); } && {
12121 test -z "$ac_c_werror_flag" ||
12122 test ! -s conftest.err
12123 } && test -s conftest.$ac_objext; then
12124 ac_cv_type__Bool=yes
12125else
12126 echo "$as_me: failed program was:" >&5
12127sed 's/^/| /' conftest.$ac_ext >&5
12128
12129 ac_cv_type__Bool=no
12130fi
12131
12132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12133fi
12134{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12135echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137# The cast to long int works around a bug in the HP C Compiler
12138# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12139# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12140# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012141{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12142echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012143if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012144 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012145else
12146 if test "$cross_compiling" = yes; then
12147 # Depending upon the size, compute the lo and hi bounds.
12148cat >conftest.$ac_ext <<_ACEOF
12149/* confdefs.h. */
12150_ACEOF
12151cat confdefs.h >>conftest.$ac_ext
12152cat >>conftest.$ac_ext <<_ACEOF
12153/* end confdefs.h. */
12154$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012155 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012156int
12157main ()
12158{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012159static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012160test_array [0] = 0
12161
12162 ;
12163 return 0;
12164}
12165_ACEOF
12166rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167if { (ac_try="$ac_compile"
12168case "(($ac_try" in
12169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12170 *) ac_try_echo=$ac_try;;
12171esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012174 ac_status=$?
12175 grep -v '^ *+' conftest.er1 >conftest.err
12176 rm -f conftest.er1
12177 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012179 (exit $ac_status); } && {
12180 test -z "$ac_c_werror_flag" ||
12181 test ! -s conftest.err
12182 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012183 ac_lo=0 ac_mid=0
12184 while :; do
12185 cat >conftest.$ac_ext <<_ACEOF
12186/* confdefs.h. */
12187_ACEOF
12188cat confdefs.h >>conftest.$ac_ext
12189cat >>conftest.$ac_ext <<_ACEOF
12190/* end confdefs.h. */
12191$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012192 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012193int
12194main ()
12195{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012196static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012197test_array [0] = 0
12198
12199 ;
12200 return 0;
12201}
12202_ACEOF
12203rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204if { (ac_try="$ac_compile"
12205case "(($ac_try" in
12206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12207 *) ac_try_echo=$ac_try;;
12208esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012211 ac_status=$?
12212 grep -v '^ *+' conftest.er1 >conftest.err
12213 rm -f conftest.er1
12214 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 (exit $ac_status); } && {
12217 test -z "$ac_c_werror_flag" ||
12218 test ! -s conftest.err
12219 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012220 ac_hi=$ac_mid; break
12221else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012222 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012223sed 's/^/| /' conftest.$ac_ext >&5
12224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225 ac_lo=`expr $ac_mid + 1`
12226 if test $ac_lo -le $ac_mid; then
12227 ac_lo= ac_hi=
12228 break
12229 fi
12230 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232
12233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012234 done
12235else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012236 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012237sed 's/^/| /' conftest.$ac_ext >&5
12238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012240/* confdefs.h. */
12241_ACEOF
12242cat confdefs.h >>conftest.$ac_ext
12243cat >>conftest.$ac_ext <<_ACEOF
12244/* end confdefs.h. */
12245$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012246 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012247int
12248main ()
12249{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012250static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012251test_array [0] = 0
12252
12253 ;
12254 return 0;
12255}
12256_ACEOF
12257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258if { (ac_try="$ac_compile"
12259case "(($ac_try" in
12260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12261 *) ac_try_echo=$ac_try;;
12262esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012265 ac_status=$?
12266 grep -v '^ *+' conftest.er1 >conftest.err
12267 rm -f conftest.er1
12268 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270 (exit $ac_status); } && {
12271 test -z "$ac_c_werror_flag" ||
12272 test ! -s conftest.err
12273 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012274 ac_hi=-1 ac_mid=-1
12275 while :; do
12276 cat >conftest.$ac_ext <<_ACEOF
12277/* confdefs.h. */
12278_ACEOF
12279cat confdefs.h >>conftest.$ac_ext
12280cat >>conftest.$ac_ext <<_ACEOF
12281/* end confdefs.h. */
12282$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012283 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012284int
12285main ()
12286{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012288test_array [0] = 0
12289
12290 ;
12291 return 0;
12292}
12293_ACEOF
12294rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012295if { (ac_try="$ac_compile"
12296case "(($ac_try" in
12297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12298 *) ac_try_echo=$ac_try;;
12299esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012302 ac_status=$?
12303 grep -v '^ *+' conftest.er1 >conftest.err
12304 rm -f conftest.er1
12305 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307 (exit $ac_status); } && {
12308 test -z "$ac_c_werror_flag" ||
12309 test ! -s conftest.err
12310 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012311 ac_lo=$ac_mid; break
12312else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012313 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012314sed 's/^/| /' conftest.$ac_ext >&5
12315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316 ac_hi=`expr '(' $ac_mid ')' - 1`
12317 if test $ac_mid -le $ac_hi; then
12318 ac_lo= ac_hi=
12319 break
12320 fi
12321 ac_mid=`expr 2 '*' $ac_mid`
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 +000012325 done
12326else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012327 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012328sed 's/^/| /' conftest.$ac_ext >&5
12329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012332
12333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335
12336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012337# Binary search between lo and hi bounds.
12338while test "x$ac_lo" != "x$ac_hi"; do
12339 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12340 cat >conftest.$ac_ext <<_ACEOF
12341/* confdefs.h. */
12342_ACEOF
12343cat confdefs.h >>conftest.$ac_ext
12344cat >>conftest.$ac_ext <<_ACEOF
12345/* end confdefs.h. */
12346$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012347 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012348int
12349main ()
12350{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012352test_array [0] = 0
12353
12354 ;
12355 return 0;
12356}
12357_ACEOF
12358rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359if { (ac_try="$ac_compile"
12360case "(($ac_try" in
12361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12362 *) ac_try_echo=$ac_try;;
12363esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012365 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012366 ac_status=$?
12367 grep -v '^ *+' conftest.er1 >conftest.err
12368 rm -f conftest.er1
12369 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371 (exit $ac_status); } && {
12372 test -z "$ac_c_werror_flag" ||
12373 test ! -s conftest.err
12374 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012375 ac_hi=$ac_mid
12376else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012377 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012378sed 's/^/| /' conftest.$ac_ext >&5
12379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382
12383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012384done
12385case $ac_lo in
12386?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012387'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012388 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012389See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012390echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012391See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012392 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393 else
12394 ac_cv_sizeof__Bool=0
12395 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012396esac
12397else
12398 cat >conftest.$ac_ext <<_ACEOF
12399/* confdefs.h. */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h. */
12404$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012405 typedef _Bool ac__type_sizeof_;
12406static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12407static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012408#include <stdio.h>
12409#include <stdlib.h>
12410int
12411main ()
12412{
12413
12414 FILE *f = fopen ("conftest.val", "w");
12415 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012417 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012418 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012420 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012422 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012423 }
12424 else
12425 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012427 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012429 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012430 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012432
12433 ;
12434 return 0;
12435}
12436_ACEOF
12437rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438if { (ac_try="$ac_link"
12439case "(($ac_try" in
12440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12441 *) ac_try_echo=$ac_try;;
12442esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012445 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012447 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 { (case "(($ac_try" in
12449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12450 *) ac_try_echo=$ac_try;;
12451esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012454 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012456 (exit $ac_status); }; }; then
12457 ac_cv_sizeof__Bool=`cat conftest.val`
12458else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012459 echo "$as_me: program exited with status $ac_status" >&5
12460echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012461sed 's/^/| /' conftest.$ac_ext >&5
12462
12463( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012465 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012466See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012467echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012468See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012469 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012470 else
12471 ac_cv_sizeof__Bool=0
12472 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474rm -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 +000012475fi
12476rm -f conftest.val
12477fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012478{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12479echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480
12481
12482
Thomas Woutersb2137042007-02-01 18:02:27 +000012483cat >>confdefs.h <<_ACEOF
12484#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12485_ACEOF
12486
12487
12488fi
12489
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012490{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12491echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012492if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012493 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012494else
12495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* confdefs.h. */
12497_ACEOF
12498cat confdefs.h >>conftest.$ac_ext
12499cat >>conftest.$ac_ext <<_ACEOF
12500/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012501#ifdef HAVE_STDINT_H
12502 #include <stdint.h>
12503 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012504
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012505typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012506int
12507main ()
12508{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012509if ((ac__type_new_ *) 0)
12510 return 0;
12511if (sizeof (ac__type_new_))
12512 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 ;
12514 return 0;
12515}
12516_ACEOF
12517rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518if { (ac_try="$ac_compile"
12519case "(($ac_try" in
12520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12521 *) ac_try_echo=$ac_try;;
12522esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012524 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012526 grep -v '^ *+' conftest.er1 >conftest.err
12527 rm -f conftest.er1
12528 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530 (exit $ac_status); } && {
12531 test -z "$ac_c_werror_flag" ||
12532 test ! -s conftest.err
12533 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012534 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012535else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012537sed 's/^/| /' conftest.$ac_ext >&5
12538
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012539 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541
12542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012543fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012544{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12545echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12546if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012547
12548cat >>confdefs.h <<_ACEOF
12549#define HAVE_UINTPTR_T 1
12550_ACEOF
12551
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012552{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12553echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12554if test "${ac_cv_type_uintptr_t+set}" = set; then
12555 echo $ECHO_N "(cached) $ECHO_C" >&6
12556else
12557 cat >conftest.$ac_ext <<_ACEOF
12558/* confdefs.h. */
12559_ACEOF
12560cat confdefs.h >>conftest.$ac_ext
12561cat >>conftest.$ac_ext <<_ACEOF
12562/* end confdefs.h. */
12563$ac_includes_default
12564typedef uintptr_t ac__type_new_;
12565int
12566main ()
12567{
12568if ((ac__type_new_ *) 0)
12569 return 0;
12570if (sizeof (ac__type_new_))
12571 return 0;
12572 ;
12573 return 0;
12574}
12575_ACEOF
12576rm -f conftest.$ac_objext
12577if { (ac_try="$ac_compile"
12578case "(($ac_try" in
12579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12580 *) ac_try_echo=$ac_try;;
12581esac
12582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12583 (eval "$ac_compile") 2>conftest.er1
12584 ac_status=$?
12585 grep -v '^ *+' conftest.er1 >conftest.err
12586 rm -f conftest.er1
12587 cat conftest.err >&5
12588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12589 (exit $ac_status); } && {
12590 test -z "$ac_c_werror_flag" ||
12591 test ! -s conftest.err
12592 } && test -s conftest.$ac_objext; then
12593 ac_cv_type_uintptr_t=yes
12594else
12595 echo "$as_me: failed program was:" >&5
12596sed 's/^/| /' conftest.$ac_ext >&5
12597
12598 ac_cv_type_uintptr_t=no
12599fi
12600
12601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602fi
12603{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12604echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012606# The cast to long int works around a bug in the HP C Compiler
12607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12609# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012610{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12611echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012612if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012613 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 if test "$cross_compiling" = yes; then
12616 # Depending upon the size, compute the lo and hi bounds.
12617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* confdefs.h. */
12619_ACEOF
12620cat confdefs.h >>conftest.$ac_ext
12621cat >>conftest.$ac_ext <<_ACEOF
12622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012623$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012624 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012625int
12626main ()
12627{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012628static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012629test_array [0] = 0
12630
12631 ;
12632 return 0;
12633}
12634_ACEOF
12635rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636if { (ac_try="$ac_compile"
12637case "(($ac_try" in
12638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12639 *) ac_try_echo=$ac_try;;
12640esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012644 grep -v '^ *+' conftest.er1 >conftest.err
12645 rm -f conftest.er1
12646 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648 (exit $ac_status); } && {
12649 test -z "$ac_c_werror_flag" ||
12650 test ! -s conftest.err
12651 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 ac_lo=0 ac_mid=0
12653 while :; do
12654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* confdefs.h. */
12656_ACEOF
12657cat confdefs.h >>conftest.$ac_ext
12658cat >>conftest.$ac_ext <<_ACEOF
12659/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012660$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012661 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012662int
12663main ()
12664{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012665static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012666test_array [0] = 0
12667
12668 ;
12669 return 0;
12670}
12671_ACEOF
12672rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673if { (ac_try="$ac_compile"
12674case "(($ac_try" in
12675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12676 *) ac_try_echo=$ac_try;;
12677esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012681 grep -v '^ *+' conftest.er1 >conftest.err
12682 rm -f conftest.er1
12683 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 (exit $ac_status); } && {
12686 test -z "$ac_c_werror_flag" ||
12687 test ! -s conftest.err
12688 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012689 ac_hi=$ac_mid; break
12690else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012692sed 's/^/| /' conftest.$ac_ext >&5
12693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694 ac_lo=`expr $ac_mid + 1`
12695 if test $ac_lo -le $ac_mid; then
12696 ac_lo= ac_hi=
12697 break
12698 fi
12699 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701
12702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 done
12704else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012706sed 's/^/| /' conftest.$ac_ext >&5
12707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012709/* confdefs.h. */
12710_ACEOF
12711cat confdefs.h >>conftest.$ac_ext
12712cat >>conftest.$ac_ext <<_ACEOF
12713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012714$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012715 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012716int
12717main ()
12718{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012719static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012720test_array [0] = 0
12721
12722 ;
12723 return 0;
12724}
12725_ACEOF
12726rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727if { (ac_try="$ac_compile"
12728case "(($ac_try" in
12729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12730 *) ac_try_echo=$ac_try;;
12731esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012735 grep -v '^ *+' conftest.er1 >conftest.err
12736 rm -f conftest.er1
12737 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739 (exit $ac_status); } && {
12740 test -z "$ac_c_werror_flag" ||
12741 test ! -s conftest.err
12742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 ac_hi=-1 ac_mid=-1
12744 while :; do
12745 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* confdefs.h. */
12747_ACEOF
12748cat confdefs.h >>conftest.$ac_ext
12749cat >>conftest.$ac_ext <<_ACEOF
12750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012751$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012752 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012753int
12754main ()
12755{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012756static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012757test_array [0] = 0
12758
12759 ;
12760 return 0;
12761}
12762_ACEOF
12763rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764if { (ac_try="$ac_compile"
12765case "(($ac_try" in
12766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12767 *) ac_try_echo=$ac_try;;
12768esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012772 grep -v '^ *+' conftest.er1 >conftest.err
12773 rm -f conftest.er1
12774 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776 (exit $ac_status); } && {
12777 test -z "$ac_c_werror_flag" ||
12778 test ! -s conftest.err
12779 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012780 ac_lo=$ac_mid; break
12781else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012783sed 's/^/| /' conftest.$ac_ext >&5
12784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012785 ac_hi=`expr '(' $ac_mid ')' - 1`
12786 if test $ac_mid -le $ac_hi; then
12787 ac_lo= ac_hi=
12788 break
12789 fi
12790 ac_mid=`expr 2 '*' $ac_mid`
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 +000012794 done
12795else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012796 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012797sed 's/^/| /' conftest.$ac_ext >&5
12798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801
12802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804
12805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012806# Binary search between lo and hi bounds.
12807while test "x$ac_lo" != "x$ac_hi"; do
12808 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012815$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012816 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012817int
12818main ()
12819{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012821test_array [0] = 0
12822
12823 ;
12824 return 0;
12825}
12826_ACEOF
12827rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828if { (ac_try="$ac_compile"
12829case "(($ac_try" in
12830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12831 *) ac_try_echo=$ac_try;;
12832esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012836 grep -v '^ *+' conftest.er1 >conftest.err
12837 rm -f conftest.er1
12838 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012840 (exit $ac_status); } && {
12841 test -z "$ac_c_werror_flag" ||
12842 test ! -s conftest.err
12843 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ac_hi=$ac_mid
12845else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012847sed 's/^/| /' conftest.$ac_ext >&5
12848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012849 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851
12852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012853done
12854case $ac_lo in
12855?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012857 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012858See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012859echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012860See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012861 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012862 else
12863 ac_cv_sizeof_uintptr_t=0
12864 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012865esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012866else
Martin v. Löwis11437992002-04-12 09:54:03 +000012867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012868/* confdefs.h. */
12869_ACEOF
12870cat confdefs.h >>conftest.$ac_ext
12871cat >>conftest.$ac_ext <<_ACEOF
12872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012873$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012874 typedef uintptr_t ac__type_sizeof_;
12875static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12876static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012878#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012879int
12880main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012881{
Martin v. Löwis11437992002-04-12 09:54:03 +000012882
12883 FILE *f = fopen ("conftest.val", "w");
12884 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012886 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012889 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012891 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012892 }
12893 else
12894 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012896 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012898 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012899 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012901
12902 ;
12903 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012904}
Martin v. Löwis11437992002-04-12 09:54:03 +000012905_ACEOF
12906rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907if { (ac_try="$ac_link"
12908case "(($ac_try" in
12909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12910 *) ac_try_echo=$ac_try;;
12911esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 { (case "(($ac_try" in
12918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12919 *) ac_try_echo=$ac_try;;
12920esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012923 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012925 (exit $ac_status); }; }; then
12926 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012927else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012928 echo "$as_me: program exited with status $ac_status" >&5
12929echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012930sed 's/^/| /' conftest.$ac_ext >&5
12931
Martin v. Löwis11437992002-04-12 09:54:03 +000012932( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012934 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012935See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012936echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012937See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012938 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939 else
12940 ac_cv_sizeof_uintptr_t=0
12941 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943rm -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 +000012944fi
12945rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012946fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012947{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12948echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949
12950
12951
Martin v. Löwis11437992002-04-12 09:54:03 +000012952cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012953#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012954_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012955
Michael W. Hudson54241132001-12-07 15:38:26 +000012956
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012957fi
12958
Thomas Wouters89f507f2006-12-13 04:49:30 +000012959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012960{ echo "$as_me:$LINENO: checking for off_t" >&5
12961echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12962if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012963 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012964else
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* confdefs.h. */
12967_ACEOF
12968cat confdefs.h >>conftest.$ac_ext
12969cat >>conftest.$ac_ext <<_ACEOF
12970/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012971
12972#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012973#include <sys/types.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012974#endif
12975
12976
12977typedef off_t ac__type_new_;
12978int
12979main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012980{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012981if ((ac__type_new_ *) 0)
12982 return 0;
12983if (sizeof (ac__type_new_))
12984 return 0;
12985 ;
12986 return 0;
12987}
12988_ACEOF
12989rm -f conftest.$ac_objext
12990if { (ac_try="$ac_compile"
12991case "(($ac_try" in
12992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12993 *) ac_try_echo=$ac_try;;
12994esac
12995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12996 (eval "$ac_compile") 2>conftest.er1
12997 ac_status=$?
12998 grep -v '^ *+' conftest.er1 >conftest.err
12999 rm -f conftest.er1
13000 cat conftest.err >&5
13001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002 (exit $ac_status); } && {
13003 test -z "$ac_c_werror_flag" ||
13004 test ! -s conftest.err
13005 } && test -s conftest.$ac_objext; then
13006 ac_cv_type_off_t=yes
13007else
13008 echo "$as_me: failed program was:" >&5
13009sed 's/^/| /' conftest.$ac_ext >&5
13010
13011 ac_cv_type_off_t=no
13012fi
13013
13014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13015fi
13016{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13017echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13018
13019# The cast to long int works around a bug in the HP C Compiler
13020# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13021# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13022# This bug is HP SR number 8606223364.
13023{ echo "$as_me:$LINENO: checking size of off_t" >&5
13024echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13025if test "${ac_cv_sizeof_off_t+set}" = set; then
13026 echo $ECHO_N "(cached) $ECHO_C" >&6
13027else
13028 if test "$cross_compiling" = yes; then
13029 # Depending upon the size, compute the lo and hi bounds.
13030cat >conftest.$ac_ext <<_ACEOF
13031/* confdefs.h. */
13032_ACEOF
13033cat confdefs.h >>conftest.$ac_ext
13034cat >>conftest.$ac_ext <<_ACEOF
13035/* end confdefs.h. */
13036
13037#ifdef HAVE_SYS_TYPES_H
13038#include <sys/types.h>
13039#endif
13040
13041
13042 typedef off_t ac__type_sizeof_;
13043int
13044main ()
13045{
13046static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13047test_array [0] = 0
13048
13049 ;
13050 return 0;
13051}
13052_ACEOF
13053rm -f conftest.$ac_objext
13054if { (ac_try="$ac_compile"
13055case "(($ac_try" in
13056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13057 *) ac_try_echo=$ac_try;;
13058esac
13059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13060 (eval "$ac_compile") 2>conftest.er1
13061 ac_status=$?
13062 grep -v '^ *+' conftest.er1 >conftest.err
13063 rm -f conftest.er1
13064 cat conftest.err >&5
13065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13066 (exit $ac_status); } && {
13067 test -z "$ac_c_werror_flag" ||
13068 test ! -s conftest.err
13069 } && test -s conftest.$ac_objext; then
13070 ac_lo=0 ac_mid=0
13071 while :; do
13072 cat >conftest.$ac_ext <<_ACEOF
13073/* confdefs.h. */
13074_ACEOF
13075cat confdefs.h >>conftest.$ac_ext
13076cat >>conftest.$ac_ext <<_ACEOF
13077/* end confdefs.h. */
13078
13079#ifdef HAVE_SYS_TYPES_H
13080#include <sys/types.h>
13081#endif
13082
13083
13084 typedef off_t ac__type_sizeof_;
13085int
13086main ()
13087{
13088static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13089test_array [0] = 0
13090
13091 ;
13092 return 0;
13093}
13094_ACEOF
13095rm -f conftest.$ac_objext
13096if { (ac_try="$ac_compile"
13097case "(($ac_try" in
13098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13099 *) ac_try_echo=$ac_try;;
13100esac
13101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13102 (eval "$ac_compile") 2>conftest.er1
13103 ac_status=$?
13104 grep -v '^ *+' conftest.er1 >conftest.err
13105 rm -f conftest.er1
13106 cat conftest.err >&5
13107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); } && {
13109 test -z "$ac_c_werror_flag" ||
13110 test ! -s conftest.err
13111 } && test -s conftest.$ac_objext; then
13112 ac_hi=$ac_mid; break
13113else
13114 echo "$as_me: failed program was:" >&5
13115sed 's/^/| /' conftest.$ac_ext >&5
13116
13117 ac_lo=`expr $ac_mid + 1`
13118 if test $ac_lo -le $ac_mid; then
13119 ac_lo= ac_hi=
13120 break
13121 fi
13122 ac_mid=`expr 2 '*' $ac_mid + 1`
13123fi
13124
13125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13126 done
13127else
13128 echo "$as_me: failed program was:" >&5
13129sed 's/^/| /' conftest.$ac_ext >&5
13130
13131 cat >conftest.$ac_ext <<_ACEOF
13132/* confdefs.h. */
13133_ACEOF
13134cat confdefs.h >>conftest.$ac_ext
13135cat >>conftest.$ac_ext <<_ACEOF
13136/* end confdefs.h. */
13137
13138#ifdef HAVE_SYS_TYPES_H
13139#include <sys/types.h>
13140#endif
13141
13142
13143 typedef off_t ac__type_sizeof_;
13144int
13145main ()
13146{
13147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13148test_array [0] = 0
13149
13150 ;
13151 return 0;
13152}
13153_ACEOF
13154rm -f conftest.$ac_objext
13155if { (ac_try="$ac_compile"
13156case "(($ac_try" in
13157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13158 *) ac_try_echo=$ac_try;;
13159esac
13160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13161 (eval "$ac_compile") 2>conftest.er1
13162 ac_status=$?
13163 grep -v '^ *+' conftest.er1 >conftest.err
13164 rm -f conftest.er1
13165 cat conftest.err >&5
13166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13167 (exit $ac_status); } && {
13168 test -z "$ac_c_werror_flag" ||
13169 test ! -s conftest.err
13170 } && test -s conftest.$ac_objext; then
13171 ac_hi=-1 ac_mid=-1
13172 while :; do
13173 cat >conftest.$ac_ext <<_ACEOF
13174/* confdefs.h. */
13175_ACEOF
13176cat confdefs.h >>conftest.$ac_ext
13177cat >>conftest.$ac_ext <<_ACEOF
13178/* end confdefs.h. */
13179
13180#ifdef HAVE_SYS_TYPES_H
13181#include <sys/types.h>
13182#endif
13183
13184
13185 typedef off_t ac__type_sizeof_;
13186int
13187main ()
13188{
13189static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13190test_array [0] = 0
13191
13192 ;
13193 return 0;
13194}
13195_ACEOF
13196rm -f conftest.$ac_objext
13197if { (ac_try="$ac_compile"
13198case "(($ac_try" in
13199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13200 *) ac_try_echo=$ac_try;;
13201esac
13202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13203 (eval "$ac_compile") 2>conftest.er1
13204 ac_status=$?
13205 grep -v '^ *+' conftest.er1 >conftest.err
13206 rm -f conftest.er1
13207 cat conftest.err >&5
13208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13209 (exit $ac_status); } && {
13210 test -z "$ac_c_werror_flag" ||
13211 test ! -s conftest.err
13212 } && test -s conftest.$ac_objext; then
13213 ac_lo=$ac_mid; break
13214else
13215 echo "$as_me: failed program was:" >&5
13216sed 's/^/| /' conftest.$ac_ext >&5
13217
13218 ac_hi=`expr '(' $ac_mid ')' - 1`
13219 if test $ac_mid -le $ac_hi; then
13220 ac_lo= ac_hi=
13221 break
13222 fi
13223 ac_mid=`expr 2 '*' $ac_mid`
13224fi
13225
13226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13227 done
13228else
13229 echo "$as_me: failed program was:" >&5
13230sed 's/^/| /' conftest.$ac_ext >&5
13231
13232 ac_lo= ac_hi=
13233fi
13234
13235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236fi
13237
13238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13239# Binary search between lo and hi bounds.
13240while test "x$ac_lo" != "x$ac_hi"; do
13241 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13242 cat >conftest.$ac_ext <<_ACEOF
13243/* confdefs.h. */
13244_ACEOF
13245cat confdefs.h >>conftest.$ac_ext
13246cat >>conftest.$ac_ext <<_ACEOF
13247/* end confdefs.h. */
13248
13249#ifdef HAVE_SYS_TYPES_H
13250#include <sys/types.h>
13251#endif
13252
13253
13254 typedef off_t ac__type_sizeof_;
13255int
13256main ()
13257{
13258static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13259test_array [0] = 0
13260
13261 ;
13262 return 0;
13263}
13264_ACEOF
13265rm -f conftest.$ac_objext
13266if { (ac_try="$ac_compile"
13267case "(($ac_try" in
13268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13269 *) ac_try_echo=$ac_try;;
13270esac
13271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13272 (eval "$ac_compile") 2>conftest.er1
13273 ac_status=$?
13274 grep -v '^ *+' conftest.er1 >conftest.err
13275 rm -f conftest.er1
13276 cat conftest.err >&5
13277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13278 (exit $ac_status); } && {
13279 test -z "$ac_c_werror_flag" ||
13280 test ! -s conftest.err
13281 } && test -s conftest.$ac_objext; then
13282 ac_hi=$ac_mid
13283else
13284 echo "$as_me: failed program was:" >&5
13285sed 's/^/| /' conftest.$ac_ext >&5
13286
13287 ac_lo=`expr '(' $ac_mid ')' + 1`
13288fi
13289
13290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13291done
13292case $ac_lo in
13293?*) ac_cv_sizeof_off_t=$ac_lo;;
13294'') if test "$ac_cv_type_off_t" = yes; then
13295 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13296See \`config.log' for more details." >&5
13297echo "$as_me: error: cannot compute sizeof (off_t)
13298See \`config.log' for more details." >&2;}
13299 { (exit 77); exit 77; }; }
13300 else
13301 ac_cv_sizeof_off_t=0
13302 fi ;;
13303esac
13304else
13305 cat >conftest.$ac_ext <<_ACEOF
13306/* confdefs.h. */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h. */
13311
13312#ifdef HAVE_SYS_TYPES_H
13313#include <sys/types.h>
13314#endif
13315
13316
13317 typedef off_t ac__type_sizeof_;
13318static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13319static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13320#include <stdio.h>
13321#include <stdlib.h>
13322int
13323main ()
13324{
13325
13326 FILE *f = fopen ("conftest.val", "w");
13327 if (! f)
13328 return 1;
13329 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13330 {
13331 long int i = longval ();
13332 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13333 return 1;
13334 fprintf (f, "%ld\n", i);
13335 }
13336 else
13337 {
13338 unsigned long int i = ulongval ();
13339 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13340 return 1;
13341 fprintf (f, "%lu\n", i);
13342 }
13343 return ferror (f) || fclose (f) != 0;
13344
13345 ;
13346 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013347}
Martin v. Löwis11437992002-04-12 09:54:03 +000013348_ACEOF
13349rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350if { (ac_try="$ac_link"
13351case "(($ac_try" in
13352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13353 *) ac_try_echo=$ac_try;;
13354esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360 { (case "(($ac_try" in
13361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13362 *) ac_try_echo=$ac_try;;
13363esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013366 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013369 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013370else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013371 echo "$as_me: program exited with status $ac_status" >&5
13372echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013373sed 's/^/| /' conftest.$ac_ext >&5
13374
Martin v. Löwis11437992002-04-12 09:54:03 +000013375( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013376if test "$ac_cv_type_off_t" = yes; then
13377 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13378See \`config.log' for more details." >&5
13379echo "$as_me: error: cannot compute sizeof (off_t)
13380See \`config.log' for more details." >&2;}
13381 { (exit 77); exit 77; }; }
13382 else
13383 ac_cv_sizeof_off_t=0
13384 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -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 +000013387fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013388rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013389fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013390{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13391echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013393
13394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013396#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013397_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013398
Michael W. Hudson54241132001-12-07 15:38:26 +000013399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013400
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013401{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13402echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013403if test "$have_long_long" = yes -a \
13404 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13405 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407cat >>confdefs.h <<\_ACEOF
13408#define HAVE_LARGEFILE_SUPPORT 1
13409_ACEOF
13410
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013411 { echo "$as_me:$LINENO: result: yes" >&5
13412echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013413else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013414 { echo "$as_me:$LINENO: result: no" >&5
13415echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013416fi
13417
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013418{ echo "$as_me:$LINENO: checking for time_t" >&5
13419echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13420if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013422else
Martin v. Löwis11437992002-04-12 09:54:03 +000013423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013424/* confdefs.h. */
13425_ACEOF
13426cat confdefs.h >>conftest.$ac_ext
13427cat >>conftest.$ac_ext <<_ACEOF
13428/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013429
13430#ifdef HAVE_SYS_TYPES_H
13431#include <sys/types.h>
13432#endif
13433#ifdef HAVE_TIME_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013434#include <time.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013435#endif
13436
13437
13438typedef time_t ac__type_new_;
13439int
13440main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013441{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013442if ((ac__type_new_ *) 0)
13443 return 0;
13444if (sizeof (ac__type_new_))
13445 return 0;
13446 ;
13447 return 0;
13448}
13449_ACEOF
13450rm -f conftest.$ac_objext
13451if { (ac_try="$ac_compile"
13452case "(($ac_try" in
13453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13454 *) ac_try_echo=$ac_try;;
13455esac
13456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13457 (eval "$ac_compile") 2>conftest.er1
13458 ac_status=$?
13459 grep -v '^ *+' conftest.er1 >conftest.err
13460 rm -f conftest.er1
13461 cat conftest.err >&5
13462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13463 (exit $ac_status); } && {
13464 test -z "$ac_c_werror_flag" ||
13465 test ! -s conftest.err
13466 } && test -s conftest.$ac_objext; then
13467 ac_cv_type_time_t=yes
13468else
13469 echo "$as_me: failed program was:" >&5
13470sed 's/^/| /' conftest.$ac_ext >&5
13471
13472 ac_cv_type_time_t=no
13473fi
13474
13475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13476fi
13477{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13478echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13479
13480# The cast to long int works around a bug in the HP C Compiler
13481# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13482# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13483# This bug is HP SR number 8606223364.
13484{ echo "$as_me:$LINENO: checking size of time_t" >&5
13485echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13486if test "${ac_cv_sizeof_time_t+set}" = set; then
13487 echo $ECHO_N "(cached) $ECHO_C" >&6
13488else
13489 if test "$cross_compiling" = yes; then
13490 # Depending upon the size, compute the lo and hi bounds.
13491cat >conftest.$ac_ext <<_ACEOF
13492/* confdefs.h. */
13493_ACEOF
13494cat confdefs.h >>conftest.$ac_ext
13495cat >>conftest.$ac_ext <<_ACEOF
13496/* end confdefs.h. */
13497
13498#ifdef HAVE_SYS_TYPES_H
13499#include <sys/types.h>
13500#endif
13501#ifdef HAVE_TIME_H
13502#include <time.h>
13503#endif
13504
13505
13506 typedef time_t ac__type_sizeof_;
13507int
13508main ()
13509{
13510static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13511test_array [0] = 0
13512
13513 ;
13514 return 0;
13515}
13516_ACEOF
13517rm -f conftest.$ac_objext
13518if { (ac_try="$ac_compile"
13519case "(($ac_try" in
13520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13521 *) ac_try_echo=$ac_try;;
13522esac
13523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13524 (eval "$ac_compile") 2>conftest.er1
13525 ac_status=$?
13526 grep -v '^ *+' conftest.er1 >conftest.err
13527 rm -f conftest.er1
13528 cat conftest.err >&5
13529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13530 (exit $ac_status); } && {
13531 test -z "$ac_c_werror_flag" ||
13532 test ! -s conftest.err
13533 } && test -s conftest.$ac_objext; then
13534 ac_lo=0 ac_mid=0
13535 while :; do
13536 cat >conftest.$ac_ext <<_ACEOF
13537/* confdefs.h. */
13538_ACEOF
13539cat confdefs.h >>conftest.$ac_ext
13540cat >>conftest.$ac_ext <<_ACEOF
13541/* end confdefs.h. */
13542
13543#ifdef HAVE_SYS_TYPES_H
13544#include <sys/types.h>
13545#endif
13546#ifdef HAVE_TIME_H
13547#include <time.h>
13548#endif
13549
13550
13551 typedef time_t ac__type_sizeof_;
13552int
13553main ()
13554{
13555static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13556test_array [0] = 0
13557
13558 ;
13559 return 0;
13560}
13561_ACEOF
13562rm -f conftest.$ac_objext
13563if { (ac_try="$ac_compile"
13564case "(($ac_try" in
13565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13566 *) ac_try_echo=$ac_try;;
13567esac
13568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13569 (eval "$ac_compile") 2>conftest.er1
13570 ac_status=$?
13571 grep -v '^ *+' conftest.er1 >conftest.err
13572 rm -f conftest.er1
13573 cat conftest.err >&5
13574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575 (exit $ac_status); } && {
13576 test -z "$ac_c_werror_flag" ||
13577 test ! -s conftest.err
13578 } && test -s conftest.$ac_objext; then
13579 ac_hi=$ac_mid; break
13580else
13581 echo "$as_me: failed program was:" >&5
13582sed 's/^/| /' conftest.$ac_ext >&5
13583
13584 ac_lo=`expr $ac_mid + 1`
13585 if test $ac_lo -le $ac_mid; then
13586 ac_lo= ac_hi=
13587 break
13588 fi
13589 ac_mid=`expr 2 '*' $ac_mid + 1`
13590fi
13591
13592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13593 done
13594else
13595 echo "$as_me: failed program was:" >&5
13596sed 's/^/| /' conftest.$ac_ext >&5
13597
13598 cat >conftest.$ac_ext <<_ACEOF
13599/* confdefs.h. */
13600_ACEOF
13601cat confdefs.h >>conftest.$ac_ext
13602cat >>conftest.$ac_ext <<_ACEOF
13603/* end confdefs.h. */
13604
13605#ifdef HAVE_SYS_TYPES_H
13606#include <sys/types.h>
13607#endif
13608#ifdef HAVE_TIME_H
13609#include <time.h>
13610#endif
13611
13612
13613 typedef time_t ac__type_sizeof_;
13614int
13615main ()
13616{
13617static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13618test_array [0] = 0
13619
13620 ;
13621 return 0;
13622}
13623_ACEOF
13624rm -f conftest.$ac_objext
13625if { (ac_try="$ac_compile"
13626case "(($ac_try" in
13627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13628 *) ac_try_echo=$ac_try;;
13629esac
13630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13631 (eval "$ac_compile") 2>conftest.er1
13632 ac_status=$?
13633 grep -v '^ *+' conftest.er1 >conftest.err
13634 rm -f conftest.er1
13635 cat conftest.err >&5
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637 (exit $ac_status); } && {
13638 test -z "$ac_c_werror_flag" ||
13639 test ! -s conftest.err
13640 } && test -s conftest.$ac_objext; then
13641 ac_hi=-1 ac_mid=-1
13642 while :; do
13643 cat >conftest.$ac_ext <<_ACEOF
13644/* confdefs.h. */
13645_ACEOF
13646cat confdefs.h >>conftest.$ac_ext
13647cat >>conftest.$ac_ext <<_ACEOF
13648/* end confdefs.h. */
13649
13650#ifdef HAVE_SYS_TYPES_H
13651#include <sys/types.h>
13652#endif
13653#ifdef HAVE_TIME_H
13654#include <time.h>
13655#endif
13656
13657
13658 typedef time_t ac__type_sizeof_;
13659int
13660main ()
13661{
13662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13663test_array [0] = 0
13664
13665 ;
13666 return 0;
13667}
13668_ACEOF
13669rm -f conftest.$ac_objext
13670if { (ac_try="$ac_compile"
13671case "(($ac_try" in
13672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13673 *) ac_try_echo=$ac_try;;
13674esac
13675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13676 (eval "$ac_compile") 2>conftest.er1
13677 ac_status=$?
13678 grep -v '^ *+' conftest.er1 >conftest.err
13679 rm -f conftest.er1
13680 cat conftest.err >&5
13681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13682 (exit $ac_status); } && {
13683 test -z "$ac_c_werror_flag" ||
13684 test ! -s conftest.err
13685 } && test -s conftest.$ac_objext; then
13686 ac_lo=$ac_mid; break
13687else
13688 echo "$as_me: failed program was:" >&5
13689sed 's/^/| /' conftest.$ac_ext >&5
13690
13691 ac_hi=`expr '(' $ac_mid ')' - 1`
13692 if test $ac_mid -le $ac_hi; then
13693 ac_lo= ac_hi=
13694 break
13695 fi
13696 ac_mid=`expr 2 '*' $ac_mid`
13697fi
13698
13699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700 done
13701else
13702 echo "$as_me: failed program was:" >&5
13703sed 's/^/| /' conftest.$ac_ext >&5
13704
13705 ac_lo= ac_hi=
13706fi
13707
13708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13709fi
13710
13711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13712# Binary search between lo and hi bounds.
13713while test "x$ac_lo" != "x$ac_hi"; do
13714 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13715 cat >conftest.$ac_ext <<_ACEOF
13716/* confdefs.h. */
13717_ACEOF
13718cat confdefs.h >>conftest.$ac_ext
13719cat >>conftest.$ac_ext <<_ACEOF
13720/* end confdefs.h. */
13721
13722#ifdef HAVE_SYS_TYPES_H
13723#include <sys/types.h>
13724#endif
13725#ifdef HAVE_TIME_H
13726#include <time.h>
13727#endif
13728
13729
13730 typedef time_t ac__type_sizeof_;
13731int
13732main ()
13733{
13734static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13735test_array [0] = 0
13736
13737 ;
13738 return 0;
13739}
13740_ACEOF
13741rm -f conftest.$ac_objext
13742if { (ac_try="$ac_compile"
13743case "(($ac_try" in
13744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13745 *) ac_try_echo=$ac_try;;
13746esac
13747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13748 (eval "$ac_compile") 2>conftest.er1
13749 ac_status=$?
13750 grep -v '^ *+' conftest.er1 >conftest.err
13751 rm -f conftest.er1
13752 cat conftest.err >&5
13753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13754 (exit $ac_status); } && {
13755 test -z "$ac_c_werror_flag" ||
13756 test ! -s conftest.err
13757 } && test -s conftest.$ac_objext; then
13758 ac_hi=$ac_mid
13759else
13760 echo "$as_me: failed program was:" >&5
13761sed 's/^/| /' conftest.$ac_ext >&5
13762
13763 ac_lo=`expr '(' $ac_mid ')' + 1`
13764fi
13765
13766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767done
13768case $ac_lo in
13769?*) ac_cv_sizeof_time_t=$ac_lo;;
13770'') if test "$ac_cv_type_time_t" = yes; then
13771 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13772See \`config.log' for more details." >&5
13773echo "$as_me: error: cannot compute sizeof (time_t)
13774See \`config.log' for more details." >&2;}
13775 { (exit 77); exit 77; }; }
13776 else
13777 ac_cv_sizeof_time_t=0
13778 fi ;;
13779esac
13780else
13781 cat >conftest.$ac_ext <<_ACEOF
13782/* confdefs.h. */
13783_ACEOF
13784cat confdefs.h >>conftest.$ac_ext
13785cat >>conftest.$ac_ext <<_ACEOF
13786/* end confdefs.h. */
13787
13788#ifdef HAVE_SYS_TYPES_H
13789#include <sys/types.h>
13790#endif
13791#ifdef HAVE_TIME_H
13792#include <time.h>
13793#endif
13794
13795
13796 typedef time_t ac__type_sizeof_;
13797static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13798static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13799#include <stdio.h>
13800#include <stdlib.h>
13801int
13802main ()
13803{
13804
13805 FILE *f = fopen ("conftest.val", "w");
13806 if (! f)
13807 return 1;
13808 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13809 {
13810 long int i = longval ();
13811 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13812 return 1;
13813 fprintf (f, "%ld\n", i);
13814 }
13815 else
13816 {
13817 unsigned long int i = ulongval ();
13818 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13819 return 1;
13820 fprintf (f, "%lu\n", i);
13821 }
13822 return ferror (f) || fclose (f) != 0;
13823
13824 ;
13825 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013826}
Martin v. Löwis11437992002-04-12 09:54:03 +000013827_ACEOF
13828rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829if { (ac_try="$ac_link"
13830case "(($ac_try" in
13831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13832 *) ac_try_echo=$ac_try;;
13833esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839 { (case "(($ac_try" in
13840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13841 *) ac_try_echo=$ac_try;;
13842esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013845 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013848 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013849else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013850 echo "$as_me: program exited with status $ac_status" >&5
13851echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013852sed 's/^/| /' conftest.$ac_ext >&5
13853
Martin v. Löwis11437992002-04-12 09:54:03 +000013854( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013855if test "$ac_cv_type_time_t" = yes; then
13856 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13857See \`config.log' for more details." >&5
13858echo "$as_me: error: cannot compute sizeof (time_t)
13859See \`config.log' for more details." >&2;}
13860 { (exit 77); exit 77; }; }
13861 else
13862 ac_cv_sizeof_time_t=0
13863 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865rm -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 +000013866fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013867rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013868fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013869{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13870echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013872
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013875#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013876_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013877
Michael W. Hudson54241132001-12-07 15:38:26 +000013878
13879
Trent Mick635f6fb2000-08-23 21:33:05 +000013880# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013881ac_save_cc="$CC"
13882if test "$ac_cv_kpthread" = "yes"
13883then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013884elif test "$ac_cv_kthread" = "yes"
13885then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013886elif test "$ac_cv_pthread" = "yes"
13887then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013888fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013889
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013890{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13891echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013892have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013894/* confdefs.h. */
13895_ACEOF
13896cat confdefs.h >>conftest.$ac_ext
13897cat >>conftest.$ac_ext <<_ACEOF
13898/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013899#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013900int
13901main ()
13902{
Guido van Rossum12580492000-09-24 16:47:19 +000013903pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
13908rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013909if { (ac_try="$ac_compile"
13910case "(($ac_try" in
13911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13912 *) ac_try_echo=$ac_try;;
13913esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013917 grep -v '^ *+' conftest.er1 >conftest.err
13918 rm -f conftest.er1
13919 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013921 (exit $ac_status); } && {
13922 test -z "$ac_c_werror_flag" ||
13923 test ! -s conftest.err
13924 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013925 have_pthread_t=yes
13926else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013928sed 's/^/| /' conftest.$ac_ext >&5
13929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930
Trent Mick635f6fb2000-08-23 21:33:05 +000013931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932
13933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013934{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13935echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013936if test "$have_pthread_t" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013937 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13938echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13939if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013940 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013941else
Martin v. Löwis11437992002-04-12 09:54:03 +000013942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* confdefs.h. */
13944_ACEOF
13945cat confdefs.h >>conftest.$ac_ext
13946cat >>conftest.$ac_ext <<_ACEOF
13947/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013948
13949#ifdef HAVE_PTHREAD_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013950#include <pthread.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013951#endif
13952
13953
13954typedef pthread_t ac__type_new_;
13955int
13956main ()
13957{
13958if ((ac__type_new_ *) 0)
13959 return 0;
13960if (sizeof (ac__type_new_))
13961 return 0;
13962 ;
13963 return 0;
13964}
13965_ACEOF
13966rm -f conftest.$ac_objext
13967if { (ac_try="$ac_compile"
13968case "(($ac_try" in
13969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13970 *) ac_try_echo=$ac_try;;
13971esac
13972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13973 (eval "$ac_compile") 2>conftest.er1
13974 ac_status=$?
13975 grep -v '^ *+' conftest.er1 >conftest.err
13976 rm -f conftest.er1
13977 cat conftest.err >&5
13978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13979 (exit $ac_status); } && {
13980 test -z "$ac_c_werror_flag" ||
13981 test ! -s conftest.err
13982 } && test -s conftest.$ac_objext; then
13983 ac_cv_type_pthread_t=yes
13984else
13985 echo "$as_me: failed program was:" >&5
13986sed 's/^/| /' conftest.$ac_ext >&5
13987
13988 ac_cv_type_pthread_t=no
13989fi
13990
13991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13992fi
13993{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
13994echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
13995
13996# The cast to long int works around a bug in the HP C Compiler
13997# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13998# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13999# This bug is HP SR number 8606223364.
14000{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14001echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14002if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
14004else
14005 if test "$cross_compiling" = yes; then
14006 # Depending upon the size, compute the lo and hi bounds.
14007cat >conftest.$ac_ext <<_ACEOF
14008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
14013
14014#ifdef HAVE_PTHREAD_H
14015#include <pthread.h>
14016#endif
14017
14018
14019 typedef pthread_t ac__type_sizeof_;
14020int
14021main ()
14022{
14023static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14024test_array [0] = 0
14025
14026 ;
14027 return 0;
14028}
14029_ACEOF
14030rm -f conftest.$ac_objext
14031if { (ac_try="$ac_compile"
14032case "(($ac_try" in
14033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14034 *) ac_try_echo=$ac_try;;
14035esac
14036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14037 (eval "$ac_compile") 2>conftest.er1
14038 ac_status=$?
14039 grep -v '^ *+' conftest.er1 >conftest.err
14040 rm -f conftest.er1
14041 cat conftest.err >&5
14042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14043 (exit $ac_status); } && {
14044 test -z "$ac_c_werror_flag" ||
14045 test ! -s conftest.err
14046 } && test -s conftest.$ac_objext; then
14047 ac_lo=0 ac_mid=0
14048 while :; do
14049 cat >conftest.$ac_ext <<_ACEOF
14050/* confdefs.h. */
14051_ACEOF
14052cat confdefs.h >>conftest.$ac_ext
14053cat >>conftest.$ac_ext <<_ACEOF
14054/* end confdefs.h. */
14055
14056#ifdef HAVE_PTHREAD_H
14057#include <pthread.h>
14058#endif
14059
14060
14061 typedef pthread_t ac__type_sizeof_;
14062int
14063main ()
14064{
14065static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14066test_array [0] = 0
14067
14068 ;
14069 return 0;
14070}
14071_ACEOF
14072rm -f conftest.$ac_objext
14073if { (ac_try="$ac_compile"
14074case "(($ac_try" in
14075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14076 *) ac_try_echo=$ac_try;;
14077esac
14078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14079 (eval "$ac_compile") 2>conftest.er1
14080 ac_status=$?
14081 grep -v '^ *+' conftest.er1 >conftest.err
14082 rm -f conftest.er1
14083 cat conftest.err >&5
14084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14085 (exit $ac_status); } && {
14086 test -z "$ac_c_werror_flag" ||
14087 test ! -s conftest.err
14088 } && test -s conftest.$ac_objext; then
14089 ac_hi=$ac_mid; break
14090else
14091 echo "$as_me: failed program was:" >&5
14092sed 's/^/| /' conftest.$ac_ext >&5
14093
14094 ac_lo=`expr $ac_mid + 1`
14095 if test $ac_lo -le $ac_mid; then
14096 ac_lo= ac_hi=
14097 break
14098 fi
14099 ac_mid=`expr 2 '*' $ac_mid + 1`
14100fi
14101
14102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14103 done
14104else
14105 echo "$as_me: failed program was:" >&5
14106sed 's/^/| /' conftest.$ac_ext >&5
14107
14108 cat >conftest.$ac_ext <<_ACEOF
14109/* confdefs.h. */
14110_ACEOF
14111cat confdefs.h >>conftest.$ac_ext
14112cat >>conftest.$ac_ext <<_ACEOF
14113/* end confdefs.h. */
14114
14115#ifdef HAVE_PTHREAD_H
14116#include <pthread.h>
14117#endif
14118
14119
14120 typedef pthread_t ac__type_sizeof_;
14121int
14122main ()
14123{
14124static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14125test_array [0] = 0
14126
14127 ;
14128 return 0;
14129}
14130_ACEOF
14131rm -f conftest.$ac_objext
14132if { (ac_try="$ac_compile"
14133case "(($ac_try" in
14134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14135 *) ac_try_echo=$ac_try;;
14136esac
14137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14138 (eval "$ac_compile") 2>conftest.er1
14139 ac_status=$?
14140 grep -v '^ *+' conftest.er1 >conftest.err
14141 rm -f conftest.er1
14142 cat conftest.err >&5
14143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14144 (exit $ac_status); } && {
14145 test -z "$ac_c_werror_flag" ||
14146 test ! -s conftest.err
14147 } && test -s conftest.$ac_objext; then
14148 ac_hi=-1 ac_mid=-1
14149 while :; do
14150 cat >conftest.$ac_ext <<_ACEOF
14151/* confdefs.h. */
14152_ACEOF
14153cat confdefs.h >>conftest.$ac_ext
14154cat >>conftest.$ac_ext <<_ACEOF
14155/* end confdefs.h. */
14156
14157#ifdef HAVE_PTHREAD_H
14158#include <pthread.h>
14159#endif
14160
14161
14162 typedef pthread_t ac__type_sizeof_;
14163int
14164main ()
14165{
14166static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14167test_array [0] = 0
14168
14169 ;
14170 return 0;
14171}
14172_ACEOF
14173rm -f conftest.$ac_objext
14174if { (ac_try="$ac_compile"
14175case "(($ac_try" in
14176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14177 *) ac_try_echo=$ac_try;;
14178esac
14179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14180 (eval "$ac_compile") 2>conftest.er1
14181 ac_status=$?
14182 grep -v '^ *+' conftest.er1 >conftest.err
14183 rm -f conftest.er1
14184 cat conftest.err >&5
14185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14186 (exit $ac_status); } && {
14187 test -z "$ac_c_werror_flag" ||
14188 test ! -s conftest.err
14189 } && test -s conftest.$ac_objext; then
14190 ac_lo=$ac_mid; break
14191else
14192 echo "$as_me: failed program was:" >&5
14193sed 's/^/| /' conftest.$ac_ext >&5
14194
14195 ac_hi=`expr '(' $ac_mid ')' - 1`
14196 if test $ac_mid -le $ac_hi; then
14197 ac_lo= ac_hi=
14198 break
14199 fi
14200 ac_mid=`expr 2 '*' $ac_mid`
14201fi
14202
14203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14204 done
14205else
14206 echo "$as_me: failed program was:" >&5
14207sed 's/^/| /' conftest.$ac_ext >&5
14208
14209 ac_lo= ac_hi=
14210fi
14211
14212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14213fi
14214
14215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14216# Binary search between lo and hi bounds.
14217while test "x$ac_lo" != "x$ac_hi"; do
14218 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14219 cat >conftest.$ac_ext <<_ACEOF
14220/* confdefs.h. */
14221_ACEOF
14222cat confdefs.h >>conftest.$ac_ext
14223cat >>conftest.$ac_ext <<_ACEOF
14224/* end confdefs.h. */
14225
14226#ifdef HAVE_PTHREAD_H
14227#include <pthread.h>
14228#endif
14229
14230
14231 typedef pthread_t ac__type_sizeof_;
14232int
14233main ()
14234{
14235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14236test_array [0] = 0
14237
14238 ;
14239 return 0;
14240}
14241_ACEOF
14242rm -f conftest.$ac_objext
14243if { (ac_try="$ac_compile"
14244case "(($ac_try" in
14245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14246 *) ac_try_echo=$ac_try;;
14247esac
14248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14249 (eval "$ac_compile") 2>conftest.er1
14250 ac_status=$?
14251 grep -v '^ *+' conftest.er1 >conftest.err
14252 rm -f conftest.er1
14253 cat conftest.err >&5
14254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14255 (exit $ac_status); } && {
14256 test -z "$ac_c_werror_flag" ||
14257 test ! -s conftest.err
14258 } && test -s conftest.$ac_objext; then
14259 ac_hi=$ac_mid
14260else
14261 echo "$as_me: failed program was:" >&5
14262sed 's/^/| /' conftest.$ac_ext >&5
14263
14264 ac_lo=`expr '(' $ac_mid ')' + 1`
14265fi
14266
14267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14268done
14269case $ac_lo in
14270?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14271'') if test "$ac_cv_type_pthread_t" = yes; then
14272 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14273See \`config.log' for more details." >&5
14274echo "$as_me: error: cannot compute sizeof (pthread_t)
14275See \`config.log' for more details." >&2;}
14276 { (exit 77); exit 77; }; }
14277 else
14278 ac_cv_sizeof_pthread_t=0
14279 fi ;;
14280esac
14281else
14282 cat >conftest.$ac_ext <<_ACEOF
14283/* confdefs.h. */
14284_ACEOF
14285cat confdefs.h >>conftest.$ac_ext
14286cat >>conftest.$ac_ext <<_ACEOF
14287/* end confdefs.h. */
14288
14289#ifdef HAVE_PTHREAD_H
14290#include <pthread.h>
14291#endif
14292
14293
14294 typedef pthread_t ac__type_sizeof_;
14295static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14296static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14297#include <stdio.h>
14298#include <stdlib.h>
14299int
14300main ()
14301{
14302
14303 FILE *f = fopen ("conftest.val", "w");
14304 if (! f)
14305 return 1;
14306 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14307 {
14308 long int i = longval ();
14309 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14310 return 1;
14311 fprintf (f, "%ld\n", i);
14312 }
14313 else
14314 {
14315 unsigned long int i = ulongval ();
14316 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14317 return 1;
14318 fprintf (f, "%lu\n", i);
14319 }
14320 return ferror (f) || fclose (f) != 0;
14321
14322 ;
14323 return 0;
14324}
Martin v. Löwis11437992002-04-12 09:54:03 +000014325_ACEOF
14326rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327if { (ac_try="$ac_link"
14328case "(($ac_try" in
14329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14330 *) ac_try_echo=$ac_try;;
14331esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337 { (case "(($ac_try" in
14338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14339 *) ac_try_echo=$ac_try;;
14340esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014342 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014343 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014345 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014346 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014347else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014348 echo "$as_me: program exited with status $ac_status" >&5
14349echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014350sed 's/^/| /' conftest.$ac_ext >&5
14351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014353if test "$ac_cv_type_pthread_t" = yes; then
14354 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14355See \`config.log' for more details." >&5
14356echo "$as_me: error: cannot compute sizeof (pthread_t)
14357See \`config.log' for more details." >&2;}
14358 { (exit 77); exit 77; }; }
14359 else
14360 ac_cv_sizeof_pthread_t=0
14361 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363rm -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 +000014364fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014365rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014366fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014367{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014368echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014369
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014370
14371
Martin v. Löwis11437992002-04-12 09:54:03 +000014372cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014373#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014374_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014375
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014376
Trent Mick635f6fb2000-08-23 21:33:05 +000014377fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014378CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014379
Michael W. Hudson54241132001-12-07 15:38:26 +000014380
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014381case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014382 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014383 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14384 ;;
14385 Darwin/*)
14386 OTHER_LIBTOOL_OPT=""
14387 ;;
14388esac
14389
14390
14391case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014392 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014393 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14394 if test "${enable_universalsdk}"; then
14395 :
14396 else
14397 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
14398 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014399 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014400 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014401 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014402 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14403 if test ${gcc_version} '<' 4.0
14404 then
14405 LIBTOOL_CRUFT="-lcc_dynamic"
14406 else
14407 LIBTOOL_CRUFT=""
14408 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000014409 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000014410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014412esac
14413
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014414{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14415echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014416if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014417then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014418 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014420 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422cat >>confdefs.h <<\_ACEOF
14423#define WITH_NEXT_FRAMEWORK 1
14424_ACEOF
14425
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014426 { echo "$as_me:$LINENO: result: yes" >&5
14427echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014428 if test $enable_shared = "yes"
14429 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014430 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14431echo "$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 +000014432 { (exit 1); exit 1; }; }
14433 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014434else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014435 { echo "$as_me:$LINENO: result: no" >&5
14436echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014437fi
14438
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014439{ echo "$as_me:$LINENO: checking for dyld" >&5
14440echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014441case $ac_sys_system/$ac_sys_release in
14442 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014443
Martin v. Löwis11437992002-04-12 09:54:03 +000014444cat >>confdefs.h <<\_ACEOF
14445#define WITH_DYLD 1
14446_ACEOF
14447
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014448 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14449echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014450 ;;
14451 *)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014452 { echo "$as_me:$LINENO: result: no" >&5
14453echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014454 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014455esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014456
Guido van Rossum0a516c91994-09-12 10:58:40 +000014457# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014458
Michael W. Hudson54241132001-12-07 15:38:26 +000014459
14460
14461
14462
Guido van Rossum0a516c91994-09-12 10:58:40 +000014463# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014464# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014465{ echo "$as_me:$LINENO: checking SO" >&5
14466echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014467if test -z "$SO"
14468then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014469 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014470 hp*|HP*)
14471 case `uname -m` in
14472 ia64) SO=.so;;
14473 *) SO=.sl;;
14474 esac
14475 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014476 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014477 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014478 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014479else
14480 # this might also be a termcap variable, see #610332
14481 echo
14482 echo '====================================================================='
14483 echo '+ +'
14484 echo '+ WARNING: You have set SO in your environment. +'
14485 echo '+ Do you really mean to change the extension for shared libraries? +'
14486 echo '+ Continuing in 10 seconds to let you to ponder. +'
14487 echo '+ +'
14488 echo '====================================================================='
14489 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014490fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014491{ echo "$as_me:$LINENO: result: $SO" >&5
14492echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014493
Georg Brandlb1441c72009-01-03 22:33:39 +000014494
Thomas Wouters477c8d52006-05-27 19:21:47 +000014495cat >>confdefs.h <<_ACEOF
14496#define SHLIB_EXT "$SO"
14497_ACEOF
14498
Guido van Rossum0a516c91994-09-12 10:58:40 +000014499# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014500# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014501# (Shared libraries in this instance are shared modules to be loaded into
14502# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014503{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14504echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014505if test -z "$LDSHARED"
14506then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014508 AIX*)
14509 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014510 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014511 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014512 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014513 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014514 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014515 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014516 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014517 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014518 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014519 hp*|HP*)
14520 if test "$GCC" = "yes"
14521 then LDSHARED='$(CC) -shared'
14522 else LDSHARED='ld -b';
14523 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014524 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014525 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014526 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14527 if test "$enable_framework" ; then
14528 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014529 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14530 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014531 else
14532 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014533 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014534 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014535 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014536 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14537 if test "$enable_framework" ; then
14538 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014539 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14540 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014541 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014542 # No framework, use the Python app as bundle-loader
14543 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014544 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014545 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014546 Darwin/*)
14547 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14548 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014549
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014550 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014551 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014552 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014553 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014554 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014555 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14556 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014557 else
14558 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14559 if test "$enable_framework" ; then
14560 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014561 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14562 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014563 else
14564 # No framework, use the Python app as bundle-loader
14565 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14566 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14567 fi
14568 fi
14569 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014570 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014571 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014572 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014573 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014574 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014575 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014576 else
14577 LDSHARED="ld -Bshareable ${LDFLAGS}"
14578 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014579 OpenBSD*)
14580 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14581 then
14582 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14583 else
14584 case `uname -r` in
14585 [01].* | 2.[0-7] | 2.[0-7].*)
14586 LDSHARED="ld -Bshareable ${LDFLAGS}"
14587 ;;
14588 *)
14589 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14590 ;;
14591 esac
14592 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014593 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014594 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014595 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014596 then LDSHARED='$(CC) -shared'
14597 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014598 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014599 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000014600 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014601 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014602 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014603 *) LDSHARED="ld";;
14604 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014605fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014606{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14607echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014608BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014609# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610# library (module) -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014611{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14612echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014613if test -z "$CCSHARED"
14614then
Guido van Rossum07397971997-04-29 21:49:50 +000014615 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014616 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014617 then CCSHARED="-fPIC";
14618 elif test `uname -p` = sparc;
14619 then CCSHARED="-xcode=pic32";
14620 else CCSHARED="-Kpic";
14621 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014622 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014623 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014624 else CCSHARED="+z";
14625 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014626 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014627 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014628 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014629 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014630 if test "$GCC" = "yes"
14631 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014632 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014633 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014634 SCO_SV*)
14635 if test "$GCC" = "yes"
14636 then CCSHARED="-fPIC"
14637 else CCSHARED="-Kpic -belf"
14638 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000014639 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014640 IRIX*/6*) case $CC in
14641 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014642 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014643 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014644 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014645 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014647{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14648echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014649# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014650# the python executable -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014651{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14652echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014653if test -z "$LINKFORSHARED"
14654then
Guido van Rossum07397971997-04-29 21:49:50 +000014655 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014656 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014657 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014658 LINKFORSHARED="-Wl,-E -Wl,+s";;
14659# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014660 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014661 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014662 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014664 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014665 if test "$enable_framework"
14666 then
Jack Jansenda49e192005-01-07 13:08:22 +000014667 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014668 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014669 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014670 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014671 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014672 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014673 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014674 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14675 then
14676 LINKFORSHARED="-Wl,--export-dynamic"
14677 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014678 SunOS/5*) case $CC in
14679 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014680 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014681 then
14682 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014683 fi;;
14684 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014685 CYGWIN*)
14686 if test $enable_shared = "no"
14687 then
14688 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14689 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014690 QNX*)
14691 # -Wl,-E causes the symbols to be added to the dynamic
14692 # symbol table so that they can be found when a module
14693 # is loaded. -N 2048K causes the stack size to be set
14694 # to 2048 kilobytes so that the stack doesn't overflow
14695 # when running test_compile.py.
14696 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014697 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014698fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014699{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14700echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701
Michael W. Hudson54241132001-12-07 15:38:26 +000014702
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014703
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014704{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14705echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014706if test ! "$LIBRARY" = "$LDLIBRARY"
14707then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014708 case $ac_sys_system in
14709 CYGWIN*)
14710 # Cygwin needs CCSHARED when building extension DLLs
14711 # but not when building the interpreter DLL.
14712 CFLAGSFORSHARED='';;
14713 *)
14714 CFLAGSFORSHARED='$(CCSHARED)'
14715 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014716fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014717{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14718echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014719
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014720# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14721# library (with --enable-shared).
14722# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014723# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14724# if it is not required, since it creates a dependency of the shared library
14725# to LIBS. This, in turn, means that applications linking the shared libpython
14726# don't need to link LIBS explicitly. The default should be only changed
14727# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014728
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014729{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14730echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014731case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014732 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014733 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014734esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014735{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14736echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014737
14738
Guido van Rossum627b2d71993-12-24 10:39:16 +000014739# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014741{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14742echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014743if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014744 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014745else
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014747LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014749/* confdefs.h. */
14750_ACEOF
14751cat confdefs.h >>conftest.$ac_ext
14752cat >>conftest.$ac_ext <<_ACEOF
14753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755/* Override any GCC internal prototype to avoid an error.
14756 Use char because int might match the return type of a GCC
14757 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014758#ifdef __cplusplus
14759extern "C"
14760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014761char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014762int
14763main ()
14764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014765return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 ;
14767 return 0;
14768}
14769_ACEOF
14770rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771if { (ac_try="$ac_link"
14772case "(($ac_try" in
14773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14774 *) ac_try_echo=$ac_try;;
14775esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014779 grep -v '^ *+' conftest.er1 >conftest.err
14780 rm -f conftest.er1
14781 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783 (exit $ac_status); } && {
14784 test -z "$ac_c_werror_flag" ||
14785 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014786 } && test -s conftest$ac_exeext &&
14787 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014789else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014791sed 's/^/| /' conftest.$ac_ext >&5
14792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795
14796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014798LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014799fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014800{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14801echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14802if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 cat >>confdefs.h <<_ACEOF
14804#define HAVE_LIBDL 1
14805_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014807 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014809fi
14810 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014812{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14813echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014814if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014815 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014816else
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014818LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014819cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014820/* confdefs.h. */
14821_ACEOF
14822cat confdefs.h >>conftest.$ac_ext
14823cat >>conftest.$ac_ext <<_ACEOF
14824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826/* Override any GCC internal prototype to avoid an error.
14827 Use char because int might match the return type of a GCC
14828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014829#ifdef __cplusplus
14830extern "C"
14831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014832char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014833int
14834main ()
14835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014842if { (ac_try="$ac_link"
14843case "(($ac_try" in
14844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14845 *) ac_try_echo=$ac_try;;
14846esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014850 grep -v '^ *+' conftest.er1 >conftest.err
14851 rm -f conftest.er1
14852 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014854 (exit $ac_status); } && {
14855 test -z "$ac_c_werror_flag" ||
14856 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014857 } && test -s conftest$ac_exeext &&
14858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014859 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014860else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014862sed 's/^/| /' conftest.$ac_ext >&5
14863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866
14867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014870fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014871{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14872echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14873if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 cat >>confdefs.h <<_ACEOF
14875#define HAVE_LIBDLD 1
14876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014878 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014879
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014880fi
14881 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014882
Georg Brandlb1441c72009-01-03 22:33:39 +000014883# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014884if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014885 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14886echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014887if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014888 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014889else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014890 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014892/* confdefs.h. */
14893_ACEOF
14894cat confdefs.h >>conftest.$ac_ext
14895cat >>conftest.$ac_ext <<_ACEOF
14896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898/* Override any GCC internal prototype to avoid an error.
14899 Use char because int might match the return type of a GCC
14900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014901#ifdef __cplusplus
14902extern "C"
14903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014904char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014905int
14906main ()
14907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ;
14910 return 0;
14911}
14912_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913for ac_lib in '' pthread rt posix4; do
14914 if test -z "$ac_lib"; then
14915 ac_res="none required"
14916 else
14917 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014918 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014919 fi
14920 rm -f conftest.$ac_objext conftest$ac_exeext
14921if { (ac_try="$ac_link"
14922case "(($ac_try" in
14923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14924 *) ac_try_echo=$ac_try;;
14925esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014928 ac_status=$?
14929 grep -v '^ *+' conftest.er1 >conftest.err
14930 rm -f conftest.er1
14931 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 (exit $ac_status); } && {
14934 test -z "$ac_c_werror_flag" ||
14935 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014936 } && test -s conftest$ac_exeext &&
14937 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000014939else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014940 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014941sed 's/^/| /' conftest.$ac_ext >&5
14942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943
Thomas Wouters477c8d52006-05-27 19:21:47 +000014944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945
14946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14947 conftest$ac_exeext
14948 if test "${ac_cv_search_sem_init+set}" = set; then
14949 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014951done
14952if test "${ac_cv_search_sem_init+set}" = set; then
14953 :
14954else
14955 ac_cv_search_sem_init=no
14956fi
14957rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014958LIBS=$ac_func_search_save_LIBS
14959fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014960{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
14961echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962ac_res=$ac_cv_search_sem_init
14963if test "$ac_res" != no; then
14964 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014965
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014966fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000014967 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000014968 # posix4 on Solaris 2.6
14969 # pthread (first!) on Linux
14970fi
14971
Martin v. Löwis19d17342003-06-14 21:03:05 +000014972# check if we need libintl for locale functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014973{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14974echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014975if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014976 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014977else
14978 ac_check_lib_save_LIBS=$LIBS
14979LIBS="-lintl $LIBS"
14980cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* confdefs.h. */
14982_ACEOF
14983cat confdefs.h >>conftest.$ac_ext
14984cat >>conftest.$ac_ext <<_ACEOF
14985/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987/* Override any GCC internal prototype to avoid an error.
14988 Use char because int might match the return type of a GCC
14989 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014990#ifdef __cplusplus
14991extern "C"
14992#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014993char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014994int
14995main ()
14996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014998 ;
14999 return 0;
15000}
15001_ACEOF
15002rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003if { (ac_try="$ac_link"
15004case "(($ac_try" in
15005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15006 *) ac_try_echo=$ac_try;;
15007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015011 grep -v '^ *+' conftest.er1 >conftest.err
15012 rm -f conftest.er1
15013 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 (exit $ac_status); } && {
15016 test -z "$ac_c_werror_flag" ||
15017 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015018 } && test -s conftest$ac_exeext &&
15019 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015020 ac_cv_lib_intl_textdomain=yes
15021else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015023sed 's/^/| /' conftest.$ac_ext >&5
15024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027
15028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015030LIBS=$ac_check_lib_save_LIBS
15031fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015032{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15033echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15034if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015035
15036cat >>confdefs.h <<\_ACEOF
15037#define WITH_LIBINTL 1
15038_ACEOF
15039
Brett Cannonc6d936e2009-06-07 20:09:53 +000015040 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015041fi
15042
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015043
15044# checks for system dependent C++ extensions support
15045case "$ac_sys_system" in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015046 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15047echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015049/* confdefs.h. */
15050_ACEOF
15051cat confdefs.h >>conftest.$ac_ext
15052cat >>conftest.$ac_ext <<_ACEOF
15053/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015054#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015055int
15056main ()
15057{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015058loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ;
15060 return 0;
15061}
15062_ACEOF
15063rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064if { (ac_try="$ac_link"
15065case "(($ac_try" in
15066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15067 *) ac_try_echo=$ac_try;;
15068esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015072 grep -v '^ *+' conftest.er1 >conftest.err
15073 rm -f conftest.er1
15074 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076 (exit $ac_status); } && {
15077 test -z "$ac_c_werror_flag" ||
15078 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015079 } && test -s conftest$ac_exeext &&
15080 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015081
Martin v. Löwis11437992002-04-12 09:54:03 +000015082cat >>confdefs.h <<\_ACEOF
15083#define AIX_GENUINE_CPLUSPLUS 1
15084_ACEOF
15085
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015086 { echo "$as_me:$LINENO: result: yes" >&5
15087echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015088else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015090sed 's/^/| /' conftest.$ac_ext >&5
15091
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015092 { echo "$as_me:$LINENO: result: no" >&5
15093echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095
15096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015097 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015098 *) ;;
15099esac
15100
Guido van Rossum70c7f481998-03-26 18:44:10 +000015101# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015102{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15103echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015104if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015105 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015108LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015109cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015110/* confdefs.h. */
15111_ACEOF
15112cat confdefs.h >>conftest.$ac_ext
15113cat >>conftest.$ac_ext <<_ACEOF
15114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116/* Override any GCC internal prototype to avoid an error.
15117 Use char because int might match the return type of a GCC
15118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015119#ifdef __cplusplus
15120extern "C"
15121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015122char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015123int
15124main ()
15125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ;
15128 return 0;
15129}
15130_ACEOF
15131rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132if { (ac_try="$ac_link"
15133case "(($ac_try" in
15134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15135 *) ac_try_echo=$ac_try;;
15136esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015140 grep -v '^ *+' conftest.er1 >conftest.err
15141 rm -f conftest.er1
15142 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 (exit $ac_status); } && {
15145 test -z "$ac_c_werror_flag" ||
15146 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015147 } && test -s conftest$ac_exeext &&
15148 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015150else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015152sed 's/^/| /' conftest.$ac_ext >&5
15153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
15157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015159LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015160fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015161{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15162echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15163if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015164 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015165fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015166 # SVR4
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015167{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15168echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015169if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015171else
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015173LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015175/* confdefs.h. */
15176_ACEOF
15177cat confdefs.h >>conftest.$ac_ext
15178cat >>conftest.$ac_ext <<_ACEOF
15179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181/* Override any GCC internal prototype to avoid an error.
15182 Use char because int might match the return type of a GCC
15183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015184#ifdef __cplusplus
15185extern "C"
15186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015187char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015188int
15189main ()
15190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ;
15193 return 0;
15194}
15195_ACEOF
15196rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197if { (ac_try="$ac_link"
15198case "(($ac_try" in
15199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15200 *) ac_try_echo=$ac_try;;
15201esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015205 grep -v '^ *+' conftest.er1 >conftest.err
15206 rm -f conftest.er1
15207 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209 (exit $ac_status); } && {
15210 test -z "$ac_c_werror_flag" ||
15211 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015212 } && test -s conftest$ac_exeext &&
15213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015215else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015217sed 's/^/| /' conftest.$ac_ext >&5
15218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015221
15222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015224LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015225fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015226{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15227echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15228if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015229 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015230fi
15231 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015232
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015233{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15234echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015237if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 withval=$with_libs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015239{ echo "$as_me:$LINENO: result: $withval" >&5
15240echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015241LIBS="$withval $LIBS"
15242
15243else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015244 { echo "$as_me:$LINENO: result: no" >&5
15245echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015246fi
15247
Guido van Rossum7f43da71994-08-01 12:15:30 +000015248
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015249# Check for use of the system libffi library
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015250{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15251echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015254if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255 withval=$with_system_ffi;
15256fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015257
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015258
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015259{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15260echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015261
Matthias Klose55708cc2009-04-30 08:06:49 +000015262# Check for --with-dbmliborder
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015263{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15264echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015265
15266# Check whether --with-dbmliborder was given.
15267if test "${with_dbmliborder+set}" = set; then
15268 withval=$with_dbmliborder;
15269if test x$with_dbmliborder = xyes
15270then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015271{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15272echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015273 { (exit 1); exit 1; }; }
15274else
15275 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15276 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15277 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015278 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15279echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015280 { (exit 1); exit 1; }; }
15281 fi
15282 done
15283fi
15284fi
15285
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015286{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15287echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015288
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015289# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015290
15291
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015292{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15293echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015296if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297 withval=$with_signal_module;
15298fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015299
15300
15301if test -z "$with_signal_module"
15302then with_signal_module="yes"
15303fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015304{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15305echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015306
15307if test "${with_signal_module}" = "yes"; then
15308 USE_SIGNAL_MODULE=""
15309 SIGNAL_OBJS=""
15310else
15311 USE_SIGNAL_MODULE="#"
15312 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15313fi
15314
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015315# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015316
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015317USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015318
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015319{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15320echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015321
Guido van Rossumec2f0731997-01-22 20:54:01 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015324if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325 withval=$with_dec_threads;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015326{ echo "$as_me:$LINENO: result: $withval" >&5
15327echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015328LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015329if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015330 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015331fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015332else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015333 { echo "$as_me:$LINENO: result: no" >&5
15334echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335fi
15336
Martin v. Löwis11437992002-04-12 09:54:03 +000015337
15338# Templates for things AC_DEFINEd more than once.
15339# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015340
15341
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
15343
15344
15345
15346
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015347{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15348echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015351if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352 withval=$with_threads;
15353fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015354
15355
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015356# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015359if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360 withval=$with_thread; with_threads=$with_thread
15361fi
15362
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015363
15364if test -z "$with_threads"
15365then with_threads="yes"
15366fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015367{ echo "$as_me:$LINENO: result: $with_threads" >&5
15368echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015369
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015370
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015371if test "$with_threads" = "no"
15372then
15373 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015374elif test "$ac_cv_pthread_is_default" = yes
15375then
Martin v. Löwis11437992002-04-12 09:54:03 +000015376 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015377#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015378_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015379
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015380 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015382#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015383_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015384
15385 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015387elif test "$ac_cv_kpthread" = "yes"
15388then
15389 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015390 if test "$ac_cv_cxx_thread" = "yes"; then
15391 CXX="$CXX -Kpthread"
15392 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015393 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015394#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015395_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015398 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015399elif test "$ac_cv_kthread" = "yes"
15400then
15401 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015402 if test "$ac_cv_cxx_thread" = "yes"; then
15403 CXX="$CXX -Kthread"
15404 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015405 cat >>confdefs.h <<\_ACEOF
15406#define WITH_THREAD 1
15407_ACEOF
15408
15409 posix_threads=yes
15410 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015411elif test "$ac_cv_pthread" = "yes"
15412then
15413 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015414 if test "$ac_cv_cxx_thread" = "yes"; then
15415 CXX="$CXX -pthread"
15416 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015417 cat >>confdefs.h <<\_ACEOF
15418#define WITH_THREAD 1
15419_ACEOF
15420
15421 posix_threads=yes
15422 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015423else
15424 if test ! -z "$with_threads" -a -d "$with_threads"
15425 then LDFLAGS="$LDFLAGS -L$with_threads"
15426 fi
15427 if test ! -z "$withval" -a -d "$withval"
15428 then LDFLAGS="$LDFLAGS -L$withval"
15429 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015430
15431 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015432 # define _POSIX_THREADS in unistd.h. Some apparently don't
15433 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015434 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15435echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015437/* confdefs.h. */
15438_ACEOF
15439cat confdefs.h >>conftest.$ac_ext
15440cat >>conftest.$ac_ext <<_ACEOF
15441/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015443#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015444#ifdef _POSIX_THREADS
15445yes
15446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
15448_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015450 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015451 unistd_defines_pthreads=yes
15452else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015453 unistd_defines_pthreads=no
15454fi
15455rm -f conftest*
15456
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015457 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15458echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015459
Martin v. Löwis11437992002-04-12 09:54:03 +000015460 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015461#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015462_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015465 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15466echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015467if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015468 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015469fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015470{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15471echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015472else
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015474{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15475echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015477/* confdefs.h. */
15478_ACEOF
15479cat confdefs.h >>conftest.$ac_ext
15480cat >>conftest.$ac_ext <<_ACEOF
15481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015482$ac_includes_default
15483#include <cthreads.h>
15484_ACEOF
15485rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486if { (ac_try="$ac_compile"
15487case "(($ac_try" in
15488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15489 *) ac_try_echo=$ac_try;;
15490esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015494 grep -v '^ *+' conftest.er1 >conftest.err
15495 rm -f conftest.er1
15496 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498 (exit $ac_status); } && {
15499 test -z "$ac_c_werror_flag" ||
15500 test ! -s conftest.err
15501 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 ac_header_compiler=yes
15503else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015505sed 's/^/| /' conftest.$ac_ext >&5
15506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015509
15510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015511{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15512echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015513
15514# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015515{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15516echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015518/* confdefs.h. */
15519_ACEOF
15520cat confdefs.h >>conftest.$ac_ext
15521cat >>conftest.$ac_ext <<_ACEOF
15522/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015523#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015524_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525if { (ac_try="$ac_cpp conftest.$ac_ext"
15526case "(($ac_try" in
15527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15528 *) ac_try_echo=$ac_try;;
15529esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015533 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 rm -f conftest.er1
15535 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 (exit $ac_status); } >/dev/null && {
15538 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15539 test ! -s conftest.err
15540 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 ac_header_preproc=yes
15542else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015544sed 's/^/| /' conftest.$ac_ext >&5
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548
Martin v. Löwis11437992002-04-12 09:54:03 +000015549rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015550{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15551echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015552
15553# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015554case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15555 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015556 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15557echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15558 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15559echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015560 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015561 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015562 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015563 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15564echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15565 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15566echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15567 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15568echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15569 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15570echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15571 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15572echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15573 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15574echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015576## -------------------------------------- ##
15577## Report this to http://bugs.python.org/ ##
15578## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015579_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015581 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015582esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015583{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15584echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015585if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015586 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015587else
15588 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015589fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015590{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15591echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
15593fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015594if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015596#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015597_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015598
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015600#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015602
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
15604cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015605#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015607
15608 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015609 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015610else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015611
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015613 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15614echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015615if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015616 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015617fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015618{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15619echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015620else
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015622{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15623echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015625/* confdefs.h. */
15626_ACEOF
15627cat confdefs.h >>conftest.$ac_ext
15628cat >>conftest.$ac_ext <<_ACEOF
15629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015630$ac_includes_default
15631#include <mach/cthreads.h>
15632_ACEOF
15633rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634if { (ac_try="$ac_compile"
15635case "(($ac_try" in
15636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15637 *) ac_try_echo=$ac_try;;
15638esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642 grep -v '^ *+' conftest.er1 >conftest.err
15643 rm -f conftest.er1
15644 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646 (exit $ac_status); } && {
15647 test -z "$ac_c_werror_flag" ||
15648 test ! -s conftest.err
15649 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 ac_header_compiler=yes
15651else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015653sed 's/^/| /' conftest.$ac_ext >&5
15654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657
15658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015659{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15660echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015663{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15664echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015666/* confdefs.h. */
15667_ACEOF
15668cat confdefs.h >>conftest.$ac_ext
15669cat >>conftest.$ac_ext <<_ACEOF
15670/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015671#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673if { (ac_try="$ac_cpp conftest.$ac_ext"
15674case "(($ac_try" in
15675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15676 *) ac_try_echo=$ac_try;;
15677esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015681 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 rm -f conftest.er1
15683 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685 (exit $ac_status); } >/dev/null && {
15686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15687 test ! -s conftest.err
15688 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 ac_header_preproc=yes
15690else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015692sed 's/^/| /' conftest.$ac_ext >&5
15693
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015698{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15699echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
15701# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015702case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15703 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015704 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15705echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15706 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15707echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015708 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015709 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015710 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15712echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15714echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15715 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15716echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15717 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15718echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15719 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15720echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15721 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15722echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015724## -------------------------------------- ##
15725## Report this to http://bugs.python.org/ ##
15726## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015727_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015729 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015730esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015731{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15732echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015733if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015734 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015735else
15736 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015737fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015738{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15739echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
15741fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015742if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015744#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015745_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015746
Martin v. Löwis11437992002-04-12 09:54:03 +000015747 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015748#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
15752cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015753#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015754_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015755
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015756 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015757else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015758
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015759 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15760echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015763if test "${with_pth+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015764 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15765echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015766 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015767#define WITH_THREAD 1
15768_ACEOF
15769
15770
15771cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015772#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015773_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015774
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015775 LIBS="-lpth $LIBS"
15776 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015777else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015778 { echo "$as_me:$LINENO: result: no" >&5
15779echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015780
15781 # Just looking for pthread_create in libpthread is not enough:
15782 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15783 # So we really have to include pthread.h, and then link.
15784 _libs=$LIBS
15785 LIBS="$LIBS -lpthread"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015786 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15787echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015789/* confdefs.h. */
15790_ACEOF
15791cat confdefs.h >>conftest.$ac_ext
15792cat >>conftest.$ac_ext <<_ACEOF
15793/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015794#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015795
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015796void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015797int
15798main ()
15799{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015800
15801pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 ;
15803 return 0;
15804}
15805_ACEOF
15806rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807if { (ac_try="$ac_link"
15808case "(($ac_try" in
15809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15810 *) ac_try_echo=$ac_try;;
15811esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015815 grep -v '^ *+' conftest.er1 >conftest.err
15816 rm -f conftest.er1
15817 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819 (exit $ac_status); } && {
15820 test -z "$ac_c_werror_flag" ||
15821 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015822 } && test -s conftest$ac_exeext &&
15823 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015825 { echo "$as_me:$LINENO: result: yes" >&5
15826echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015827 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015828#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015829_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015830
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015831 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015832 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015833else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015835sed 's/^/| /' conftest.$ac_ext >&5
15836
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015838 LIBS=$_libs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015839 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15840echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015841if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015843else
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015845/* confdefs.h. */
15846_ACEOF
15847cat confdefs.h >>conftest.$ac_ext
15848cat >>conftest.$ac_ext <<_ACEOF
15849/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015850/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15851 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15852#define pthread_detach innocuous_pthread_detach
15853
Guido van Rossumad678af1998-10-02 14:42:15 +000015854/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015855 which can conflict with char pthread_detach (); below.
15856 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015857 <limits.h> exists even on freestanding compilers. */
15858
15859#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015860# include <limits.h>
15861#else
15862# include <assert.h>
15863#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015864
15865#undef pthread_detach
15866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867/* Override any GCC internal prototype to avoid an error.
15868 Use char because int might match the return type of a GCC
15869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015870#ifdef __cplusplus
15871extern "C"
15872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015873char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015874/* The GNU C library defines this for functions which it implements
15875 to always fail with ENOSYS. Some functions are actually named
15876 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015878choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015879#endif
15880
Skip Montanaro6dead952003-09-25 14:50:04 +000015881int
15882main ()
15883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015885 ;
15886 return 0;
15887}
15888_ACEOF
15889rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890if { (ac_try="$ac_link"
15891case "(($ac_try" in
15892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15893 *) ac_try_echo=$ac_try;;
15894esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015898 grep -v '^ *+' conftest.er1 >conftest.err
15899 rm -f conftest.er1
15900 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902 (exit $ac_status); } && {
15903 test -z "$ac_c_werror_flag" ||
15904 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015905 } && test -s conftest$ac_exeext &&
15906 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015907 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015908else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015910sed 's/^/| /' conftest.$ac_ext >&5
15911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914
15915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015916 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015917fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015918{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15919echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
15920if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015921 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015922#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015924
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015925 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015926 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015927else
Guido van Rossumad678af1998-10-02 14:42:15 +000015928
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015929 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015930 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15931echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015932if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015933 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015934fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015935{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15936echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015937else
15938 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015939{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
15940echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015941cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015942/* confdefs.h. */
15943_ACEOF
15944cat confdefs.h >>conftest.$ac_ext
15945cat >>conftest.$ac_ext <<_ACEOF
15946/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015947$ac_includes_default
15948#include <atheos/threads.h>
15949_ACEOF
15950rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951if { (ac_try="$ac_compile"
15952case "(($ac_try" in
15953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15954 *) ac_try_echo=$ac_try;;
15955esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015959 grep -v '^ *+' conftest.er1 >conftest.err
15960 rm -f conftest.er1
15961 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963 (exit $ac_status); } && {
15964 test -z "$ac_c_werror_flag" ||
15965 test ! -s conftest.err
15966 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015967 ac_header_compiler=yes
15968else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015970sed 's/^/| /' conftest.$ac_ext >&5
15971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974
15975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015976{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15977echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015978
15979# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015980{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15981echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015983/* confdefs.h. */
15984_ACEOF
15985cat confdefs.h >>conftest.$ac_ext
15986cat >>conftest.$ac_ext <<_ACEOF
15987/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015988#include <atheos/threads.h>
15989_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990if { (ac_try="$ac_cpp conftest.$ac_ext"
15991case "(($ac_try" in
15992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15993 *) ac_try_echo=$ac_try;;
15994esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015997 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015998 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015999 rm -f conftest.er1
16000 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002 (exit $ac_status); } >/dev/null && {
16003 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16004 test ! -s conftest.err
16005 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016006 ac_header_preproc=yes
16007else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016008 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016009sed 's/^/| /' conftest.$ac_ext >&5
16010
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016011 ac_header_preproc=no
16012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016014rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016015{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16016echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016017
16018# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016019case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16020 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016021 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16022echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16023 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16024echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016025 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016026 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016027 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016028 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16029echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16030 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16031echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16032 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16033echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16034 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16035echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16036 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16037echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16038 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16039echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016041## -------------------------------------- ##
16042## Report this to http://bugs.python.org/ ##
16043## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016044_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016046 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016047esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016048{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16049echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016050if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016051 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016052else
16053 ac_cv_header_atheos_threads_h=$ac_header_preproc
16054fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016055{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16056echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016057
16058fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016059if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016060 cat >>confdefs.h <<\_ACEOF
16061#define WITH_THREAD 1
16062_ACEOF
16063
16064
16065cat >>confdefs.h <<\_ACEOF
16066#define ATHEOS_THREADS 1
16067_ACEOF
16068
16069 THREADOBJ="Python/thread.o"
16070else
16071
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016072 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16073echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016074if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016075 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016076else
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016078LIBS="-lpthreads $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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016120else
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +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
Greg Steinadf63d62000-07-05 10:38:09 +000016130fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016131{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16132echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16133if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016134 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016135#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016136_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +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 -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016140 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016141else
Greg Steinadf63d62000-07-05 10:38:09 +000016142
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016143 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16144echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016145if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016146 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016147else
Martin v. Löwis11437992002-04-12 09:54:03 +000016148 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016149LIBS="-lc_r $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 ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016164int
16165main ()
16166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167return pthread_create ();
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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016191else
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +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 Rossum49545951997-12-02 19:28:29 +000016201fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016202{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16203echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16204if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016206#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016207_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +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 -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016211 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016212else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016213
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016214 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16215echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016216if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016218else
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016220LIBS="-lpthread $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_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016235int
16236main ()
16237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238return __pthread_create_system ();
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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016262else
Alexandre Vassalotti19142282009-07-17 23:11:52 +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_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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 Rossum8d6e8af2000-10-30 17:45:07 +000016272fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016273{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16274echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16275if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016277#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016278_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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 -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016282 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016283else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016284
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016285 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16286echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016287if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016288 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016289else
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016291LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016293/* confdefs.h. */
16294_ACEOF
16295cat confdefs.h >>conftest.$ac_ext
16296cat >>conftest.$ac_ext <<_ACEOF
16297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299/* Override any GCC internal prototype to avoid an error.
16300 Use char because int might match the return type of a GCC
16301 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016302#ifdef __cplusplus
16303extern "C"
16304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016305char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016306int
16307main ()
16308{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 ;
16311 return 0;
16312}
16313_ACEOF
16314rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315if { (ac_try="$ac_link"
16316case "(($ac_try" in
16317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16318 *) ac_try_echo=$ac_try;;
16319esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016323 grep -v '^ *+' conftest.er1 >conftest.err
16324 rm -f conftest.er1
16325 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 (exit $ac_status); } && {
16328 test -z "$ac_c_werror_flag" ||
16329 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016330 } && test -s conftest$ac_exeext &&
16331 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016333else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016335sed 's/^/| /' conftest.$ac_ext >&5
16336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339
16340rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016342LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016343fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016344{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16345echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16346if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016348#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016349_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016350
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016351 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016352 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016353 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016354else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016355
Martin v. Löwis130fb172001-07-19 11:00:41 +000016356 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016357fi
16358
Guido van Rossum627b2d71993-12-24 10:39:16 +000016359
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016360fi
16361
Guido van Rossum0be3e491997-05-22 20:33:33 +000016362fi
16363
Guido van Rossum49545951997-12-02 19:28:29 +000016364fi
16365
Guido van Rossumb93a8621998-05-07 13:27:32 +000016366fi
16367
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016368
Michael W. Hudson54241132001-12-07 15:38:26 +000016369fi
16370
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016372
16373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016374 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375fi
16376
Martin v. Löwis11437992002-04-12 09:54:03 +000016377fi
16378
16379
16380fi
16381
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016382
Michael W. Hudson54241132001-12-07 15:38:26 +000016383
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016384 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16385echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016386if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016388else
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016390LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016392/* confdefs.h. */
16393_ACEOF
16394cat confdefs.h >>conftest.$ac_ext
16395cat >>conftest.$ac_ext <<_ACEOF
16396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398/* Override any GCC internal prototype to avoid an error.
16399 Use char because int might match the return type of a GCC
16400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016401#ifdef __cplusplus
16402extern "C"
16403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016404char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016405int
16406main ()
16407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 ;
16410 return 0;
16411}
16412_ACEOF
16413rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414if { (ac_try="$ac_link"
16415case "(($ac_try" in
16416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16417 *) ac_try_echo=$ac_try;;
16418esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016422 grep -v '^ *+' conftest.er1 >conftest.err
16423 rm -f conftest.er1
16424 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426 (exit $ac_status); } && {
16427 test -z "$ac_c_werror_flag" ||
16428 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016429 } && test -s conftest$ac_exeext &&
16430 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016432else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016434sed 's/^/| /' conftest.$ac_ext >&5
16435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016438
16439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016442fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016443{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16444echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16445if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016447#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016449
Martin v. Löwis130fb172001-07-19 11:00:41 +000016450 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016451 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016452 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016453fi
16454
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016455
Neal Norwitza978ab02002-11-02 16:58:05 +000016456 if test "$posix_threads" != "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016457 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16458echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016459if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016461else
Martin v. Löwis11437992002-04-12 09:54:03 +000016462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016463LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016464cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016465/* confdefs.h. */
16466_ACEOF
16467cat confdefs.h >>conftest.$ac_ext
16468cat >>conftest.$ac_ext <<_ACEOF
16469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471/* Override any GCC internal prototype to avoid an error.
16472 Use char because int might match the return type of a GCC
16473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016474#ifdef __cplusplus
16475extern "C"
16476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016477char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016478int
16479main ()
16480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 ;
16483 return 0;
16484}
16485_ACEOF
16486rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487if { (ac_try="$ac_link"
16488case "(($ac_try" in
16489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16490 *) ac_try_echo=$ac_try;;
16491esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016495 grep -v '^ *+' conftest.er1 >conftest.err
16496 rm -f conftest.er1
16497 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499 (exit $ac_status); } && {
16500 test -z "$ac_c_werror_flag" ||
16501 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016502 } && test -s conftest$ac_exeext &&
16503 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016505else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016507sed 's/^/| /' conftest.$ac_ext >&5
16508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511
16512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016515fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016516{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16517echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16518if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016520#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016521_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016522
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016523 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016524 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016525 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016526fi
16527
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016528 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016529
Martin v. Löwis130fb172001-07-19 11:00:41 +000016530 if test "$USE_THREAD_MODULE" != "#"
16531 then
16532 # If the above checks didn't disable threads, (at least) OSF1
16533 # needs this '-threads' argument during linking.
16534 case $ac_sys_system in
16535 OSF1) LDLAST=-threads;;
16536 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016537 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016538fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016539
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016540if test "$posix_threads" = "yes"; then
16541 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016542
16543cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016544#define _POSIX_THREADS 1
16545_ACEOF
16546
16547 fi
16548
16549 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16550 case $ac_sys_system/$ac_sys_release in
16551 SunOS/5.6)
16552cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016553#define HAVE_PTHREAD_DESTRUCTOR 1
16554_ACEOF
16555
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016556 ;;
16557 SunOS/5.8)
16558cat >>confdefs.h <<\_ACEOF
16559#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16560_ACEOF
16561
16562 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016563 AIX/5)
16564cat >>confdefs.h <<\_ACEOF
16565#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16566_ACEOF
16567
16568 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016569 esac
16570
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016571 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16572echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016573 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016575else
16576 if test "$cross_compiling" = yes; then
16577 ac_cv_pthread_system_supported=no
16578else
16579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016580/* confdefs.h. */
16581_ACEOF
16582cat confdefs.h >>conftest.$ac_ext
16583cat >>conftest.$ac_ext <<_ACEOF
16584/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016585#include <pthread.h>
16586 void *foo(void *parm) {
16587 return NULL;
16588 }
16589 main() {
16590 pthread_attr_t attr;
16591 pthread_t id;
16592 if (pthread_attr_init(&attr)) exit(-1);
16593 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16594 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16595 exit(0);
16596 }
16597_ACEOF
16598rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599if { (ac_try="$ac_link"
16600case "(($ac_try" in
16601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16602 *) ac_try_echo=$ac_try;;
16603esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016606 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016608 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609 { (case "(($ac_try" in
16610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16611 *) ac_try_echo=$ac_try;;
16612esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016615 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016617 (exit $ac_status); }; }; then
16618 ac_cv_pthread_system_supported=yes
16619else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016620 echo "$as_me: program exited with status $ac_status" >&5
16621echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016622sed 's/^/| /' conftest.$ac_ext >&5
16623
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016624( exit $ac_status )
16625ac_cv_pthread_system_supported=no
16626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016627rm -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 +000016628fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630
16631
Guido van Rossum627b2d71993-12-24 10:39:16 +000016632fi
16633
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016634 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16635echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016636 if test "$ac_cv_pthread_system_supported" = "yes"; then
16637
16638cat >>confdefs.h <<\_ACEOF
16639#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16640_ACEOF
16641
16642 fi
16643
16644for ac_func in pthread_sigmask
16645do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016646as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16647{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16648echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016649if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016650 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016651else
16652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016653/* confdefs.h. */
16654_ACEOF
16655cat confdefs.h >>conftest.$ac_ext
16656cat >>conftest.$ac_ext <<_ACEOF
16657/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016658/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16659 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16660#define $ac_func innocuous_$ac_func
16661
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016662/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016663 which can conflict with char $ac_func (); below.
16664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016665 <limits.h> exists even on freestanding compilers. */
16666
16667#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016668# include <limits.h>
16669#else
16670# include <assert.h>
16671#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016672
16673#undef $ac_func
16674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675/* Override any GCC internal prototype to avoid an error.
16676 Use char because int might match the return type of a GCC
16677 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016678#ifdef __cplusplus
16679extern "C"
16680#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016681char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016682/* The GNU C library defines this for functions which it implements
16683 to always fail with ENOSYS. Some functions are actually named
16684 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016686choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016687#endif
16688
Skip Montanaro6dead952003-09-25 14:50:04 +000016689int
16690main ()
16691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016693 ;
16694 return 0;
16695}
16696_ACEOF
16697rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698if { (ac_try="$ac_link"
16699case "(($ac_try" in
16700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16701 *) ac_try_echo=$ac_try;;
16702esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 grep -v '^ *+' conftest.er1 >conftest.err
16707 rm -f conftest.er1
16708 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 (exit $ac_status); } && {
16711 test -z "$ac_c_werror_flag" ||
16712 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016713 } && test -s conftest$ac_exeext &&
16714 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016715 eval "$as_ac_var=yes"
16716else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016717 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016718sed 's/^/| /' conftest.$ac_ext >&5
16719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722
16723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016724 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016725fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016726ac_res=`eval echo '${'$as_ac_var'}'`
16727 { echo "$as_me:$LINENO: result: $ac_res" >&5
16728echo "${ECHO_T}$ac_res" >&6; }
16729if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016730 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016732_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016733 case $ac_sys_system in
16734 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016735
Jason Tishlerfac083d2003-07-22 15:20:49 +000016736cat >>confdefs.h <<\_ACEOF
16737#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16738_ACEOF
16739
16740 ;;
16741 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016742fi
16743done
16744
16745fi
16746
16747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016748# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016749
16750
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016751{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16752echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016754if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016755 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016756 no)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016757 { echo "$as_me:$LINENO: result: no" >&5
16758echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016759 ipv6=no
16760 ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016761 *) { echo "$as_me:$LINENO: result: yes" >&5
16762echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016763 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016764#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016765_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016766
16767 ipv6=yes
16768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016770else
Martin v. Löwis11437992002-04-12 09:54:03 +000016771
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016772 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016773 { echo "$as_me:$LINENO: result: no" >&5
16774echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016775 ipv6=no
16776
16777else
Martin v. Löwis11437992002-04-12 09:54:03 +000016778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016779/* confdefs.h. */
16780_ACEOF
16781cat confdefs.h >>conftest.$ac_ext
16782cat >>conftest.$ac_ext <<_ACEOF
16783/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016784 /* AF_INET6 available check */
16785#include <sys/types.h>
16786#include <sys/socket.h>
16787main()
16788{
16789 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16790 exit(1);
16791 else
16792 exit(0);
16793}
16794
Martin v. Löwis11437992002-04-12 09:54:03 +000016795_ACEOF
16796rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016797if { (ac_try="$ac_link"
16798case "(($ac_try" in
16799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16800 *) ac_try_echo=$ac_try;;
16801esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016803 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016806 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016807 { (case "(($ac_try" in
16808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16809 *) ac_try_echo=$ac_try;;
16810esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016813 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016816 { echo "$as_me:$LINENO: result: yes" >&5
16817echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016818 ipv6=yes
16819else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016820 echo "$as_me: program exited with status $ac_status" >&5
16821echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016822sed 's/^/| /' conftest.$ac_ext >&5
16823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016825{ echo "$as_me:$LINENO: result: no" >&5
16826echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016827 ipv6=no
16828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829rm -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 +000016830fi
16831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832
16833
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016834if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016835 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16836echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016838/* confdefs.h. */
16839_ACEOF
16840cat confdefs.h >>conftest.$ac_ext
16841cat >>conftest.$ac_ext <<_ACEOF
16842/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016843#include <sys/types.h>
16844#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016845int
16846main ()
16847{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016848struct sockaddr_in6 x;
16849x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 ;
16851 return 0;
16852}
16853_ACEOF
16854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855if { (ac_try="$ac_compile"
16856case "(($ac_try" in
16857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16858 *) ac_try_echo=$ac_try;;
16859esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016863 grep -v '^ *+' conftest.er1 >conftest.err
16864 rm -f conftest.er1
16865 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016867 (exit $ac_status); } && {
16868 test -z "$ac_c_werror_flag" ||
16869 test ! -s conftest.err
16870 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016871 { echo "$as_me:$LINENO: result: yes" >&5
16872echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016873 ipv6=yes
16874else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016876sed 's/^/| /' conftest.$ac_ext >&5
16877
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016878 { echo "$as_me:$LINENO: result: no" >&5
16879echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016880 ipv6=no
16881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882
16883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016884fi
16885
16886if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016888#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016889_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016890
16891fi
16892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016893fi
16894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016895
16896ipv6type=unknown
16897ipv6lib=none
16898ipv6trylibc=no
16899
16900if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016901 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16902echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016905 case $i in
16906 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016908/* confdefs.h. */
16909_ACEOF
16910cat confdefs.h >>conftest.$ac_ext
16911cat >>conftest.$ac_ext <<_ACEOF
16912/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016914#include <netinet/in.h>
16915#ifdef IPV6_INRIA_VERSION
16916yes
16917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016920 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016921 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016922fi
16923rm -f conftest*
16924
16925 ;;
16926 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016928/* confdefs.h. */
16929_ACEOF
16930cat confdefs.h >>conftest.$ac_ext
16931cat >>conftest.$ac_ext <<_ACEOF
16932/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016933
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934#include <netinet/in.h>
16935#ifdef __KAME__
16936yes
16937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016938_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016940 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016941 ipv6type=$i;
16942 ipv6lib=inet6
16943 ipv6libdir=/usr/local/v6/lib
16944 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016945fi
16946rm -f conftest*
16947
16948 ;;
16949 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016950 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016951/* confdefs.h. */
16952_ACEOF
16953cat confdefs.h >>conftest.$ac_ext
16954cat >>conftest.$ac_ext <<_ACEOF
16955/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016957#include <features.h>
16958#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16959yes
16960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016961_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016963 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016964 ipv6type=$i;
16965 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016966fi
16967rm -f conftest*
16968
16969 ;;
16970 linux-inet6)
16971 if test -d /usr/inet6; then
16972 ipv6type=$i
16973 ipv6lib=inet6
16974 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016975 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016976 fi
16977 ;;
16978 solaris)
16979 if test -f /etc/netconfig; then
16980 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16981 ipv6type=$i
16982 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016983 fi
16984 fi
16985 ;;
16986 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016988/* confdefs.h. */
16989_ACEOF
16990cat confdefs.h >>conftest.$ac_ext
16991cat >>conftest.$ac_ext <<_ACEOF
16992/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016993
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016994#include <sys/param.h>
16995#ifdef _TOSHIBA_INET6
16996yes
16997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016998_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017000 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017001 ipv6type=$i;
17002 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017003 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017004fi
17005rm -f conftest*
17006
17007 ;;
17008 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017010/* confdefs.h. */
17011_ACEOF
17012cat confdefs.h >>conftest.$ac_ext
17013cat >>conftest.$ac_ext <<_ACEOF
17014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017016#include </usr/local/v6/include/sys/v6config.h>
17017#ifdef __V6D__
17018yes
17019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017022 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017023 ipv6type=$i;
17024 ipv6lib=v6;
17025 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017026 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017027fi
17028rm -f conftest*
17029
17030 ;;
17031 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017038
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039#include <sys/param.h>
17040#ifdef _ZETA_MINAMI_INET6
17041yes
17042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017043_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017045 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017046 ipv6type=$i;
17047 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017048 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017049fi
17050rm -f conftest*
17051
17052 ;;
17053 esac
17054 if test "$ipv6type" != "unknown"; then
17055 break
17056 fi
17057 done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017058 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17059echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017060fi
17061
17062if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17063 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17064 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17065 echo "using lib$ipv6lib"
17066 else
17067 if test $ipv6trylibc = "yes"; then
17068 echo "using libc"
17069 else
17070 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17071 echo "You need to fetch lib$ipv6lib.a from appropriate"
17072 echo 'ipv6 kit and compile beforehand.'
17073 exit 1
17074 fi
17075 fi
17076fi
17077
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017078{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17079echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017080cat >conftest.$ac_ext <<_ACEOF
17081/* confdefs.h. */
17082_ACEOF
17083cat confdefs.h >>conftest.$ac_ext
17084cat >>conftest.$ac_ext <<_ACEOF
17085/* end confdefs.h. */
17086#include <Carbon/Carbon.h>
17087int
17088main ()
17089{
17090FSIORefNum fRef = 0
17091 ;
17092 return 0;
17093}
17094_ACEOF
17095rm -f conftest.$ac_objext
17096if { (ac_try="$ac_compile"
17097case "(($ac_try" in
17098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17099 *) ac_try_echo=$ac_try;;
17100esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017102 (eval "$ac_compile") 2>conftest.er1
17103 ac_status=$?
17104 grep -v '^ *+' conftest.er1 >conftest.err
17105 rm -f conftest.er1
17106 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017108 (exit $ac_status); } && {
17109 test -z "$ac_c_werror_flag" ||
17110 test ! -s conftest.err
17111 } && test -s conftest.$ac_objext; then
17112
17113cat >>confdefs.h <<\_ACEOF
17114#define HAVE_OSX105_SDK 1
17115_ACEOF
17116
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017117 { echo "$as_me:$LINENO: result: yes" >&5
17118echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017119else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017120 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017121sed 's/^/| /' conftest.$ac_ext >&5
17122
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017123 { echo "$as_me:$LINENO: result: no" >&5
17124echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017125
17126fi
17127
17128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17129
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017130# Check for --with-doc-strings
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017131{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17132echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017135if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 withval=$with_doc_strings;
17137fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017138
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017139
17140if test -z "$with_doc_strings"
17141then with_doc_strings="yes"
17142fi
17143if test "$with_doc_strings" != "no"
17144then
17145
17146cat >>confdefs.h <<\_ACEOF
17147#define WITH_DOC_STRINGS 1
17148_ACEOF
17149
17150fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017151{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17152echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017153
Neil Schemenauera35c6882001-02-27 04:45:05 +000017154# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017155{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17156echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017158# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017159if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017161if test "$withval" != no
17162then
17163
17164cat >>confdefs.h <<\_ACEOF
17165#define WITH_TSC 1
17166_ACEOF
17167
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017168 { echo "$as_me:$LINENO: result: yes" >&5
17169echo "${ECHO_T}yes" >&6; }
17170else { echo "$as_me:$LINENO: result: no" >&5
17171echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017172fi
17173else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017174 { echo "$as_me:$LINENO: result: no" >&5
17175echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176fi
17177
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017178
17179# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017180{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17181echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017184if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 withval=$with_pymalloc;
17186fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017187
Neil Schemenauera35c6882001-02-27 04:45:05 +000017188
Neil Schemenauer16c22972002-03-22 15:34:49 +000017189if test -z "$with_pymalloc"
17190then with_pymalloc="yes"
17191fi
17192if test "$with_pymalloc" != "no"
17193then
Martin v. Löwis11437992002-04-12 09:54:03 +000017194
17195cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017196#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017197_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017198
17199fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017200{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17201echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017202
Barry Warsawef82cd72000-06-30 16:21:01 +000017203# Check for --with-wctype-functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017204{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17205echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017207# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017208if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017210if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017211then
17212
17213cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017214#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017215_ACEOF
17216
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017217 { echo "$as_me:$LINENO: result: yes" >&5
17218echo "${ECHO_T}yes" >&6; }
17219else { echo "$as_me:$LINENO: result: no" >&5
17220echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017221fi
17222else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017223 { echo "$as_me:$LINENO: result: no" >&5
17224echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225fi
17226
Barry Warsawef82cd72000-06-30 16:21:01 +000017227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017228# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017229
Guido van Rossum98935bf2001-09-05 19:13:16 +000017230DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017231
Guido van Rossume97ee181999-12-20 21:27:22 +000017232# the dlopen() function means we might want to use dynload_shlib.o. some
17233# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017234
Thomas Wouters3a584202000-08-05 23:28:51 +000017235for ac_func in dlopen
17236do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017237as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17238{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17239echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017242else
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017244/* confdefs.h. */
17245_ACEOF
17246cat confdefs.h >>conftest.$ac_ext
17247cat >>conftest.$ac_ext <<_ACEOF
17248/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017249/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17250 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17251#define $ac_func innocuous_$ac_func
17252
Guido van Rossume97ee181999-12-20 21:27:22 +000017253/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017254 which can conflict with char $ac_func (); below.
17255 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017256 <limits.h> exists even on freestanding compilers. */
17257
17258#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017259# include <limits.h>
17260#else
17261# include <assert.h>
17262#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017263
17264#undef $ac_func
17265
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017266/* Override any GCC internal prototype to avoid an error.
17267 Use char because int might match the return type of a GCC
17268 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017269#ifdef __cplusplus
17270extern "C"
17271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017272char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017273/* The GNU C library defines this for functions which it implements
17274 to always fail with ENOSYS. Some functions are actually named
17275 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017277choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017278#endif
17279
Skip Montanaro6dead952003-09-25 14:50:04 +000017280int
17281main ()
17282{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017284 ;
17285 return 0;
17286}
17287_ACEOF
17288rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017289if { (ac_try="$ac_link"
17290case "(($ac_try" in
17291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17292 *) ac_try_echo=$ac_try;;
17293esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017295 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017297 grep -v '^ *+' conftest.er1 >conftest.err
17298 rm -f conftest.er1
17299 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017301 (exit $ac_status); } && {
17302 test -z "$ac_c_werror_flag" ||
17303 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017304 } && test -s conftest$ac_exeext &&
17305 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017306 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017307else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017309sed 's/^/| /' conftest.$ac_ext >&5
17310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017313
17314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017315 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017316fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017317ac_res=`eval echo '${'$as_ac_var'}'`
17318 { echo "$as_me:$LINENO: result: $ac_res" >&5
17319echo "${ECHO_T}$ac_res" >&6; }
17320if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017321 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017322#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017323_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017324
Guido van Rossume97ee181999-12-20 21:27:22 +000017325fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017326done
Guido van Rossume97ee181999-12-20 21:27:22 +000017327
Michael W. Hudson54241132001-12-07 15:38:26 +000017328
Guido van Rossume97ee181999-12-20 21:27:22 +000017329# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17330# loading of modules.
17331
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017332{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17333echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017334if test -z "$DYNLOADFILE"
17335then
17336 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017337 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17338 if test "$ac_cv_func_dlopen" = yes
17339 then DYNLOADFILE="dynload_shlib.o"
17340 else DYNLOADFILE="dynload_aix.o"
17341 fi
17342 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017343 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017344 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17345 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017346 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017347 *)
17348 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17349 # out any dynamic loading
17350 if test "$ac_cv_func_dlopen" = yes
17351 then DYNLOADFILE="dynload_shlib.o"
17352 else DYNLOADFILE="dynload_stub.o"
17353 fi
17354 ;;
17355 esac
17356fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017357{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17358echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017359if test "$DYNLOADFILE" != "dynload_stub.o"
17360then
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
17362cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017363#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017364_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017365
17366fi
17367
Neil Schemenauer4e425612001-06-19 15:44:15 +000017368# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17369
Michael W. Hudson54241132001-12-07 15:38:26 +000017370
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017371{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17372echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017373if test -z "$MACHDEP_OBJS"
17374then
Jack Jansene578a632001-08-15 01:27:14 +000017375 MACHDEP_OBJS=$extra_machdep_objs
17376else
17377 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017378fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017379{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17380echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017381
Guido van Rossum627b2d71993-12-24 10:39:16 +000017382# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
Martin v. Löwisd6320502004-08-12 13:45:08 +000017454
Martin v. Löwisc3001752005-01-23 09:27:24 +000017455
17456
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017457
17458
Thomas Wouterscf297e42007-02-23 15:07:44 +000017459
17460
Gregory P. Smith25523d22007-09-03 16:44:55 +000017461
Christian Heimes4e30a842007-11-30 22:12:06 +000017462
Martin v. Löwis92fab752008-03-08 10:40:41 +000017463
Martin v. Löwis823725e2008-03-24 13:39:54 +000017464
17465
Benjamin Peterson965ce872009-04-05 21:24:58 +000017466
17467
17468
17469
Martin v. Löwis011e8422009-05-05 04:43:17 +000017470
Martin v. Löwis113a0852009-05-29 17:25:39 +000017471
Martin v. Löwis823725e2008-03-24 13:39:54 +000017472for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17473 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017474 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017475 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017476 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017477 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017478 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017479 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17480 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017481 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017482 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017483 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017484 truncate uname unsetenv utimes waitpid wait3 wait4 \
17485 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017486do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17488{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017492else
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017494/* confdefs.h. */
17495_ACEOF
17496cat confdefs.h >>conftest.$ac_ext
17497cat >>conftest.$ac_ext <<_ACEOF
17498/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17501#define $ac_func innocuous_$ac_func
17502
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017503/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017504 which can conflict with char $ac_func (); below.
17505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017506 <limits.h> exists even on freestanding compilers. */
17507
17508#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017509# include <limits.h>
17510#else
17511# include <assert.h>
17512#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017513
17514#undef $ac_func
17515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017516/* Override any GCC internal prototype to avoid an error.
17517 Use char because int might match the return type of a GCC
17518 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017519#ifdef __cplusplus
17520extern "C"
17521#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017522char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017523/* The GNU C library defines this for functions which it implements
17524 to always fail with ENOSYS. Some functions are actually named
17525 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017527choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017528#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017529
Skip Montanaro6dead952003-09-25 14:50:04 +000017530int
17531main ()
17532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017534 ;
17535 return 0;
17536}
17537_ACEOF
17538rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539if { (ac_try="$ac_link"
17540case "(($ac_try" in
17541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17542 *) ac_try_echo=$ac_try;;
17543esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 grep -v '^ *+' conftest.er1 >conftest.err
17548 rm -f conftest.er1
17549 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 (exit $ac_status); } && {
17552 test -z "$ac_c_werror_flag" ||
17553 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017554 } && test -s conftest$ac_exeext &&
17555 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017557else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017559sed 's/^/| /' conftest.$ac_ext >&5
17560
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563
17564rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017565 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017566fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017567ac_res=`eval echo '${'$as_ac_var'}'`
17568 { echo "$as_me:$LINENO: result: $ac_res" >&5
17569echo "${ECHO_T}$ac_res" >&6; }
17570if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017572#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017574
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017575fi
17576done
17577
Michael W. Hudson54241132001-12-07 15:38:26 +000017578
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017579# For some functions, having a definition is not sufficient, since
17580# we want to take their address.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017581{ echo "$as_me:$LINENO: checking for chroot" >&5
17582echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017584/* confdefs.h. */
17585_ACEOF
17586cat confdefs.h >>conftest.$ac_ext
17587cat >>conftest.$ac_ext <<_ACEOF
17588/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017589#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017590int
17591main ()
17592{
17593void *x=chroot
17594 ;
17595 return 0;
17596}
17597_ACEOF
17598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599if { (ac_try="$ac_compile"
17600case "(($ac_try" in
17601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17602 *) ac_try_echo=$ac_try;;
17603esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017607 grep -v '^ *+' conftest.er1 >conftest.err
17608 rm -f conftest.er1
17609 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611 (exit $ac_status); } && {
17612 test -z "$ac_c_werror_flag" ||
17613 test ! -s conftest.err
17614 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017615
17616cat >>confdefs.h <<\_ACEOF
17617#define HAVE_CHROOT 1
17618_ACEOF
17619
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017620 { echo "$as_me:$LINENO: result: yes" >&5
17621echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017622else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017624sed 's/^/| /' conftest.$ac_ext >&5
17625
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017626 { echo "$as_me:$LINENO: result: no" >&5
17627echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017628
17629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630
17631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017632{ echo "$as_me:$LINENO: checking for link" >&5
17633echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017635/* confdefs.h. */
17636_ACEOF
17637cat confdefs.h >>conftest.$ac_ext
17638cat >>conftest.$ac_ext <<_ACEOF
17639/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017640#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017641int
17642main ()
17643{
17644void *x=link
17645 ;
17646 return 0;
17647}
17648_ACEOF
17649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650if { (ac_try="$ac_compile"
17651case "(($ac_try" in
17652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17653 *) ac_try_echo=$ac_try;;
17654esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017658 grep -v '^ *+' conftest.er1 >conftest.err
17659 rm -f conftest.er1
17660 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662 (exit $ac_status); } && {
17663 test -z "$ac_c_werror_flag" ||
17664 test ! -s conftest.err
17665 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017666
17667cat >>confdefs.h <<\_ACEOF
17668#define HAVE_LINK 1
17669_ACEOF
17670
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017671 { echo "$as_me:$LINENO: result: yes" >&5
17672echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017673else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017675sed 's/^/| /' conftest.$ac_ext >&5
17676
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017677 { echo "$as_me:$LINENO: result: no" >&5
17678echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017679
17680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681
17682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017683{ echo "$as_me:$LINENO: checking for symlink" >&5
17684echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017686/* confdefs.h. */
17687_ACEOF
17688cat confdefs.h >>conftest.$ac_ext
17689cat >>conftest.$ac_ext <<_ACEOF
17690/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017691#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017692int
17693main ()
17694{
17695void *x=symlink
17696 ;
17697 return 0;
17698}
17699_ACEOF
17700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701if { (ac_try="$ac_compile"
17702case "(($ac_try" in
17703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17704 *) ac_try_echo=$ac_try;;
17705esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017709 grep -v '^ *+' conftest.er1 >conftest.err
17710 rm -f conftest.er1
17711 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 (exit $ac_status); } && {
17714 test -z "$ac_c_werror_flag" ||
17715 test ! -s conftest.err
17716 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017717
17718cat >>confdefs.h <<\_ACEOF
17719#define HAVE_SYMLINK 1
17720_ACEOF
17721
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017722 { echo "$as_me:$LINENO: result: yes" >&5
17723echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017724else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017726sed 's/^/| /' conftest.$ac_ext >&5
17727
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017728 { echo "$as_me:$LINENO: result: no" >&5
17729echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017730
17731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732
17733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017734{ echo "$as_me:$LINENO: checking for fchdir" >&5
17735echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017737/* confdefs.h. */
17738_ACEOF
17739cat confdefs.h >>conftest.$ac_ext
17740cat >>conftest.$ac_ext <<_ACEOF
17741/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017742#include <unistd.h>
17743int
17744main ()
17745{
17746void *x=fchdir
17747 ;
17748 return 0;
17749}
17750_ACEOF
17751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752if { (ac_try="$ac_compile"
17753case "(($ac_try" in
17754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17755 *) ac_try_echo=$ac_try;;
17756esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017760 grep -v '^ *+' conftest.er1 >conftest.err
17761 rm -f conftest.er1
17762 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017764 (exit $ac_status); } && {
17765 test -z "$ac_c_werror_flag" ||
17766 test ! -s conftest.err
17767 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017768
17769cat >>confdefs.h <<\_ACEOF
17770#define HAVE_FCHDIR 1
17771_ACEOF
17772
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017773 { echo "$as_me:$LINENO: result: yes" >&5
17774echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017775else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017777sed 's/^/| /' conftest.$ac_ext >&5
17778
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017779 { echo "$as_me:$LINENO: result: no" >&5
17780echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017781
17782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783
17784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017785{ echo "$as_me:$LINENO: checking for fsync" >&5
17786echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017788/* confdefs.h. */
17789_ACEOF
17790cat confdefs.h >>conftest.$ac_ext
17791cat >>conftest.$ac_ext <<_ACEOF
17792/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017793#include <unistd.h>
17794int
17795main ()
17796{
17797void *x=fsync
17798 ;
17799 return 0;
17800}
17801_ACEOF
17802rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803if { (ac_try="$ac_compile"
17804case "(($ac_try" in
17805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17806 *) ac_try_echo=$ac_try;;
17807esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017811 grep -v '^ *+' conftest.er1 >conftest.err
17812 rm -f conftest.er1
17813 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017815 (exit $ac_status); } && {
17816 test -z "$ac_c_werror_flag" ||
17817 test ! -s conftest.err
17818 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017819
17820cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017821#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017822_ACEOF
17823
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017824 { echo "$as_me:$LINENO: result: yes" >&5
17825echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017826else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017828sed 's/^/| /' conftest.$ac_ext >&5
17829
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017830 { echo "$as_me:$LINENO: result: no" >&5
17831echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017832
17833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834
17835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017836{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17837echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017838cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017839/* confdefs.h. */
17840_ACEOF
17841cat confdefs.h >>conftest.$ac_ext
17842cat >>conftest.$ac_ext <<_ACEOF
17843/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017844#include <unistd.h>
17845int
17846main ()
17847{
17848void *x=fdatasync
17849 ;
17850 return 0;
17851}
17852_ACEOF
17853rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854if { (ac_try="$ac_compile"
17855case "(($ac_try" in
17856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17857 *) ac_try_echo=$ac_try;;
17858esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017862 grep -v '^ *+' conftest.er1 >conftest.err
17863 rm -f conftest.er1
17864 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866 (exit $ac_status); } && {
17867 test -z "$ac_c_werror_flag" ||
17868 test ! -s conftest.err
17869 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017870
17871cat >>confdefs.h <<\_ACEOF
17872#define HAVE_FDATASYNC 1
17873_ACEOF
17874
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017875 { echo "$as_me:$LINENO: result: yes" >&5
17876echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017877else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017878 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017879sed 's/^/| /' conftest.$ac_ext >&5
17880
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017881 { echo "$as_me:$LINENO: result: no" >&5
17882echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017883
17884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017885
17886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017887{ echo "$as_me:$LINENO: checking for epoll" >&5
17888echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017889cat >conftest.$ac_ext <<_ACEOF
17890/* confdefs.h. */
17891_ACEOF
17892cat confdefs.h >>conftest.$ac_ext
17893cat >>conftest.$ac_ext <<_ACEOF
17894/* end confdefs.h. */
17895#include <sys/epoll.h>
17896int
17897main ()
17898{
17899void *x=epoll_create
17900 ;
17901 return 0;
17902}
17903_ACEOF
17904rm -f conftest.$ac_objext
17905if { (ac_try="$ac_compile"
17906case "(($ac_try" in
17907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17908 *) ac_try_echo=$ac_try;;
17909esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017911 (eval "$ac_compile") 2>conftest.er1
17912 ac_status=$?
17913 grep -v '^ *+' conftest.er1 >conftest.err
17914 rm -f conftest.er1
17915 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017917 (exit $ac_status); } && {
17918 test -z "$ac_c_werror_flag" ||
17919 test ! -s conftest.err
17920 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017921
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017922cat >>confdefs.h <<\_ACEOF
17923#define HAVE_EPOLL 1
17924_ACEOF
17925
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017926 { echo "$as_me:$LINENO: result: yes" >&5
17927echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017928else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017929 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017930sed 's/^/| /' conftest.$ac_ext >&5
17931
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017932 { echo "$as_me:$LINENO: result: no" >&5
17933echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017934
17935fi
17936
17937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017938{ echo "$as_me:$LINENO: checking for kqueue" >&5
17939echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017940cat >conftest.$ac_ext <<_ACEOF
17941/* confdefs.h. */
17942_ACEOF
17943cat confdefs.h >>conftest.$ac_ext
17944cat >>conftest.$ac_ext <<_ACEOF
17945/* end confdefs.h. */
17946
17947#include <sys/types.h>
17948#include <sys/event.h>
17949
17950int
17951main ()
17952{
17953int x=kqueue()
17954 ;
17955 return 0;
17956}
17957_ACEOF
17958rm -f conftest.$ac_objext
17959if { (ac_try="$ac_compile"
17960case "(($ac_try" in
17961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17962 *) ac_try_echo=$ac_try;;
17963esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017965 (eval "$ac_compile") 2>conftest.er1
17966 ac_status=$?
17967 grep -v '^ *+' conftest.er1 >conftest.err
17968 rm -f conftest.er1
17969 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017971 (exit $ac_status); } && {
17972 test -z "$ac_c_werror_flag" ||
17973 test ! -s conftest.err
17974 } && test -s conftest.$ac_objext; then
17975
17976cat >>confdefs.h <<\_ACEOF
17977#define HAVE_KQUEUE 1
17978_ACEOF
17979
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017980 { echo "$as_me:$LINENO: result: yes" >&5
17981echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017982else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017983 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017984sed 's/^/| /' conftest.$ac_ext >&5
17985
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017986 { echo "$as_me:$LINENO: result: no" >&5
17987echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017988
17989fi
17990
17991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017992# On some systems (eg. FreeBSD 5), we would find a definition of the
17993# functions ctermid_r, setgroups in the library, but no prototype
17994# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17995# address to avoid compiler warnings and potential miscompilations
17996# because of the missing prototypes.
17997
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017998{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
17999echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018000cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018001/* confdefs.h. */
18002_ACEOF
18003cat confdefs.h >>conftest.$ac_ext
18004cat >>conftest.$ac_ext <<_ACEOF
18005/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018006
18007#include "confdefs.h"
18008#include <stdio.h>
18009
Martin v. Löwisd5843682002-11-21 20:41:28 +000018010int
18011main ()
18012{
18013void* p = ctermid_r
18014 ;
18015 return 0;
18016}
18017_ACEOF
18018rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019if { (ac_try="$ac_compile"
18020case "(($ac_try" in
18021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18022 *) ac_try_echo=$ac_try;;
18023esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018026 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018027 grep -v '^ *+' conftest.er1 >conftest.err
18028 rm -f conftest.er1
18029 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031 (exit $ac_status); } && {
18032 test -z "$ac_c_werror_flag" ||
18033 test ! -s conftest.err
18034 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018035
18036cat >>confdefs.h <<\_ACEOF
18037#define HAVE_CTERMID_R 1
18038_ACEOF
18039
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018040 { echo "$as_me:$LINENO: result: yes" >&5
18041echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018042else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018043 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018044sed 's/^/| /' conftest.$ac_ext >&5
18045
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018046 { echo "$as_me:$LINENO: result: no" >&5
18047echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018048
18049fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18052
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018053{ echo "$as_me:$LINENO: checking for flock" >&5
18054echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018056/* confdefs.h. */
18057_ACEOF
18058cat confdefs.h >>conftest.$ac_ext
18059cat >>conftest.$ac_ext <<_ACEOF
18060/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018061
18062#include "confdefs.h"
18063#include <sys/file.h>
18064
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018065int
18066main ()
18067{
18068void* p = flock
18069 ;
18070 return 0;
18071}
18072_ACEOF
18073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074if { (ac_try="$ac_compile"
18075case "(($ac_try" in
18076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18077 *) ac_try_echo=$ac_try;;
18078esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018082 grep -v '^ *+' conftest.er1 >conftest.err
18083 rm -f conftest.er1
18084 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086 (exit $ac_status); } && {
18087 test -z "$ac_c_werror_flag" ||
18088 test ! -s conftest.err
18089 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018090
18091cat >>confdefs.h <<\_ACEOF
18092#define HAVE_FLOCK 1
18093_ACEOF
18094
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018095 { echo "$as_me:$LINENO: result: yes" >&5
18096echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018097else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018099sed 's/^/| /' conftest.$ac_ext >&5
18100
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018101 { echo "$as_me:$LINENO: result: no" >&5
18102echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018103
18104fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18107
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018108{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18109echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018111/* confdefs.h. */
18112_ACEOF
18113cat confdefs.h >>conftest.$ac_ext
18114cat >>conftest.$ac_ext <<_ACEOF
18115/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018116
18117#include "confdefs.h"
18118#include <unistd.h>
18119
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018120int
18121main ()
18122{
18123void* p = getpagesize
18124 ;
18125 return 0;
18126}
18127_ACEOF
18128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129if { (ac_try="$ac_compile"
18130case "(($ac_try" in
18131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18132 *) ac_try_echo=$ac_try;;
18133esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018137 grep -v '^ *+' conftest.er1 >conftest.err
18138 rm -f conftest.er1
18139 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141 (exit $ac_status); } && {
18142 test -z "$ac_c_werror_flag" ||
18143 test ! -s conftest.err
18144 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018145
18146cat >>confdefs.h <<\_ACEOF
18147#define HAVE_GETPAGESIZE 1
18148_ACEOF
18149
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018150 { echo "$as_me:$LINENO: result: yes" >&5
18151echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018152else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018154sed 's/^/| /' conftest.$ac_ext >&5
18155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018156 { echo "$as_me:$LINENO: result: no" >&5
18157echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018158
18159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018160
18161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018162
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018163for ac_prog in true
18164do
18165 # Extract the first word of "$ac_prog", so it can be a program name with args.
18166set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018167{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18168echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018169if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018170 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018171else
18172 if test -n "$TRUE"; then
18173 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18174else
18175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18176for as_dir in $PATH
18177do
18178 IFS=$as_save_IFS
18179 test -z "$as_dir" && as_dir=.
18180 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181 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 +000018182 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018183 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018184 break 2
18185 fi
18186done
18187done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018189
18190fi
18191fi
18192TRUE=$ac_cv_prog_TRUE
18193if test -n "$TRUE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018194 { echo "$as_me:$LINENO: result: $TRUE" >&5
18195echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018196else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018197 { echo "$as_me:$LINENO: result: no" >&5
18198echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018199fi
18200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018202 test -n "$TRUE" && break
18203done
18204test -n "$TRUE" || TRUE="/bin/true"
18205
18206
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018207{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18208echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018209if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018211else
18212 ac_check_lib_save_LIBS=$LIBS
18213LIBS="-lc $LIBS"
18214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018215/* confdefs.h. */
18216_ACEOF
18217cat confdefs.h >>conftest.$ac_ext
18218cat >>conftest.$ac_ext <<_ACEOF
18219/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018221/* Override any GCC internal prototype to avoid an error.
18222 Use char because int might match the return type of a GCC
18223 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018224#ifdef __cplusplus
18225extern "C"
18226#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018227char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018228int
18229main ()
18230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018232 ;
18233 return 0;
18234}
18235_ACEOF
18236rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018237if { (ac_try="$ac_link"
18238case "(($ac_try" in
18239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18240 *) ac_try_echo=$ac_try;;
18241esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018245 grep -v '^ *+' conftest.er1 >conftest.err
18246 rm -f conftest.er1
18247 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249 (exit $ac_status); } && {
18250 test -z "$ac_c_werror_flag" ||
18251 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018252 } && test -s conftest$ac_exeext &&
18253 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018254 ac_cv_lib_c_inet_aton=yes
18255else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018257sed 's/^/| /' conftest.$ac_ext >&5
18258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018261
18262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018263 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018264LIBS=$ac_check_lib_save_LIBS
18265fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018266{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18267echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18268if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018269 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018270else
18271
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018272{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18273echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018274if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018275 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018276else
18277 ac_check_lib_save_LIBS=$LIBS
18278LIBS="-lresolv $LIBS"
18279cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018280/* confdefs.h. */
18281_ACEOF
18282cat confdefs.h >>conftest.$ac_ext
18283cat >>conftest.$ac_ext <<_ACEOF
18284/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018285
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286/* Override any GCC internal prototype to avoid an error.
18287 Use char because int might match the return type of a GCC
18288 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018289#ifdef __cplusplus
18290extern "C"
18291#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018292char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018293int
18294main ()
18295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018297 ;
18298 return 0;
18299}
18300_ACEOF
18301rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018302if { (ac_try="$ac_link"
18303case "(($ac_try" in
18304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18305 *) ac_try_echo=$ac_try;;
18306esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018308 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018310 grep -v '^ *+' conftest.er1 >conftest.err
18311 rm -f conftest.er1
18312 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018314 (exit $ac_status); } && {
18315 test -z "$ac_c_werror_flag" ||
18316 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018317 } && test -s conftest$ac_exeext &&
18318 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018319 ac_cv_lib_resolv_inet_aton=yes
18320else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018322sed 's/^/| /' conftest.$ac_ext >&5
18323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018324 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018326
18327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018328 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018329LIBS=$ac_check_lib_save_LIBS
18330fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018331{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18332echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18333if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018334 cat >>confdefs.h <<_ACEOF
18335#define HAVE_LIBRESOLV 1
18336_ACEOF
18337
18338 LIBS="-lresolv $LIBS"
18339
18340fi
18341
18342
18343fi
18344
18345
Christian Heimesd0764e22007-12-04 15:00:33 +000018346# On Tru64, chflags seems to be present, but calling it will
18347# exit Python
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018348{ echo "$as_me:$LINENO: checking for chflags" >&5
18349echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018350if test "${ac_cv_have_chflags+set}" = set; then
18351 echo $ECHO_N "(cached) $ECHO_C" >&6
18352else
18353 if test "$cross_compiling" = yes; then
18354 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018355else
18356 cat >conftest.$ac_ext <<_ACEOF
18357/* confdefs.h. */
18358_ACEOF
18359cat confdefs.h >>conftest.$ac_ext
18360cat >>conftest.$ac_ext <<_ACEOF
18361/* end confdefs.h. */
18362
18363#include <sys/stat.h>
18364#include <unistd.h>
18365int main(int argc, char*argv[])
18366{
18367 if(chflags(argv[0], 0) != 0)
18368 return 1;
18369 return 0;
18370}
18371
18372_ACEOF
18373rm -f conftest$ac_exeext
18374if { (ac_try="$ac_link"
18375case "(($ac_try" in
18376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18377 *) ac_try_echo=$ac_try;;
18378esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018380 (eval "$ac_link") 2>&5
18381 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18384 { (case "(($ac_try" in
18385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18386 *) ac_try_echo=$ac_try;;
18387esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018389 (eval "$ac_try") 2>&5
18390 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018392 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018393 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018394else
18395 echo "$as_me: program exited with status $ac_status" >&5
18396echo "$as_me: failed program was:" >&5
18397sed 's/^/| /' conftest.$ac_ext >&5
18398
18399( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018400ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018401fi
18402rm -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 +000018403fi
18404
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018405
18406
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018407fi
18408
18409{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18410echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18411if test $ac_cv_have_chflags = yes
18412then
18413
18414cat >>confdefs.h <<\_ACEOF
18415#define HAVE_CHFLAGS 1
18416_ACEOF
18417
18418fi
18419
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018420{ echo "$as_me:$LINENO: checking for lchflags" >&5
18421echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018422if test "${ac_cv_have_lchflags+set}" = set; then
18423 echo $ECHO_N "(cached) $ECHO_C" >&6
18424else
18425 if test "$cross_compiling" = yes; then
18426 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018427else
18428 cat >conftest.$ac_ext <<_ACEOF
18429/* confdefs.h. */
18430_ACEOF
18431cat confdefs.h >>conftest.$ac_ext
18432cat >>conftest.$ac_ext <<_ACEOF
18433/* end confdefs.h. */
18434
18435#include <sys/stat.h>
18436#include <unistd.h>
18437int main(int argc, char*argv[])
18438{
18439 if(lchflags(argv[0], 0) != 0)
18440 return 1;
18441 return 0;
18442}
18443
18444_ACEOF
18445rm -f conftest$ac_exeext
18446if { (ac_try="$ac_link"
18447case "(($ac_try" in
18448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18449 *) ac_try_echo=$ac_try;;
18450esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018452 (eval "$ac_link") 2>&5
18453 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18456 { (case "(($ac_try" in
18457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18458 *) ac_try_echo=$ac_try;;
18459esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018461 (eval "$ac_try") 2>&5
18462 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018464 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018465 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018466else
18467 echo "$as_me: program exited with status $ac_status" >&5
18468echo "$as_me: failed program was:" >&5
18469sed 's/^/| /' conftest.$ac_ext >&5
18470
18471( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018472ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018473fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18475fi
18476
18477
Christian Heimesd0764e22007-12-04 15:00:33 +000018478
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018479fi
18480
18481{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18482echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18483if test $ac_cv_have_lchflags = yes
18484then
18485
18486cat >>confdefs.h <<\_ACEOF
18487#define HAVE_LCHFLAGS 1
18488_ACEOF
18489
18490fi
18491
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018492case $ac_sys_system/$ac_sys_release in
18493Darwin/*)
18494 _CUR_CFLAGS="${CFLAGS}"
18495 _CUR_LDFLAGS="${LDFLAGS}"
18496 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18497 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18498 ;;
18499esac
18500
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018501{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18502echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018503if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018504 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018505else
18506 ac_check_lib_save_LIBS=$LIBS
18507LIBS="-lz $LIBS"
18508cat >conftest.$ac_ext <<_ACEOF
18509/* confdefs.h. */
18510_ACEOF
18511cat confdefs.h >>conftest.$ac_ext
18512cat >>conftest.$ac_ext <<_ACEOF
18513/* end confdefs.h. */
18514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018515/* Override any GCC internal prototype to avoid an error.
18516 Use char because int might match the return type of a GCC
18517 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018518#ifdef __cplusplus
18519extern "C"
18520#endif
18521char inflateCopy ();
18522int
18523main ()
18524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018526 ;
18527 return 0;
18528}
18529_ACEOF
18530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531if { (ac_try="$ac_link"
18532case "(($ac_try" in
18533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18534 *) ac_try_echo=$ac_try;;
18535esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018538 ac_status=$?
18539 grep -v '^ *+' conftest.er1 >conftest.err
18540 rm -f conftest.er1
18541 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543 (exit $ac_status); } && {
18544 test -z "$ac_c_werror_flag" ||
18545 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018546 } && test -s conftest$ac_exeext &&
18547 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018548 ac_cv_lib_z_inflateCopy=yes
18549else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018550 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018551sed 's/^/| /' conftest.$ac_ext >&5
18552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018553 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555
18556rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018557 conftest$ac_exeext conftest.$ac_ext
18558LIBS=$ac_check_lib_save_LIBS
18559fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018560{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18561echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18562if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018563
18564cat >>confdefs.h <<\_ACEOF
18565#define HAVE_ZLIB_COPY 1
18566_ACEOF
18567
18568fi
18569
18570
18571case $ac_sys_system/$ac_sys_release in
18572Darwin/*)
18573 CFLAGS="${_CUR_CFLAGS}"
18574 LDFLAGS="${_CUR_LDFLAGS}"
18575 ;;
18576esac
18577
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018578{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18579echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018581/* confdefs.h. */
18582_ACEOF
18583cat confdefs.h >>conftest.$ac_ext
18584cat >>conftest.$ac_ext <<_ACEOF
18585/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018586
18587#include "confdefs.h"
18588#include <netdb.h>
18589
Martin v. Löwise9416172003-05-03 10:12:45 +000018590int
18591main ()
18592{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018593void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018594 ;
18595 return 0;
18596}
18597_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018598rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599if { (ac_try="$ac_link"
18600case "(($ac_try" in
18601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18602 *) ac_try_echo=$ac_try;;
18603esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018605 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018607 grep -v '^ *+' conftest.er1 >conftest.err
18608 rm -f conftest.er1
18609 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611 (exit $ac_status); } && {
18612 test -z "$ac_c_werror_flag" ||
18613 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018614 } && test -s conftest$ac_exeext &&
18615 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018616
18617cat >>confdefs.h <<\_ACEOF
18618#define HAVE_HSTRERROR 1
18619_ACEOF
18620
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018621 { echo "$as_me:$LINENO: result: yes" >&5
18622echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018623else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018625sed 's/^/| /' conftest.$ac_ext >&5
18626
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018627 { echo "$as_me:$LINENO: result: no" >&5
18628echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018629
18630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018631
18632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018634
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018635{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18636echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018638/* confdefs.h. */
18639_ACEOF
18640cat confdefs.h >>conftest.$ac_ext
18641cat >>conftest.$ac_ext <<_ACEOF
18642/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018643
18644#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018645#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018646#include <sys/socket.h>
18647#include <netinet/in.h>
18648#include <arpa/inet.h>
18649
Martin v. Löwise9416172003-05-03 10:12:45 +000018650int
18651main ()
18652{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018653void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018654 ;
18655 return 0;
18656}
18657_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018658rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018659if { (ac_try="$ac_link"
18660case "(($ac_try" in
18661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662 *) ac_try_echo=$ac_try;;
18663esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018665 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018671 (exit $ac_status); } && {
18672 test -z "$ac_c_werror_flag" ||
18673 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018674 } && test -s conftest$ac_exeext &&
18675 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018676
18677cat >>confdefs.h <<\_ACEOF
18678#define HAVE_INET_ATON 1
18679_ACEOF
18680
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018681 { echo "$as_me:$LINENO: result: yes" >&5
18682echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018683else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018685sed 's/^/| /' conftest.$ac_ext >&5
18686
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018687 { echo "$as_me:$LINENO: result: no" >&5
18688echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018689
18690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018691
18692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018694
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018695{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18696echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018698/* confdefs.h. */
18699_ACEOF
18700cat confdefs.h >>conftest.$ac_ext
18701cat >>conftest.$ac_ext <<_ACEOF
18702/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018703
18704#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018705#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018706#include <sys/socket.h>
18707#include <netinet/in.h>
18708#include <arpa/inet.h>
18709
Martin v. Löwise9416172003-05-03 10:12:45 +000018710int
18711main ()
18712{
18713void* p = inet_pton
18714 ;
18715 return 0;
18716}
18717_ACEOF
18718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018719if { (ac_try="$ac_compile"
18720case "(($ac_try" in
18721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18722 *) ac_try_echo=$ac_try;;
18723esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018727 grep -v '^ *+' conftest.er1 >conftest.err
18728 rm -f conftest.er1
18729 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731 (exit $ac_status); } && {
18732 test -z "$ac_c_werror_flag" ||
18733 test ! -s conftest.err
18734 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018735
18736cat >>confdefs.h <<\_ACEOF
18737#define HAVE_INET_PTON 1
18738_ACEOF
18739
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018740 { echo "$as_me:$LINENO: result: yes" >&5
18741echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018742else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018744sed 's/^/| /' conftest.$ac_ext >&5
18745
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018746 { echo "$as_me:$LINENO: result: no" >&5
18747echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018748
18749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018750
18751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018752
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018753# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018754{ echo "$as_me:$LINENO: checking for setgroups" >&5
18755echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018757/* confdefs.h. */
18758_ACEOF
18759cat confdefs.h >>conftest.$ac_ext
18760cat >>conftest.$ac_ext <<_ACEOF
18761/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018762
18763#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018764#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018765#ifdef HAVE_GRP_H
18766#include <grp.h>
18767#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018768
Martin v. Löwisd5843682002-11-21 20:41:28 +000018769int
18770main ()
18771{
18772void* p = setgroups
18773 ;
18774 return 0;
18775}
18776_ACEOF
18777rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778if { (ac_try="$ac_compile"
18779case "(($ac_try" in
18780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18781 *) ac_try_echo=$ac_try;;
18782esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018785 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018786 grep -v '^ *+' conftest.er1 >conftest.err
18787 rm -f conftest.er1
18788 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790 (exit $ac_status); } && {
18791 test -z "$ac_c_werror_flag" ||
18792 test ! -s conftest.err
18793 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018794
18795cat >>confdefs.h <<\_ACEOF
18796#define HAVE_SETGROUPS 1
18797_ACEOF
18798
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018799 { echo "$as_me:$LINENO: result: yes" >&5
18800echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018801else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018803sed 's/^/| /' conftest.$ac_ext >&5
18804
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018805 { echo "$as_me:$LINENO: result: no" >&5
18806echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018807
18808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018809
18810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018811
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018812# check for openpty and forkpty
18813
Martin v. Löwis11437992002-04-12 09:54:03 +000018814
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018815for ac_func in openpty
18816do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018817as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18818{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18819echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018820if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018821 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018822else
Martin v. Löwis11437992002-04-12 09:54:03 +000018823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018824/* confdefs.h. */
18825_ACEOF
18826cat confdefs.h >>conftest.$ac_ext
18827cat >>conftest.$ac_ext <<_ACEOF
18828/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018829/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18830 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18831#define $ac_func innocuous_$ac_func
18832
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018833/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018834 which can conflict with char $ac_func (); below.
18835 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018836 <limits.h> exists even on freestanding compilers. */
18837
18838#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018839# include <limits.h>
18840#else
18841# include <assert.h>
18842#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018843
18844#undef $ac_func
18845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846/* Override any GCC internal prototype to avoid an error.
18847 Use char because int might match the return type of a GCC
18848 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018849#ifdef __cplusplus
18850extern "C"
18851#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018852char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018853/* The GNU C library defines this for functions which it implements
18854 to always fail with ENOSYS. Some functions are actually named
18855 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018856#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018857choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018858#endif
18859
Skip Montanaro6dead952003-09-25 14:50:04 +000018860int
18861main ()
18862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018864 ;
18865 return 0;
18866}
18867_ACEOF
18868rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869if { (ac_try="$ac_link"
18870case "(($ac_try" in
18871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18872 *) ac_try_echo=$ac_try;;
18873esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018877 grep -v '^ *+' conftest.er1 >conftest.err
18878 rm -f conftest.er1
18879 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018881 (exit $ac_status); } && {
18882 test -z "$ac_c_werror_flag" ||
18883 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018884 } && test -s conftest$ac_exeext &&
18885 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018886 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018887else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018889sed 's/^/| /' conftest.$ac_ext >&5
18890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018891 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018893
18894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018895 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018896fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018897ac_res=`eval echo '${'$as_ac_var'}'`
18898 { echo "$as_me:$LINENO: result: $ac_res" >&5
18899echo "${ECHO_T}$ac_res" >&6; }
18900if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018902#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018903_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018905else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018906 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18907echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018908if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018909 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018910else
Martin v. Löwis11437992002-04-12 09:54:03 +000018911 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018912LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018913cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018914/* confdefs.h. */
18915_ACEOF
18916cat confdefs.h >>conftest.$ac_ext
18917cat >>conftest.$ac_ext <<_ACEOF
18918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018920/* Override any GCC internal prototype to avoid an error.
18921 Use char because int might match the return type of a GCC
18922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018923#ifdef __cplusplus
18924extern "C"
18925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018926char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018927int
18928main ()
18929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018930return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018931 ;
18932 return 0;
18933}
18934_ACEOF
18935rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018936if { (ac_try="$ac_link"
18937case "(($ac_try" in
18938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18939 *) ac_try_echo=$ac_try;;
18940esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018942 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 grep -v '^ *+' conftest.er1 >conftest.err
18945 rm -f conftest.er1
18946 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018948 (exit $ac_status); } && {
18949 test -z "$ac_c_werror_flag" ||
18950 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018951 } && test -s conftest$ac_exeext &&
18952 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018953 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018954else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018956sed 's/^/| /' conftest.$ac_ext >&5
18957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018960
18961rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018962 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018963LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018964fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018965{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18966echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
18967if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018969#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018970_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018971 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018972else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018973 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18974echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018975if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018976 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018977else
18978 ac_check_lib_save_LIBS=$LIBS
18979LIBS="-lbsd $LIBS"
18980cat >conftest.$ac_ext <<_ACEOF
18981/* confdefs.h. */
18982_ACEOF
18983cat confdefs.h >>conftest.$ac_ext
18984cat >>conftest.$ac_ext <<_ACEOF
18985/* end confdefs.h. */
18986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987/* Override any GCC internal prototype to avoid an error.
18988 Use char because int might match the return type of a GCC
18989 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018990#ifdef __cplusplus
18991extern "C"
18992#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018993char openpty ();
18994int
18995main ()
18996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018997return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018998 ;
18999 return 0;
19000}
19001_ACEOF
19002rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019003if { (ac_try="$ac_link"
19004case "(($ac_try" in
19005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19006 *) ac_try_echo=$ac_try;;
19007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019010 ac_status=$?
19011 grep -v '^ *+' conftest.er1 >conftest.err
19012 rm -f conftest.er1
19013 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019015 (exit $ac_status); } && {
19016 test -z "$ac_c_werror_flag" ||
19017 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019018 } && test -s conftest$ac_exeext &&
19019 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019020 ac_cv_lib_bsd_openpty=yes
19021else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019022 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019023sed 's/^/| /' conftest.$ac_ext >&5
19024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019025 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019027
19028rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019029 conftest$ac_exeext conftest.$ac_ext
19030LIBS=$ac_check_lib_save_LIBS
19031fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019032{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19033echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19034if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019035 cat >>confdefs.h <<\_ACEOF
19036#define HAVE_OPENPTY 1
19037_ACEOF
19038 LIBS="$LIBS -lbsd"
19039fi
19040
19041
19042fi
19043
Fred Drake8cef4cf2000-06-28 16:40:38 +000019044
19045fi
19046done
19047
Martin v. Löwis11437992002-04-12 09:54:03 +000019048
Fred Drake8cef4cf2000-06-28 16:40:38 +000019049for ac_func in forkpty
19050do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019051as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19052{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19053echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019054if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019055 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019056else
Martin v. Löwis11437992002-04-12 09:54:03 +000019057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019058/* confdefs.h. */
19059_ACEOF
19060cat confdefs.h >>conftest.$ac_ext
19061cat >>conftest.$ac_ext <<_ACEOF
19062/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019063/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19064 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19065#define $ac_func innocuous_$ac_func
19066
Fred Drake8cef4cf2000-06-28 16:40:38 +000019067/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019068 which can conflict with char $ac_func (); below.
19069 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019070 <limits.h> exists even on freestanding compilers. */
19071
19072#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019073# include <limits.h>
19074#else
19075# include <assert.h>
19076#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019077
19078#undef $ac_func
19079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080/* Override any GCC internal prototype to avoid an error.
19081 Use char because int might match the return type of a GCC
19082 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019083#ifdef __cplusplus
19084extern "C"
19085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019086char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019087/* The GNU C library defines this for functions which it implements
19088 to always fail with ENOSYS. Some functions are actually named
19089 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019091choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019092#endif
19093
Skip Montanaro6dead952003-09-25 14:50:04 +000019094int
19095main ()
19096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019097return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019098 ;
19099 return 0;
19100}
19101_ACEOF
19102rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019103if { (ac_try="$ac_link"
19104case "(($ac_try" in
19105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19106 *) ac_try_echo=$ac_try;;
19107esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019109 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019111 grep -v '^ *+' conftest.er1 >conftest.err
19112 rm -f conftest.er1
19113 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019115 (exit $ac_status); } && {
19116 test -z "$ac_c_werror_flag" ||
19117 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019118 } && test -s conftest$ac_exeext &&
19119 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019121else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019123sed 's/^/| /' conftest.$ac_ext >&5
19124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019125 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019127
19128rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019129 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019130fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019131ac_res=`eval echo '${'$as_ac_var'}'`
19132 { echo "$as_me:$LINENO: result: $ac_res" >&5
19133echo "${ECHO_T}$ac_res" >&6; }
19134if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019135 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019136#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019137_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019138
Fred Drake8cef4cf2000-06-28 16:40:38 +000019139else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019140 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19141echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019142if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +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 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019146LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019148/* confdefs.h. */
19149_ACEOF
19150cat confdefs.h >>conftest.$ac_ext
19151cat >>conftest.$ac_ext <<_ACEOF
19152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019154/* Override any GCC internal prototype to avoid an error.
19155 Use char because int might match the return type of a GCC
19156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019157#ifdef __cplusplus
19158extern "C"
19159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019160char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019161int
19162main ()
19163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019164return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019165 ;
19166 return 0;
19167}
19168_ACEOF
19169rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019170if { (ac_try="$ac_link"
19171case "(($ac_try" in
19172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19173 *) ac_try_echo=$ac_try;;
19174esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019176 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019178 grep -v '^ *+' conftest.er1 >conftest.err
19179 rm -f conftest.er1
19180 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019182 (exit $ac_status); } && {
19183 test -z "$ac_c_werror_flag" ||
19184 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019185 } && test -s conftest$ac_exeext &&
19186 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019187 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019188else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019190sed 's/^/| /' conftest.$ac_ext >&5
19191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019192 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019194
19195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019198fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019199{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19200echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19201if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019202 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019203#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019204_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019205 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019206else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019207 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19208echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019209if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019210 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019211else
19212 ac_check_lib_save_LIBS=$LIBS
19213LIBS="-lbsd $LIBS"
19214cat >conftest.$ac_ext <<_ACEOF
19215/* confdefs.h. */
19216_ACEOF
19217cat confdefs.h >>conftest.$ac_ext
19218cat >>conftest.$ac_ext <<_ACEOF
19219/* end confdefs.h. */
19220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221/* Override any GCC internal prototype to avoid an error.
19222 Use char because int might match the return type of a GCC
19223 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019224#ifdef __cplusplus
19225extern "C"
19226#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019227char forkpty ();
19228int
19229main ()
19230{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019231return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019232 ;
19233 return 0;
19234}
19235_ACEOF
19236rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019237if { (ac_try="$ac_link"
19238case "(($ac_try" in
19239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19240 *) ac_try_echo=$ac_try;;
19241esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019243 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019244 ac_status=$?
19245 grep -v '^ *+' conftest.er1 >conftest.err
19246 rm -f conftest.er1
19247 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019249 (exit $ac_status); } && {
19250 test -z "$ac_c_werror_flag" ||
19251 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019252 } && test -s conftest$ac_exeext &&
19253 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019254 ac_cv_lib_bsd_forkpty=yes
19255else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019256 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019257sed 's/^/| /' conftest.$ac_ext >&5
19258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019259 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019261
19262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019263 conftest$ac_exeext conftest.$ac_ext
19264LIBS=$ac_check_lib_save_LIBS
19265fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019266{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19267echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19268if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019269 cat >>confdefs.h <<\_ACEOF
19270#define HAVE_FORKPTY 1
19271_ACEOF
19272 LIBS="$LIBS -lbsd"
19273fi
19274
19275
19276fi
19277
Fred Drake8cef4cf2000-06-28 16:40:38 +000019278
19279fi
19280done
19281
Jack Jansendd19cf82001-12-06 22:36:17 +000019282
Christian Heimesb186d002008-03-18 15:15:01 +000019283# Stuff for expat.
19284
19285for ac_func in memmove
19286do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019287as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19288{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19289echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019290if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019291 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019292else
19293 cat >conftest.$ac_ext <<_ACEOF
19294/* confdefs.h. */
19295_ACEOF
19296cat confdefs.h >>conftest.$ac_ext
19297cat >>conftest.$ac_ext <<_ACEOF
19298/* end confdefs.h. */
19299/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19301#define $ac_func innocuous_$ac_func
19302
19303/* System header to define __stub macros and hopefully few prototypes,
19304 which can conflict with char $ac_func (); below.
19305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19306 <limits.h> exists even on freestanding compilers. */
19307
19308#ifdef __STDC__
19309# include <limits.h>
19310#else
19311# include <assert.h>
19312#endif
19313
19314#undef $ac_func
19315
19316/* Override any GCC internal prototype to avoid an error.
19317 Use char because int might match the return type of a GCC
19318 builtin and then its argument prototype would still apply. */
19319#ifdef __cplusplus
19320extern "C"
19321#endif
19322char $ac_func ();
19323/* The GNU C library defines this for functions which it implements
19324 to always fail with ENOSYS. Some functions are actually named
19325 something starting with __ and the normal name is an alias. */
19326#if defined __stub_$ac_func || defined __stub___$ac_func
19327choke me
19328#endif
19329
19330int
19331main ()
19332{
19333return $ac_func ();
19334 ;
19335 return 0;
19336}
19337_ACEOF
19338rm -f conftest.$ac_objext conftest$ac_exeext
19339if { (ac_try="$ac_link"
19340case "(($ac_try" in
19341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342 *) ac_try_echo=$ac_try;;
19343esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019345 (eval "$ac_link") 2>conftest.er1
19346 ac_status=$?
19347 grep -v '^ *+' conftest.er1 >conftest.err
19348 rm -f conftest.er1
19349 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019351 (exit $ac_status); } && {
19352 test -z "$ac_c_werror_flag" ||
19353 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019354 } && test -s conftest$ac_exeext &&
19355 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019356 eval "$as_ac_var=yes"
19357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019358 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019359sed 's/^/| /' conftest.$ac_ext >&5
19360
19361 eval "$as_ac_var=no"
19362fi
19363
19364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19365 conftest$ac_exeext conftest.$ac_ext
19366fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019367ac_res=`eval echo '${'$as_ac_var'}'`
19368 { echo "$as_me:$LINENO: result: $ac_res" >&5
19369echo "${ECHO_T}$ac_res" >&6; }
19370if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019371 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019373_ACEOF
19374
19375fi
19376done
19377
19378
Michael W. Hudson54241132001-12-07 15:38:26 +000019379# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019380
19381
19382
19383
19384
19385
Fred Drake8cef4cf2000-06-28 16:40:38 +000019386for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19387do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019388as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19389{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19390echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019391if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019392 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019393else
Martin v. Löwis11437992002-04-12 09:54:03 +000019394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019395/* confdefs.h. */
19396_ACEOF
19397cat confdefs.h >>conftest.$ac_ext
19398cat >>conftest.$ac_ext <<_ACEOF
19399/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019400/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19401 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19402#define $ac_func innocuous_$ac_func
19403
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019404/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019405 which can conflict with char $ac_func (); below.
19406 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019407 <limits.h> exists even on freestanding compilers. */
19408
19409#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019410# include <limits.h>
19411#else
19412# include <assert.h>
19413#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019414
19415#undef $ac_func
19416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019417/* Override any GCC internal prototype to avoid an error.
19418 Use char because int might match the return type of a GCC
19419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019420#ifdef __cplusplus
19421extern "C"
19422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019423char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019424/* The GNU C library defines this for functions which it implements
19425 to always fail with ENOSYS. Some functions are actually named
19426 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019428choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019429#endif
19430
Skip Montanaro6dead952003-09-25 14:50:04 +000019431int
19432main ()
19433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019434return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 ;
19436 return 0;
19437}
19438_ACEOF
19439rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019440if { (ac_try="$ac_link"
19441case "(($ac_try" in
19442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19443 *) ac_try_echo=$ac_try;;
19444esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019446 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019448 grep -v '^ *+' conftest.er1 >conftest.err
19449 rm -f conftest.er1
19450 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452 (exit $ac_status); } && {
19453 test -z "$ac_c_werror_flag" ||
19454 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019455 } && test -s conftest$ac_exeext &&
19456 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019457 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019458else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019460sed 's/^/| /' conftest.$ac_ext >&5
19461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019462 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019464
19465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019466 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019467fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019468ac_res=`eval echo '${'$as_ac_var'}'`
19469 { echo "$as_me:$LINENO: result: $ac_res" >&5
19470echo "${ECHO_T}$ac_res" >&6; }
19471if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019472 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019473#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019474_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019475
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019476fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019477done
19478
Michael W. Hudson54241132001-12-07 15:38:26 +000019479
Martin v. Löwis11437992002-04-12 09:54:03 +000019480
19481
19482
Christian Heimesb186d002008-03-18 15:15:01 +000019483for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019484do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019485as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19486{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19487echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019488if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019489 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019490else
Martin v. Löwis11437992002-04-12 09:54:03 +000019491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019492/* confdefs.h. */
19493_ACEOF
19494cat confdefs.h >>conftest.$ac_ext
19495cat >>conftest.$ac_ext <<_ACEOF
19496/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019497/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19498 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19499#define $ac_func innocuous_$ac_func
19500
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019501/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019502 which can conflict with char $ac_func (); below.
19503 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019504 <limits.h> exists even on freestanding compilers. */
19505
19506#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019507# include <limits.h>
19508#else
19509# include <assert.h>
19510#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019511
19512#undef $ac_func
19513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514/* Override any GCC internal prototype to avoid an error.
19515 Use char because int might match the return type of a GCC
19516 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019517#ifdef __cplusplus
19518extern "C"
19519#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019520char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019521/* The GNU C library defines this for functions which it implements
19522 to always fail with ENOSYS. Some functions are actually named
19523 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019525choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019526#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019527
Skip Montanaro6dead952003-09-25 14:50:04 +000019528int
19529main ()
19530{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 ;
19533 return 0;
19534}
19535_ACEOF
19536rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019537if { (ac_try="$ac_link"
19538case "(($ac_try" in
19539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19540 *) ac_try_echo=$ac_try;;
19541esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019545 grep -v '^ *+' conftest.er1 >conftest.err
19546 rm -f conftest.er1
19547 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019549 (exit $ac_status); } && {
19550 test -z "$ac_c_werror_flag" ||
19551 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019552 } && test -s conftest$ac_exeext &&
19553 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019555else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019557sed 's/^/| /' conftest.$ac_ext >&5
19558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019559 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019561
19562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019564fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019565ac_res=`eval echo '${'$as_ac_var'}'`
19566 { echo "$as_me:$LINENO: result: $ac_res" >&5
19567echo "${ECHO_T}$ac_res" >&6; }
19568if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019570#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019572
Martin v. Löwis1142de32002-03-29 16:28:31 +000019573else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019574 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019575 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19577 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019578esac
19579
Martin v. Löwis1142de32002-03-29 16:28:31 +000019580fi
19581done
19582
19583
Martin v. Löwis11437992002-04-12 09:54:03 +000019584
Martin v. Löwis1142de32002-03-29 16:28:31 +000019585for ac_func in getpgrp
19586do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019587as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19588{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19589echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019590if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019592else
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019594/* confdefs.h. */
19595_ACEOF
19596cat confdefs.h >>conftest.$ac_ext
19597cat >>conftest.$ac_ext <<_ACEOF
19598/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019599/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19600 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19601#define $ac_func innocuous_$ac_func
19602
Martin v. Löwis1142de32002-03-29 16:28:31 +000019603/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019604 which can conflict with char $ac_func (); below.
19605 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019606 <limits.h> exists even on freestanding compilers. */
19607
19608#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019609# include <limits.h>
19610#else
19611# include <assert.h>
19612#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019613
19614#undef $ac_func
19615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019616/* Override any GCC internal prototype to avoid an error.
19617 Use char because int might match the return type of a GCC
19618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019619#ifdef __cplusplus
19620extern "C"
19621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019622char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019623/* The GNU C library defines this for functions which it implements
19624 to always fail with ENOSYS. Some functions are actually named
19625 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019626#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019627choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019628#endif
19629
Skip Montanaro6dead952003-09-25 14:50:04 +000019630int
19631main ()
19632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019633return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019634 ;
19635 return 0;
19636}
19637_ACEOF
19638rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019639if { (ac_try="$ac_link"
19640case "(($ac_try" in
19641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19642 *) ac_try_echo=$ac_try;;
19643esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019647 grep -v '^ *+' conftest.er1 >conftest.err
19648 rm -f conftest.er1
19649 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019651 (exit $ac_status); } && {
19652 test -z "$ac_c_werror_flag" ||
19653 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019654 } && test -s conftest$ac_exeext &&
19655 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019656 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019657else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019659sed 's/^/| /' conftest.$ac_ext >&5
19660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663
19664rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019665 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019666fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019667ac_res=`eval echo '${'$as_ac_var'}'`
19668 { echo "$as_me:$LINENO: result: $ac_res" >&5
19669echo "${ECHO_T}$ac_res" >&6; }
19670if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019672#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019673_ACEOF
19674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019675/* confdefs.h. */
19676_ACEOF
19677cat confdefs.h >>conftest.$ac_ext
19678cat >>conftest.$ac_ext <<_ACEOF
19679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019680#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019681int
19682main ()
19683{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019684getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019685 ;
19686 return 0;
19687}
19688_ACEOF
19689rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019690if { (ac_try="$ac_compile"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019696 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019697 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019698 grep -v '^ *+' conftest.er1 >conftest.err
19699 rm -f conftest.er1
19700 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019702 (exit $ac_status); } && {
19703 test -z "$ac_c_werror_flag" ||
19704 test ! -s conftest.err
19705 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019706
19707cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019708#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019710
Martin v. Löwis11437992002-04-12 09:54:03 +000019711
Guido van Rossumf78abae1997-01-21 22:02:36 +000019712else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019714sed 's/^/| /' conftest.$ac_ext >&5
19715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019716
Guido van Rossum627b2d71993-12-24 10:39:16 +000019717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019718
19719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019720
Guido van Rossum627b2d71993-12-24 10:39:16 +000019721fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019722done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019723
Jack Jansen150753c2003-03-29 22:07:47 +000019724
19725for ac_func in setpgrp
19726do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019727as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19728{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19729echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019730if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019731 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019732else
Martin v. Löwis11437992002-04-12 09:54:03 +000019733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019734/* confdefs.h. */
19735_ACEOF
19736cat confdefs.h >>conftest.$ac_ext
19737cat >>conftest.$ac_ext <<_ACEOF
19738/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019739/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19740 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19741#define $ac_func innocuous_$ac_func
19742
Jack Jansen150753c2003-03-29 22:07:47 +000019743/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019744 which can conflict with char $ac_func (); below.
19745 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019746 <limits.h> exists even on freestanding compilers. */
19747
19748#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019749# include <limits.h>
19750#else
19751# include <assert.h>
19752#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019753
19754#undef $ac_func
19755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019756/* Override any GCC internal prototype to avoid an error.
19757 Use char because int might match the return type of a GCC
19758 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019759#ifdef __cplusplus
19760extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019761#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019762char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019763/* The GNU C library defines this for functions which it implements
19764 to always fail with ENOSYS. Some functions are actually named
19765 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019766#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019767choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019768#endif
19769
Skip Montanaro6dead952003-09-25 14:50:04 +000019770int
19771main ()
19772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019774 ;
19775 return 0;
19776}
19777_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019778rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019779if { (ac_try="$ac_link"
19780case "(($ac_try" in
19781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19782 *) ac_try_echo=$ac_try;;
19783esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019785 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019787 grep -v '^ *+' conftest.er1 >conftest.err
19788 rm -f conftest.er1
19789 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019791 (exit $ac_status); } && {
19792 test -z "$ac_c_werror_flag" ||
19793 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019794 } && test -s conftest$ac_exeext &&
19795 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019796 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019797else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019798 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019799sed 's/^/| /' conftest.$ac_ext >&5
19800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019801 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019803
19804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019806fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019807ac_res=`eval echo '${'$as_ac_var'}'`
19808 { echo "$as_me:$LINENO: result: $ac_res" >&5
19809echo "${ECHO_T}$ac_res" >&6; }
19810if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019811 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019812#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019813_ACEOF
19814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019815/* confdefs.h. */
19816_ACEOF
19817cat confdefs.h >>conftest.$ac_ext
19818cat >>conftest.$ac_ext <<_ACEOF
19819/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019820#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019821int
19822main ()
19823{
19824setpgrp(0,0);
19825 ;
19826 return 0;
19827}
19828_ACEOF
19829rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019830if { (ac_try="$ac_compile"
19831case "(($ac_try" in
19832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19833 *) ac_try_echo=$ac_try;;
19834esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019836 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019838 grep -v '^ *+' conftest.er1 >conftest.err
19839 rm -f conftest.er1
19840 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019842 (exit $ac_status); } && {
19843 test -z "$ac_c_werror_flag" ||
19844 test ! -s conftest.err
19845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019846
19847cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019848#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019849_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019850
Jack Jansen150753c2003-03-29 22:07:47 +000019851
19852else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019854sed 's/^/| /' conftest.$ac_ext >&5
19855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019856
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019858
19859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019860
19861fi
19862done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019863
Martin v. Löwis11437992002-04-12 09:54:03 +000019864
Thomas Wouters3a584202000-08-05 23:28:51 +000019865for ac_func in gettimeofday
19866do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019867as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19868{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19869echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019870if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019872else
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019874/* confdefs.h. */
19875_ACEOF
19876cat confdefs.h >>conftest.$ac_ext
19877cat >>conftest.$ac_ext <<_ACEOF
19878/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019879/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19880 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19881#define $ac_func innocuous_$ac_func
19882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019883/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019884 which can conflict with char $ac_func (); below.
19885 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019886 <limits.h> exists even on freestanding compilers. */
19887
19888#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019889# include <limits.h>
19890#else
19891# include <assert.h>
19892#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019893
19894#undef $ac_func
19895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019896/* Override any GCC internal prototype to avoid an error.
19897 Use char because int might match the return type of a GCC
19898 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019899#ifdef __cplusplus
19900extern "C"
19901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019902char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019903/* The GNU C library defines this for functions which it implements
19904 to always fail with ENOSYS. Some functions are actually named
19905 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019907choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019908#endif
19909
Skip Montanaro6dead952003-09-25 14:50:04 +000019910int
19911main ()
19912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019913return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019914 ;
19915 return 0;
19916}
19917_ACEOF
19918rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019919if { (ac_try="$ac_link"
19920case "(($ac_try" in
19921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19922 *) ac_try_echo=$ac_try;;
19923esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019927 grep -v '^ *+' conftest.er1 >conftest.err
19928 rm -f conftest.er1
19929 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931 (exit $ac_status); } && {
19932 test -z "$ac_c_werror_flag" ||
19933 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019934 } && test -s conftest$ac_exeext &&
19935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019936 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019937else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019939sed 's/^/| /' conftest.$ac_ext >&5
19940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019941 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019943
19944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019945 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019946fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019947ac_res=`eval echo '${'$as_ac_var'}'`
19948 { echo "$as_me:$LINENO: result: $ac_res" >&5
19949echo "${ECHO_T}$ac_res" >&6; }
19950if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019952#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019953_ACEOF
19954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019955/* confdefs.h. */
19956_ACEOF
19957cat confdefs.h >>conftest.$ac_ext
19958cat >>conftest.$ac_ext <<_ACEOF
19959/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019960#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019961int
19962main ()
19963{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019964gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 ;
19966 return 0;
19967}
19968_ACEOF
19969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019970if { (ac_try="$ac_compile"
19971case "(($ac_try" in
19972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19973 *) ac_try_echo=$ac_try;;
19974esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019976 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019978 grep -v '^ *+' conftest.er1 >conftest.err
19979 rm -f conftest.er1
19980 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019982 (exit $ac_status); } && {
19983 test -z "$ac_c_werror_flag" ||
19984 test ! -s conftest.err
19985 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019986 :
19987else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019989sed 's/^/| /' conftest.$ac_ext >&5
19990
Martin v. Löwis11437992002-04-12 09:54:03 +000019991
19992cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019993#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019994_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019995
Martin v. Löwis11437992002-04-12 09:54:03 +000019996
Guido van Rossum627b2d71993-12-24 10:39:16 +000019997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019998
19999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020001fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020002done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020003
Michael W. Hudson54241132001-12-07 15:38:26 +000020004
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020005{ echo "$as_me:$LINENO: checking for major" >&5
20006echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020008/* confdefs.h. */
20009_ACEOF
20010cat confdefs.h >>conftest.$ac_ext
20011cat >>conftest.$ac_ext <<_ACEOF
20012/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020013
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020014#if defined(MAJOR_IN_MKDEV)
20015#include <sys/mkdev.h>
20016#elif defined(MAJOR_IN_SYSMACROS)
20017#include <sys/sysmacros.h>
20018#else
20019#include <sys/types.h>
20020#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020021
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020022int
20023main ()
20024{
20025
20026 makedev(major(0),minor(0));
20027
20028 ;
20029 return 0;
20030}
20031_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020032rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033if { (ac_try="$ac_link"
20034case "(($ac_try" in
20035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036 *) ac_try_echo=$ac_try;;
20037esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020041 grep -v '^ *+' conftest.er1 >conftest.err
20042 rm -f conftest.er1
20043 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020045 (exit $ac_status); } && {
20046 test -z "$ac_c_werror_flag" ||
20047 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020048 } && test -s conftest$ac_exeext &&
20049 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020050
20051
20052cat >>confdefs.h <<\_ACEOF
20053#define HAVE_DEVICE_MACROS 1
20054_ACEOF
20055
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020056 { echo "$as_me:$LINENO: result: yes" >&5
20057echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020058
20059else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020061sed 's/^/| /' conftest.$ac_ext >&5
20062
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020063
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020064 { echo "$as_me:$LINENO: result: no" >&5
20065echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020066
20067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020068
20069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020070 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020071
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020072# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020073# for [no]getaddrinfo in netdb.h.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020074{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20075echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020077/* confdefs.h. */
20078_ACEOF
20079cat confdefs.h >>conftest.$ac_ext
20080cat >>conftest.$ac_ext <<_ACEOF
20081/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020082
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020083#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020084#include <sys/socket.h>
20085#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020086#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020087
Martin v. Löwis11437992002-04-12 09:54:03 +000020088int
20089main ()
20090{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020091getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 ;
20093 return 0;
20094}
20095_ACEOF
20096rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020097if { (ac_try="$ac_link"
20098case "(($ac_try" in
20099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20100 *) ac_try_echo=$ac_try;;
20101esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020103 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020105 grep -v '^ *+' conftest.er1 >conftest.err
20106 rm -f conftest.er1
20107 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020109 (exit $ac_status); } && {
20110 test -z "$ac_c_werror_flag" ||
20111 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020112 } && test -s conftest$ac_exeext &&
20113 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020114 have_getaddrinfo=yes
20115else
20116 echo "$as_me: failed program was:" >&5
20117sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020118
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020119 have_getaddrinfo=no
20120fi
20121
20122rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20123 conftest$ac_exeext conftest.$ac_ext
20124{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20125echo "${ECHO_T}$have_getaddrinfo" >&6; }
20126if test $have_getaddrinfo = yes
20127then
20128 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020129echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020130 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20131 echo $ECHO_N "(cached) $ECHO_C" >&6
20132else
20133 if test "$cross_compiling" = yes; then
20134 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020135else
Martin v. Löwis11437992002-04-12 09:54:03 +000020136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020137/* confdefs.h. */
20138_ACEOF
20139cat confdefs.h >>conftest.$ac_ext
20140cat >>conftest.$ac_ext <<_ACEOF
20141/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020142
20143#include <sys/types.h>
20144#include <netdb.h>
20145#include <string.h>
20146#include <sys/socket.h>
20147#include <netinet/in.h>
20148
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020149int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020150{
20151 int passive, gaierr, inet4 = 0, inet6 = 0;
20152 struct addrinfo hints, *ai, *aitop;
20153 char straddr[INET6_ADDRSTRLEN], strport[16];
20154
20155 for (passive = 0; passive <= 1; passive++) {
20156 memset(&hints, 0, sizeof(hints));
20157 hints.ai_family = AF_UNSPEC;
20158 hints.ai_flags = passive ? AI_PASSIVE : 0;
20159 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020160 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020161 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20162 (void)gai_strerror(gaierr);
20163 goto bad;
20164 }
20165 for (ai = aitop; ai; ai = ai->ai_next) {
20166 if (ai->ai_addr == NULL ||
20167 ai->ai_addrlen == 0 ||
20168 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20169 straddr, sizeof(straddr), strport, sizeof(strport),
20170 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20171 goto bad;
20172 }
20173 switch (ai->ai_family) {
20174 case AF_INET:
20175 if (strcmp(strport, "54321") != 0) {
20176 goto bad;
20177 }
20178 if (passive) {
20179 if (strcmp(straddr, "0.0.0.0") != 0) {
20180 goto bad;
20181 }
20182 } else {
20183 if (strcmp(straddr, "127.0.0.1") != 0) {
20184 goto bad;
20185 }
20186 }
20187 inet4++;
20188 break;
20189 case AF_INET6:
20190 if (strcmp(strport, "54321") != 0) {
20191 goto bad;
20192 }
20193 if (passive) {
20194 if (strcmp(straddr, "::") != 0) {
20195 goto bad;
20196 }
20197 } else {
20198 if (strcmp(straddr, "::1") != 0) {
20199 goto bad;
20200 }
20201 }
20202 inet6++;
20203 break;
20204 case AF_UNSPEC:
20205 goto bad;
20206 break;
20207 default:
20208 /* another family support? */
20209 break;
20210 }
20211 }
20212 }
20213
20214 if (!(inet4 == 0 || inet4 == 2))
20215 goto bad;
20216 if (!(inet6 == 0 || inet6 == 2))
20217 goto bad;
20218
20219 if (aitop)
20220 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020221 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020222
20223 bad:
20224 if (aitop)
20225 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020226 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020227}
20228
Martin v. Löwis11437992002-04-12 09:54:03 +000020229_ACEOF
20230rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020231if { (ac_try="$ac_link"
20232case "(($ac_try" in
20233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20234 *) ac_try_echo=$ac_try;;
20235esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020237 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020238 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020241 { (case "(($ac_try" in
20242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20243 *) ac_try_echo=$ac_try;;
20244esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020250 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020251else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020252 echo "$as_me: program exited with status $ac_status" >&5
20253echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020254sed 's/^/| /' conftest.$ac_ext >&5
20255
Martin v. Löwis11437992002-04-12 09:54:03 +000020256( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020257ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020259rm -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 +000020260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020261
20262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020263fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020264
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020267if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20268then
20269 if test $ipv6 = yes
20270 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020271 echo 'Fatal: You must get working getaddrinfo() function.'
20272 echo ' or you can specify "--disable-ipv6"'.
20273 exit 1
20274 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020275else
Martin v. Löwis11437992002-04-12 09:54:03 +000020276
20277cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020278#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020279_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020280
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020282
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020283for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020284do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020285as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20286{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20287echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020288if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020289 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020290else
Martin v. Löwis11437992002-04-12 09:54:03 +000020291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020292/* confdefs.h. */
20293_ACEOF
20294cat confdefs.h >>conftest.$ac_ext
20295cat >>conftest.$ac_ext <<_ACEOF
20296/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020297/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20298 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20299#define $ac_func innocuous_$ac_func
20300
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020301/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020302 which can conflict with char $ac_func (); below.
20303 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020304 <limits.h> exists even on freestanding compilers. */
20305
20306#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020307# include <limits.h>
20308#else
20309# include <assert.h>
20310#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020311
20312#undef $ac_func
20313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314/* Override any GCC internal prototype to avoid an error.
20315 Use char because int might match the return type of a GCC
20316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020317#ifdef __cplusplus
20318extern "C"
20319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020320char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020321/* The GNU C library defines this for functions which it implements
20322 to always fail with ENOSYS. Some functions are actually named
20323 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020325choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020326#endif
20327
Skip Montanaro6dead952003-09-25 14:50:04 +000020328int
20329main ()
20330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020331return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020332 ;
20333 return 0;
20334}
20335_ACEOF
20336rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020337if { (ac_try="$ac_link"
20338case "(($ac_try" in
20339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20340 *) ac_try_echo=$ac_try;;
20341esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020344 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020345 grep -v '^ *+' conftest.er1 >conftest.err
20346 rm -f conftest.er1
20347 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020349 (exit $ac_status); } && {
20350 test -z "$ac_c_werror_flag" ||
20351 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020352 } && test -s conftest$ac_exeext &&
20353 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020354 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020355else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020356 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020357sed 's/^/| /' conftest.$ac_ext >&5
20358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020359 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020361
20362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020363 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020364fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020365ac_res=`eval echo '${'$as_ac_var'}'`
20366 { echo "$as_me:$LINENO: result: $ac_res" >&5
20367echo "${ECHO_T}$ac_res" >&6; }
20368if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020370#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020372
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020373fi
20374done
20375
Michael W. Hudson54241132001-12-07 15:38:26 +000020376
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020377# checks for structures
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020378{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20379echo $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 +000020380if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020381 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020382else
Martin v. Löwis11437992002-04-12 09:54:03 +000020383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020384/* confdefs.h. */
20385_ACEOF
20386cat confdefs.h >>conftest.$ac_ext
20387cat >>conftest.$ac_ext <<_ACEOF
20388/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020389#include <sys/types.h>
20390#include <sys/time.h>
20391#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020392
Martin v. Löwis11437992002-04-12 09:54:03 +000020393int
20394main ()
20395{
20396if ((struct tm *) 0)
20397return 0;
20398 ;
20399 return 0;
20400}
20401_ACEOF
20402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020403if { (ac_try="$ac_compile"
20404case "(($ac_try" in
20405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20406 *) ac_try_echo=$ac_try;;
20407esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020411 grep -v '^ *+' conftest.er1 >conftest.err
20412 rm -f conftest.er1
20413 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 (exit $ac_status); } && {
20416 test -z "$ac_c_werror_flag" ||
20417 test ! -s conftest.err
20418 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020419 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020420else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020422sed 's/^/| /' conftest.$ac_ext >&5
20423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020424 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426
20427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020428fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020429{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20430echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020431if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020432
20433cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020434#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020435_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020436
20437fi
20438
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020439{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20440echo $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 +000020441if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020442 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020443else
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020445/* confdefs.h. */
20446_ACEOF
20447cat confdefs.h >>conftest.$ac_ext
20448cat >>conftest.$ac_ext <<_ACEOF
20449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020450#include <sys/types.h>
20451#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020452
Martin v. Löwis11437992002-04-12 09:54:03 +000020453int
20454main ()
20455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020456struct tm tm;
20457 int *p = &tm.tm_sec;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020458 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020459 ;
20460 return 0;
20461}
20462_ACEOF
20463rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020464if { (ac_try="$ac_compile"
20465case "(($ac_try" in
20466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20467 *) ac_try_echo=$ac_try;;
20468esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020470 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020472 grep -v '^ *+' conftest.er1 >conftest.err
20473 rm -f conftest.er1
20474 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020476 (exit $ac_status); } && {
20477 test -z "$ac_c_werror_flag" ||
20478 test ! -s conftest.err
20479 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020480 ac_cv_struct_tm=time.h
20481else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020483sed 's/^/| /' conftest.$ac_ext >&5
20484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020485 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020487
20488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020489fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020490{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20491echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020492if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020493
20494cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020495#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020496_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020497
20498fi
20499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020500{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20501echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020502if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020503 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020504else
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020506/* confdefs.h. */
20507_ACEOF
20508cat confdefs.h >>conftest.$ac_ext
20509cat >>conftest.$ac_ext <<_ACEOF
20510/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511#include <sys/types.h>
20512#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020513
20514
Martin v. Löwis11437992002-04-12 09:54:03 +000020515int
20516main ()
20517{
20518static struct tm ac_aggr;
20519if (ac_aggr.tm_zone)
20520return 0;
20521 ;
20522 return 0;
20523}
20524_ACEOF
20525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020526if { (ac_try="$ac_compile"
20527case "(($ac_try" in
20528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20529 *) ac_try_echo=$ac_try;;
20530esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020534 grep -v '^ *+' conftest.er1 >conftest.err
20535 rm -f conftest.er1
20536 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020538 (exit $ac_status); } && {
20539 test -z "$ac_c_werror_flag" ||
20540 test ! -s conftest.err
20541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020543else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020545sed 's/^/| /' conftest.$ac_ext >&5
20546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020548/* confdefs.h. */
20549_ACEOF
20550cat confdefs.h >>conftest.$ac_ext
20551cat >>conftest.$ac_ext <<_ACEOF
20552/* end confdefs.h. */
20553#include <sys/types.h>
20554#include <$ac_cv_struct_tm>
20555
20556
20557int
20558main ()
20559{
20560static struct tm ac_aggr;
20561if (sizeof ac_aggr.tm_zone)
20562return 0;
20563 ;
20564 return 0;
20565}
20566_ACEOF
20567rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020568if { (ac_try="$ac_compile"
20569case "(($ac_try" in
20570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20571 *) ac_try_echo=$ac_try;;
20572esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020574 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020576 grep -v '^ *+' conftest.er1 >conftest.err
20577 rm -f conftest.er1
20578 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020580 (exit $ac_status); } && {
20581 test -z "$ac_c_werror_flag" ||
20582 test ! -s conftest.err
20583 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020584 ac_cv_member_struct_tm_tm_zone=yes
20585else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020587sed 's/^/| /' conftest.$ac_ext >&5
20588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020589 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020591
20592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020594
20595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020596fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020597{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20598echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20599if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020600
20601cat >>confdefs.h <<_ACEOF
20602#define HAVE_STRUCT_TM_TM_ZONE 1
20603_ACEOF
20604
20605
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020606fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020607
Martin v. Löwis11437992002-04-12 09:54:03 +000020608if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20609
20610cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020611#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020613
20614else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020615 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20616echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020617if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020618 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020619else
20620 cat >conftest.$ac_ext <<_ACEOF
20621/* confdefs.h. */
20622_ACEOF
20623cat confdefs.h >>conftest.$ac_ext
20624cat >>conftest.$ac_ext <<_ACEOF
20625/* end confdefs.h. */
20626#include <time.h>
20627
20628int
20629main ()
20630{
20631#ifndef tzname
20632 (void) tzname;
20633#endif
20634
20635 ;
20636 return 0;
20637}
20638_ACEOF
20639rm -f conftest.$ac_objext
20640if { (ac_try="$ac_compile"
20641case "(($ac_try" in
20642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20643 *) ac_try_echo=$ac_try;;
20644esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 (eval "$ac_compile") 2>conftest.er1
20647 ac_status=$?
20648 grep -v '^ *+' conftest.er1 >conftest.err
20649 rm -f conftest.er1
20650 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 (exit $ac_status); } && {
20653 test -z "$ac_c_werror_flag" ||
20654 test ! -s conftest.err
20655 } && test -s conftest.$ac_objext; then
20656 ac_cv_have_decl_tzname=yes
20657else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020658 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020659sed 's/^/| /' conftest.$ac_ext >&5
20660
20661 ac_cv_have_decl_tzname=no
20662fi
20663
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20665fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020666{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20667echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20668if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020669
20670cat >>confdefs.h <<_ACEOF
20671#define HAVE_DECL_TZNAME 1
20672_ACEOF
20673
20674
20675else
20676 cat >>confdefs.h <<_ACEOF
20677#define HAVE_DECL_TZNAME 0
20678_ACEOF
20679
20680
20681fi
20682
20683
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020684 { echo "$as_me:$LINENO: checking for tzname" >&5
20685echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020686if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020687 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020688else
Martin v. Löwis11437992002-04-12 09:54:03 +000020689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020690/* confdefs.h. */
20691_ACEOF
20692cat confdefs.h >>conftest.$ac_ext
20693cat >>conftest.$ac_ext <<_ACEOF
20694/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020695#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696#if !HAVE_DECL_TZNAME
20697extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020699
Martin v. Löwis11437992002-04-12 09:54:03 +000020700int
20701main ()
20702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020703return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 ;
20705 return 0;
20706}
20707_ACEOF
20708rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020709if { (ac_try="$ac_link"
20710case "(($ac_try" in
20711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20712 *) ac_try_echo=$ac_try;;
20713esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020715 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020717 grep -v '^ *+' conftest.er1 >conftest.err
20718 rm -f conftest.er1
20719 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721 (exit $ac_status); } && {
20722 test -z "$ac_c_werror_flag" ||
20723 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020724 } && test -s conftest$ac_exeext &&
20725 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020726 ac_cv_var_tzname=yes
20727else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020729sed 's/^/| /' conftest.$ac_ext >&5
20730
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020733
20734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020735 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020736fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020737{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20738echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020739 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020740
20741cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020742#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020745 fi
20746fi
20747
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020748{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20749echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020750if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020751 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020752else
20753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020754/* confdefs.h. */
20755_ACEOF
20756cat confdefs.h >>conftest.$ac_ext
20757cat >>conftest.$ac_ext <<_ACEOF
20758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020760int
20761main ()
20762{
20763static struct stat ac_aggr;
20764if (ac_aggr.st_rdev)
20765return 0;
20766 ;
20767 return 0;
20768}
20769_ACEOF
20770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771if { (ac_try="$ac_compile"
20772case "(($ac_try" in
20773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20774 *) ac_try_echo=$ac_try;;
20775esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020779 grep -v '^ *+' conftest.er1 >conftest.err
20780 rm -f conftest.er1
20781 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020783 (exit $ac_status); } && {
20784 test -z "$ac_c_werror_flag" ||
20785 test ! -s conftest.err
20786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 ac_cv_member_struct_stat_st_rdev=yes
20788else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020790sed 's/^/| /' conftest.$ac_ext >&5
20791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020793/* confdefs.h. */
20794_ACEOF
20795cat confdefs.h >>conftest.$ac_ext
20796cat >>conftest.$ac_ext <<_ACEOF
20797/* end confdefs.h. */
20798$ac_includes_default
20799int
20800main ()
20801{
20802static struct stat ac_aggr;
20803if (sizeof ac_aggr.st_rdev)
20804return 0;
20805 ;
20806 return 0;
20807}
20808_ACEOF
20809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020810if { (ac_try="$ac_compile"
20811case "(($ac_try" in
20812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20813 *) ac_try_echo=$ac_try;;
20814esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020816 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 grep -v '^ *+' conftest.er1 >conftest.err
20819 rm -f conftest.er1
20820 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020822 (exit $ac_status); } && {
20823 test -z "$ac_c_werror_flag" ||
20824 test ! -s conftest.err
20825 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020826 ac_cv_member_struct_stat_st_rdev=yes
20827else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020829sed 's/^/| /' conftest.$ac_ext >&5
20830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833
20834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020836
20837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020838fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020839{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20840echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20841if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020842
20843cat >>confdefs.h <<_ACEOF
20844#define HAVE_STRUCT_STAT_ST_RDEV 1
20845_ACEOF
20846
20847
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020848fi
20849
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020850{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20851echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020852if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020854else
Martin v. Löwis11437992002-04-12 09:54:03 +000020855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020856/* confdefs.h. */
20857_ACEOF
20858cat confdefs.h >>conftest.$ac_ext
20859cat >>conftest.$ac_ext <<_ACEOF
20860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020861$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020862int
20863main ()
20864{
20865static struct stat ac_aggr;
20866if (ac_aggr.st_blksize)
20867return 0;
20868 ;
20869 return 0;
20870}
20871_ACEOF
20872rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020873if { (ac_try="$ac_compile"
20874case "(($ac_try" in
20875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20876 *) ac_try_echo=$ac_try;;
20877esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020881 grep -v '^ *+' conftest.er1 >conftest.err
20882 rm -f conftest.er1
20883 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020885 (exit $ac_status); } && {
20886 test -z "$ac_c_werror_flag" ||
20887 test ! -s conftest.err
20888 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020889 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020890else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020892sed 's/^/| /' conftest.$ac_ext >&5
20893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020895/* confdefs.h. */
20896_ACEOF
20897cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */
20900$ac_includes_default
20901int
20902main ()
20903{
20904static struct stat ac_aggr;
20905if (sizeof ac_aggr.st_blksize)
20906return 0;
20907 ;
20908 return 0;
20909}
20910_ACEOF
20911rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020912if { (ac_try="$ac_compile"
20913case "(($ac_try" in
20914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20915 *) ac_try_echo=$ac_try;;
20916esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020918 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020920 grep -v '^ *+' conftest.er1 >conftest.err
20921 rm -f conftest.er1
20922 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020924 (exit $ac_status); } && {
20925 test -z "$ac_c_werror_flag" ||
20926 test ! -s conftest.err
20927 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020928 ac_cv_member_struct_stat_st_blksize=yes
20929else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020931sed 's/^/| /' conftest.$ac_ext >&5
20932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020933 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020935
20936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020938
20939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020940fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020941{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20942echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
20943if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020944
Martin v. Löwis11437992002-04-12 09:54:03 +000020945cat >>confdefs.h <<_ACEOF
20946#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20947_ACEOF
20948
20949
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020950fi
20951
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020952{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20953echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020954if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020955 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020956else
20957 cat >conftest.$ac_ext <<_ACEOF
20958/* confdefs.h. */
20959_ACEOF
20960cat confdefs.h >>conftest.$ac_ext
20961cat >>conftest.$ac_ext <<_ACEOF
20962/* end confdefs.h. */
20963$ac_includes_default
20964int
20965main ()
20966{
20967static struct stat ac_aggr;
20968if (ac_aggr.st_flags)
20969return 0;
20970 ;
20971 return 0;
20972}
20973_ACEOF
20974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020975if { (ac_try="$ac_compile"
20976case "(($ac_try" in
20977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20978 *) ac_try_echo=$ac_try;;
20979esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020981 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020982 ac_status=$?
20983 grep -v '^ *+' conftest.er1 >conftest.err
20984 rm -f conftest.er1
20985 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020987 (exit $ac_status); } && {
20988 test -z "$ac_c_werror_flag" ||
20989 test ! -s conftest.err
20990 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020991 ac_cv_member_struct_stat_st_flags=yes
20992else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020993 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020994sed 's/^/| /' conftest.$ac_ext >&5
20995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020997/* confdefs.h. */
20998_ACEOF
20999cat confdefs.h >>conftest.$ac_ext
21000cat >>conftest.$ac_ext <<_ACEOF
21001/* end confdefs.h. */
21002$ac_includes_default
21003int
21004main ()
21005{
21006static struct stat ac_aggr;
21007if (sizeof ac_aggr.st_flags)
21008return 0;
21009 ;
21010 return 0;
21011}
21012_ACEOF
21013rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021014if { (ac_try="$ac_compile"
21015case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021020 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021021 ac_status=$?
21022 grep -v '^ *+' conftest.er1 >conftest.err
21023 rm -f conftest.er1
21024 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021026 (exit $ac_status); } && {
21027 test -z "$ac_c_werror_flag" ||
21028 test ! -s conftest.err
21029 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021030 ac_cv_member_struct_stat_st_flags=yes
21031else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021032 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021033sed 's/^/| /' conftest.$ac_ext >&5
21034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021035 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021036fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037
21038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040
21041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021042fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021043{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21044echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21045if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021046
21047cat >>confdefs.h <<_ACEOF
21048#define HAVE_STRUCT_STAT_ST_FLAGS 1
21049_ACEOF
21050
21051
21052fi
21053
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021054{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21055echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021056if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021057 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021058else
21059 cat >conftest.$ac_ext <<_ACEOF
21060/* confdefs.h. */
21061_ACEOF
21062cat confdefs.h >>conftest.$ac_ext
21063cat >>conftest.$ac_ext <<_ACEOF
21064/* end confdefs.h. */
21065$ac_includes_default
21066int
21067main ()
21068{
21069static struct stat ac_aggr;
21070if (ac_aggr.st_gen)
21071return 0;
21072 ;
21073 return 0;
21074}
21075_ACEOF
21076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021077if { (ac_try="$ac_compile"
21078case "(($ac_try" in
21079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21080 *) ac_try_echo=$ac_try;;
21081esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021084 ac_status=$?
21085 grep -v '^ *+' conftest.er1 >conftest.err
21086 rm -f conftest.er1
21087 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021089 (exit $ac_status); } && {
21090 test -z "$ac_c_werror_flag" ||
21091 test ! -s conftest.err
21092 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021093 ac_cv_member_struct_stat_st_gen=yes
21094else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021095 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021096sed 's/^/| /' conftest.$ac_ext >&5
21097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021098 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021099/* confdefs.h. */
21100_ACEOF
21101cat confdefs.h >>conftest.$ac_ext
21102cat >>conftest.$ac_ext <<_ACEOF
21103/* end confdefs.h. */
21104$ac_includes_default
21105int
21106main ()
21107{
21108static struct stat ac_aggr;
21109if (sizeof ac_aggr.st_gen)
21110return 0;
21111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021116if { (ac_try="$ac_compile"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021123 ac_status=$?
21124 grep -v '^ *+' conftest.er1 >conftest.err
21125 rm -f conftest.er1
21126 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128 (exit $ac_status); } && {
21129 test -z "$ac_c_werror_flag" ||
21130 test ! -s conftest.err
21131 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021132 ac_cv_member_struct_stat_st_gen=yes
21133else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021134 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021135sed 's/^/| /' conftest.$ac_ext >&5
21136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021137 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021139
21140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142
21143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021144fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021145{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21146echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21147if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021148
21149cat >>confdefs.h <<_ACEOF
21150#define HAVE_STRUCT_STAT_ST_GEN 1
21151_ACEOF
21152
21153
21154fi
21155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021156{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21157echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021158if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021160else
21161 cat >conftest.$ac_ext <<_ACEOF
21162/* confdefs.h. */
21163_ACEOF
21164cat confdefs.h >>conftest.$ac_ext
21165cat >>conftest.$ac_ext <<_ACEOF
21166/* end confdefs.h. */
21167$ac_includes_default
21168int
21169main ()
21170{
21171static struct stat ac_aggr;
21172if (ac_aggr.st_birthtime)
21173return 0;
21174 ;
21175 return 0;
21176}
21177_ACEOF
21178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021179if { (ac_try="$ac_compile"
21180case "(($ac_try" in
21181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21182 *) ac_try_echo=$ac_try;;
21183esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021186 ac_status=$?
21187 grep -v '^ *+' conftest.er1 >conftest.err
21188 rm -f conftest.er1
21189 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021191 (exit $ac_status); } && {
21192 test -z "$ac_c_werror_flag" ||
21193 test ! -s conftest.err
21194 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021195 ac_cv_member_struct_stat_st_birthtime=yes
21196else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021197 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021198sed 's/^/| /' conftest.$ac_ext >&5
21199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021200 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021201/* confdefs.h. */
21202_ACEOF
21203cat confdefs.h >>conftest.$ac_ext
21204cat >>conftest.$ac_ext <<_ACEOF
21205/* end confdefs.h. */
21206$ac_includes_default
21207int
21208main ()
21209{
21210static struct stat ac_aggr;
21211if (sizeof ac_aggr.st_birthtime)
21212return 0;
21213 ;
21214 return 0;
21215}
21216_ACEOF
21217rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021218if { (ac_try="$ac_compile"
21219case "(($ac_try" in
21220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21221 *) ac_try_echo=$ac_try;;
21222esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021225 ac_status=$?
21226 grep -v '^ *+' conftest.er1 >conftest.err
21227 rm -f conftest.er1
21228 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021230 (exit $ac_status); } && {
21231 test -z "$ac_c_werror_flag" ||
21232 test ! -s conftest.err
21233 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021234 ac_cv_member_struct_stat_st_birthtime=yes
21235else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021236 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021237sed 's/^/| /' conftest.$ac_ext >&5
21238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021239 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021241
21242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021244
21245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021246fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021247{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21248echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21249if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021250
21251cat >>confdefs.h <<_ACEOF
21252#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21253_ACEOF
21254
21255
21256fi
21257
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021258{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21259echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021260if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021261 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021262else
Martin v. Löwis11437992002-04-12 09:54:03 +000021263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021269$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021270int
21271main ()
21272{
21273static struct stat ac_aggr;
21274if (ac_aggr.st_blocks)
21275return 0;
21276 ;
21277 return 0;
21278}
21279_ACEOF
21280rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021281if { (ac_try="$ac_compile"
21282case "(($ac_try" in
21283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21284 *) ac_try_echo=$ac_try;;
21285esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021289 grep -v '^ *+' conftest.er1 >conftest.err
21290 rm -f conftest.er1
21291 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021293 (exit $ac_status); } && {
21294 test -z "$ac_c_werror_flag" ||
21295 test ! -s conftest.err
21296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021297 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021298else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021300sed 's/^/| /' conftest.$ac_ext >&5
21301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021303/* confdefs.h. */
21304_ACEOF
21305cat confdefs.h >>conftest.$ac_ext
21306cat >>conftest.$ac_ext <<_ACEOF
21307/* end confdefs.h. */
21308$ac_includes_default
21309int
21310main ()
21311{
21312static struct stat ac_aggr;
21313if (sizeof ac_aggr.st_blocks)
21314return 0;
21315 ;
21316 return 0;
21317}
21318_ACEOF
21319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021320if { (ac_try="$ac_compile"
21321case "(($ac_try" in
21322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21323 *) ac_try_echo=$ac_try;;
21324esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021326 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021328 grep -v '^ *+' conftest.er1 >conftest.err
21329 rm -f conftest.er1
21330 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021332 (exit $ac_status); } && {
21333 test -z "$ac_c_werror_flag" ||
21334 test ! -s conftest.err
21335 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021336 ac_cv_member_struct_stat_st_blocks=yes
21337else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021339sed 's/^/| /' conftest.$ac_ext >&5
21340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021341 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021343
21344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021346
21347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021348fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021349{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21350echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21351if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021352
Martin v. Löwis11437992002-04-12 09:54:03 +000021353cat >>confdefs.h <<_ACEOF
21354#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21355_ACEOF
21356
21357
21358cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021359#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021360_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021361
21362else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021363 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021364 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021365 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21366 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021367esac
21368
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021369fi
21370
Michael W. Hudson54241132001-12-07 15:38:26 +000021371
Martin v. Löwis11437992002-04-12 09:54:03 +000021372
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021373{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21374echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021375if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021376 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021377else
Martin v. Löwis11437992002-04-12 09:54:03 +000021378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021379/* confdefs.h. */
21380_ACEOF
21381cat confdefs.h >>conftest.$ac_ext
21382cat >>conftest.$ac_ext <<_ACEOF
21383/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021384#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021385int
21386main ()
21387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021388return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021389 ;
21390 return 0;
21391}
21392_ACEOF
21393rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394if { (ac_try="$ac_compile"
21395case "(($ac_try" in
21396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21397 *) ac_try_echo=$ac_try;;
21398esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021402 grep -v '^ *+' conftest.er1 >conftest.err
21403 rm -f conftest.er1
21404 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021406 (exit $ac_status); } && {
21407 test -z "$ac_c_werror_flag" ||
21408 test ! -s conftest.err
21409 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021410 ac_cv_header_time_altzone=yes
21411else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021413sed 's/^/| /' conftest.$ac_ext >&5
21414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021416fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21419fi
21420
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021421{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21422echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021423if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021424
21425cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021426#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021427_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021428
21429fi
21430
Guido van Rossumda88dad1995-01-26 00:46:29 +000021431was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021432{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21433echo $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 +000021434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021440
21441#include <sys/types.h>
21442#include <sys/select.h>
21443#include <sys/time.h>
21444
Martin v. Löwis11437992002-04-12 09:54:03 +000021445int
21446main ()
21447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021448;
Martin v. Löwis11437992002-04-12 09:54:03 +000021449 ;
21450 return 0;
21451}
21452_ACEOF
21453rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454if { (ac_try="$ac_compile"
21455case "(($ac_try" in
21456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21457 *) ac_try_echo=$ac_try;;
21458esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021462 grep -v '^ *+' conftest.er1 >conftest.err
21463 rm -f conftest.er1
21464 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466 (exit $ac_status); } && {
21467 test -z "$ac_c_werror_flag" ||
21468 test ! -s conftest.err
21469 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021470
21471
21472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021473#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021474_ACEOF
21475
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021476 was_it_defined=yes
21477
Guido van Rossumf78abae1997-01-21 22:02:36 +000021478else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021480sed 's/^/| /' conftest.$ac_ext >&5
21481
Thomas Wouters477c8d52006-05-27 19:21:47 +000021482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021483fi
21484
21485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021486{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21487echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021488
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021489{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21490echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021491if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021492 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021493else
Martin v. Löwis11437992002-04-12 09:54:03 +000021494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021495/* confdefs.h. */
21496_ACEOF
21497cat confdefs.h >>conftest.$ac_ext
21498cat >>conftest.$ac_ext <<_ACEOF
21499/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021500
21501# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021502int
21503main ()
21504{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021505struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021506 ;
21507 return 0;
21508}
21509_ACEOF
21510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511if { (ac_try="$ac_compile"
21512case "(($ac_try" in
21513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21514 *) ac_try_echo=$ac_try;;
21515esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021519 grep -v '^ *+' conftest.er1 >conftest.err
21520 rm -f conftest.er1
21521 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021523 (exit $ac_status); } && {
21524 test -z "$ac_c_werror_flag" ||
21525 test ! -s conftest.err
21526 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021527 ac_cv_struct_addrinfo=yes
21528else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021530sed 's/^/| /' conftest.$ac_ext >&5
21531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021532 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021533fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21536fi
21537
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021538{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21539echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021540if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021541
21542cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021543#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021544_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021545
21546fi
21547
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021548{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21549echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021550if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021551 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021552else
Martin v. Löwis11437992002-04-12 09:54:03 +000021553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021554/* confdefs.h. */
21555_ACEOF
21556cat confdefs.h >>conftest.$ac_ext
21557cat >>conftest.$ac_ext <<_ACEOF
21558/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021559
21560# include <sys/types.h>
21561# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021562int
21563main ()
21564{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021565struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021566 ;
21567 return 0;
21568}
21569_ACEOF
21570rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021571if { (ac_try="$ac_compile"
21572case "(($ac_try" in
21573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21574 *) ac_try_echo=$ac_try;;
21575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021579 grep -v '^ *+' conftest.er1 >conftest.err
21580 rm -f conftest.er1
21581 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021583 (exit $ac_status); } && {
21584 test -z "$ac_c_werror_flag" ||
21585 test ! -s conftest.err
21586 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021587 ac_cv_struct_sockaddr_storage=yes
21588else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021590sed 's/^/| /' conftest.$ac_ext >&5
21591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021592 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021593fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21596fi
21597
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021598{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21599echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021600if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021601
21602cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021603#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021604_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021605
21606fi
21607
Guido van Rossum627b2d71993-12-24 10:39:16 +000021608# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021609
Michael W. Hudson54241132001-12-07 15:38:26 +000021610
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021611{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21612echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021613if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021614 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021615else
Martin v. Löwis11437992002-04-12 09:54:03 +000021616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021617/* confdefs.h. */
21618_ACEOF
21619cat confdefs.h >>conftest.$ac_ext
21620cat >>conftest.$ac_ext <<_ACEOF
21621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021622$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021623int
21624main ()
21625{
21626static int test_array [1 - 2 * !(((char) -1) < 0)];
21627test_array [0] = 0
21628
21629 ;
21630 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021631}
Martin v. Löwis11437992002-04-12 09:54:03 +000021632_ACEOF
21633rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021634if { (ac_try="$ac_compile"
21635case "(($ac_try" in
21636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21637 *) ac_try_echo=$ac_try;;
21638esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021642 grep -v '^ *+' conftest.er1 >conftest.err
21643 rm -f conftest.er1
21644 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021646 (exit $ac_status); } && {
21647 test -z "$ac_c_werror_flag" ||
21648 test ! -s conftest.err
21649 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021650 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021651else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021653sed 's/^/| /' conftest.$ac_ext >&5
21654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021655 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021657
21658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021659fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021660{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21661echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021662if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021663 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021664#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021665_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021666
21667fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021668
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021669{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21670echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021671if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021673else
21674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021675/* confdefs.h. */
21676_ACEOF
21677cat confdefs.h >>conftest.$ac_ext
21678cat >>conftest.$ac_ext <<_ACEOF
21679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021680
Martin v. Löwis11437992002-04-12 09:54:03 +000021681int
21682main ()
21683{
21684/* FIXME: Include the comments suggested by Paul. */
21685#ifndef __cplusplus
21686 /* Ultrix mips cc rejects this. */
21687 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021688 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021689 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021690 char const *const *pcpcc;
21691 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 /* NEC SVR4.0.2 mips cc rejects this. */
21693 struct point {int x, y;};
21694 static struct point const zero = {0,0};
21695 /* AIX XL C 1.02.0.0 rejects this.
21696 It does not let you subtract one const X* pointer from another in
21697 an arm of an if-expression whose if-part is not a constant
21698 expression */
21699 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021700 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021701 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021702 ++pcpcc;
21703 ppc = (char**) pcpcc;
21704 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 { /* SCO 3.2v4 cc rejects this. */
21706 char *t;
21707 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021708
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021710 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021711 }
21712 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21713 int x[] = {25, 17};
21714 const int *foo = &x[0];
21715 ++foo;
21716 }
21717 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21718 typedef const int *iptr;
21719 iptr p = 0;
21720 ++p;
21721 }
21722 { /* AIX XL C 1.02.0.0 rejects this saying
21723 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21724 struct s { int j; const int *ap[3]; };
21725 struct s *b; b->j = 5;
21726 }
21727 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21728 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021731 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021732#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021733
Martin v. Löwis11437992002-04-12 09:54:03 +000021734 ;
21735 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021736}
Martin v. Löwis11437992002-04-12 09:54:03 +000021737_ACEOF
21738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021739if { (ac_try="$ac_compile"
21740case "(($ac_try" in
21741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21742 *) ac_try_echo=$ac_try;;
21743esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021745 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021747 grep -v '^ *+' conftest.er1 >conftest.err
21748 rm -f conftest.er1
21749 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021751 (exit $ac_status); } && {
21752 test -z "$ac_c_werror_flag" ||
21753 test ! -s conftest.err
21754 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021755 ac_cv_c_const=yes
21756else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021758sed 's/^/| /' conftest.$ac_ext >&5
21759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021760 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021762
21763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021764fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021765{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21766echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021767if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021768
21769cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021770#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021771_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021772
21773fi
21774
Michael W. Hudson54241132001-12-07 15:38:26 +000021775
Guido van Rossumda88dad1995-01-26 00:46:29 +000021776works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021777{ echo "$as_me:$LINENO: checking for working volatile" >&5
21778echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021780/* confdefs.h. */
21781_ACEOF
21782cat confdefs.h >>conftest.$ac_ext
21783cat >>conftest.$ac_ext <<_ACEOF
21784/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021785
Martin v. Löwis11437992002-04-12 09:54:03 +000021786int
21787main ()
21788{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021789volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021790 ;
21791 return 0;
21792}
21793_ACEOF
21794rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021795if { (ac_try="$ac_compile"
21796case "(($ac_try" in
21797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21798 *) ac_try_echo=$ac_try;;
21799esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021803 grep -v '^ *+' conftest.er1 >conftest.err
21804 rm -f conftest.er1
21805 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021807 (exit $ac_status); } && {
21808 test -z "$ac_c_werror_flag" ||
21809 test ! -s conftest.err
21810 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021811 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021812else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021814sed 's/^/| /' conftest.$ac_ext >&5
21815
Martin v. Löwis11437992002-04-12 09:54:03 +000021816
21817cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021818#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021819_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021820
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021821
Guido van Rossum627b2d71993-12-24 10:39:16 +000021822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021823
21824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021825{ echo "$as_me:$LINENO: result: $works" >&5
21826echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021827
Guido van Rossumda88dad1995-01-26 00:46:29 +000021828works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021829{ echo "$as_me:$LINENO: checking for working signed char" >&5
21830echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021831cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021832/* confdefs.h. */
21833_ACEOF
21834cat confdefs.h >>conftest.$ac_ext
21835cat >>conftest.$ac_ext <<_ACEOF
21836/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021837
Martin v. Löwis11437992002-04-12 09:54:03 +000021838int
21839main ()
21840{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021841signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 ;
21843 return 0;
21844}
21845_ACEOF
21846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021847if { (ac_try="$ac_compile"
21848case "(($ac_try" in
21849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21850 *) ac_try_echo=$ac_try;;
21851esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021855 grep -v '^ *+' conftest.er1 >conftest.err
21856 rm -f conftest.er1
21857 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021859 (exit $ac_status); } && {
21860 test -z "$ac_c_werror_flag" ||
21861 test ! -s conftest.err
21862 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021863 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021864else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021866sed 's/^/| /' conftest.$ac_ext >&5
21867
Martin v. Löwis11437992002-04-12 09:54:03 +000021868
21869cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021870#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021871_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021872
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021873
Guido van Rossum7f43da71994-08-01 12:15:30 +000021874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021875
21876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021877{ echo "$as_me:$LINENO: result: $works" >&5
21878echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021879
Guido van Rossumda88dad1995-01-26 00:46:29 +000021880have_prototypes=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021881{ echo "$as_me:$LINENO: checking for prototypes" >&5
21882echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021884/* confdefs.h. */
21885_ACEOF
21886cat confdefs.h >>conftest.$ac_ext
21887cat >>conftest.$ac_ext <<_ACEOF
21888/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021889int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021890int
21891main ()
21892{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021893return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021894 ;
21895 return 0;
21896}
21897_ACEOF
21898rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899if { (ac_try="$ac_compile"
21900case "(($ac_try" in
21901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21902 *) ac_try_echo=$ac_try;;
21903esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021907 grep -v '^ *+' conftest.er1 >conftest.err
21908 rm -f conftest.er1
21909 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021911 (exit $ac_status); } && {
21912 test -z "$ac_c_werror_flag" ||
21913 test ! -s conftest.err
21914 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021915
21916
21917cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021918#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021919_ACEOF
21920
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021921 have_prototypes=yes
21922
Guido van Rossumf78abae1997-01-21 22:02:36 +000021923else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021925sed 's/^/| /' conftest.$ac_ext >&5
21926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021927
Guido van Rossum7f43da71994-08-01 12:15:30 +000021928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021929
21930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021931{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
21932echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021933
Guido van Rossumda88dad1995-01-26 00:46:29 +000021934works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021935{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21936echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021938/* confdefs.h. */
21939_ACEOF
21940cat confdefs.h >>conftest.$ac_ext
21941cat >>conftest.$ac_ext <<_ACEOF
21942/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021943
21944#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021945int foo(int x, ...) {
21946 va_list va;
21947 va_start(va, x);
21948 va_arg(va, int);
21949 va_arg(va, char *);
21950 va_arg(va, double);
21951 return 0;
21952}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021953
Martin v. Löwis11437992002-04-12 09:54:03 +000021954int
21955main ()
21956{
Guido van Rossum90eea071996-08-30 20:58:57 +000021957return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021958 ;
21959 return 0;
21960}
21961_ACEOF
21962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021963if { (ac_try="$ac_compile"
21964case "(($ac_try" in
21965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21966 *) ac_try_echo=$ac_try;;
21967esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021971 grep -v '^ *+' conftest.er1 >conftest.err
21972 rm -f conftest.er1
21973 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021975 (exit $ac_status); } && {
21976 test -z "$ac_c_werror_flag" ||
21977 test ! -s conftest.err
21978 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021979
21980
21981cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021982#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021983_ACEOF
21984
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021985 works=yes
21986
Guido van Rossumf78abae1997-01-21 22:02:36 +000021987else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021989sed 's/^/| /' conftest.$ac_ext >&5
21990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021991
Guido van Rossum627b2d71993-12-24 10:39:16 +000021992fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021993
21994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021995{ echo "$as_me:$LINENO: result: $works" >&5
21996echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021997
Martin v. Löwisd6320502004-08-12 13:45:08 +000021998# check for socketpair
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021999{ echo "$as_me:$LINENO: checking for socketpair" >&5
22000echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022001cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022002/* confdefs.h. */
22003_ACEOF
22004cat confdefs.h >>conftest.$ac_ext
22005cat >>conftest.$ac_ext <<_ACEOF
22006/* end confdefs.h. */
22007
22008#include <sys/types.h>
22009#include <sys/socket.h>
22010
22011int
22012main ()
22013{
22014void *x=socketpair
22015 ;
22016 return 0;
22017}
22018_ACEOF
22019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022020if { (ac_try="$ac_compile"
22021case "(($ac_try" in
22022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22023 *) ac_try_echo=$ac_try;;
22024esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022026 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022028 grep -v '^ *+' conftest.er1 >conftest.err
22029 rm -f conftest.er1
22030 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022032 (exit $ac_status); } && {
22033 test -z "$ac_c_werror_flag" ||
22034 test ! -s conftest.err
22035 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022036
22037cat >>confdefs.h <<\_ACEOF
22038#define HAVE_SOCKETPAIR 1
22039_ACEOF
22040
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022041 { echo "$as_me:$LINENO: result: yes" >&5
22042echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022043else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022044 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022045sed 's/^/| /' conftest.$ac_ext >&5
22046
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022047 { echo "$as_me:$LINENO: result: no" >&5
22048echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022049
22050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022051
22052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022053
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022054# check if sockaddr has sa_len member
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022055{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22056echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022058/* confdefs.h. */
22059_ACEOF
22060cat confdefs.h >>conftest.$ac_ext
22061cat >>conftest.$ac_ext <<_ACEOF
22062/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022063#include <sys/types.h>
22064#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022065int
22066main ()
22067{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022068struct sockaddr x;
22069x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 ;
22071 return 0;
22072}
22073_ACEOF
22074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022075if { (ac_try="$ac_compile"
22076case "(($ac_try" in
22077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22078 *) ac_try_echo=$ac_try;;
22079esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022083 grep -v '^ *+' conftest.er1 >conftest.err
22084 rm -f conftest.er1
22085 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022087 (exit $ac_status); } && {
22088 test -z "$ac_c_werror_flag" ||
22089 test ! -s conftest.err
22090 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022091 { echo "$as_me:$LINENO: result: yes" >&5
22092echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022093
22094cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022095#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022096_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022097
22098else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022100sed 's/^/| /' conftest.$ac_ext >&5
22101
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022102 { echo "$as_me:$LINENO: result: no" >&5
22103echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022105
22106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022107
Guido van Rossumda88dad1995-01-26 00:46:29 +000022108va_list_is_array=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022109{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22110echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022112/* confdefs.h. */
22113_ACEOF
22114cat confdefs.h >>conftest.$ac_ext
22115cat >>conftest.$ac_ext <<_ACEOF
22116/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022117
22118#ifdef HAVE_STDARG_PROTOTYPES
22119#include <stdarg.h>
22120#else
22121#include <varargs.h>
22122#endif
22123
Martin v. Löwis11437992002-04-12 09:54:03 +000022124int
22125main ()
22126{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022127va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022128 ;
22129 return 0;
22130}
22131_ACEOF
22132rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022133if { (ac_try="$ac_compile"
22134case "(($ac_try" in
22135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22136 *) ac_try_echo=$ac_try;;
22137esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022141 grep -v '^ *+' conftest.er1 >conftest.err
22142 rm -f conftest.er1
22143 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022145 (exit $ac_status); } && {
22146 test -z "$ac_c_werror_flag" ||
22147 test ! -s conftest.err
22148 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022149 :
22150else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022152sed 's/^/| /' conftest.$ac_ext >&5
22153
Martin v. Löwis11437992002-04-12 09:54:03 +000022154
22155
22156cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022157#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022158_ACEOF
22159
Guido van Rossumda88dad1995-01-26 00:46:29 +000022160 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022163
22164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022165{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22166echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022167
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022168# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022169
22170
22171
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022172{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22173echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022174if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022175 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022176else
Martin v. Löwis11437992002-04-12 09:54:03 +000022177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022178/* confdefs.h. */
22179_ACEOF
22180cat confdefs.h >>conftest.$ac_ext
22181cat >>conftest.$ac_ext <<_ACEOF
22182/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022183/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22185#define gethostbyname_r innocuous_gethostbyname_r
22186
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022187/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022188 which can conflict with char gethostbyname_r (); below.
22189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022190 <limits.h> exists even on freestanding compilers. */
22191
22192#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022193# include <limits.h>
22194#else
22195# include <assert.h>
22196#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022197
22198#undef gethostbyname_r
22199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022200/* Override any GCC internal prototype to avoid an error.
22201 Use char because int might match the return type of a GCC
22202 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022203#ifdef __cplusplus
22204extern "C"
22205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022206char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022207/* The GNU C library defines this for functions which it implements
22208 to always fail with ENOSYS. Some functions are actually named
22209 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022210#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022211choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022212#endif
22213
Skip Montanaro6dead952003-09-25 14:50:04 +000022214int
22215main ()
22216{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022217return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 ;
22219 return 0;
22220}
22221_ACEOF
22222rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022223if { (ac_try="$ac_link"
22224case "(($ac_try" in
22225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22226 *) ac_try_echo=$ac_try;;
22227esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022229 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022231 grep -v '^ *+' conftest.er1 >conftest.err
22232 rm -f conftest.er1
22233 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022235 (exit $ac_status); } && {
22236 test -z "$ac_c_werror_flag" ||
22237 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022238 } && test -s conftest$ac_exeext &&
22239 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022240 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022241else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022243sed 's/^/| /' conftest.$ac_ext >&5
22244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022245 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022247
22248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022249 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022250fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022251{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22252echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22253if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022254
Martin v. Löwis11437992002-04-12 09:54:03 +000022255 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022256#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022257_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022258
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022259 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22260echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022261 OLD_CFLAGS=$CFLAGS
22262 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022264/* confdefs.h. */
22265_ACEOF
22266cat confdefs.h >>conftest.$ac_ext
22267cat >>conftest.$ac_ext <<_ACEOF
22268/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022269
22270# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022271
Martin v. Löwis11437992002-04-12 09:54:03 +000022272int
22273main ()
22274{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022275
22276 char *name;
22277 struct hostent *he, *res;
22278 char buffer[2048];
22279 int buflen = 2048;
22280 int h_errnop;
22281
22282 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022283
22284 ;
22285 return 0;
22286}
22287_ACEOF
22288rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289if { (ac_try="$ac_compile"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022297 grep -v '^ *+' conftest.er1 >conftest.err
22298 rm -f conftest.er1
22299 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022301 (exit $ac_status); } && {
22302 test -z "$ac_c_werror_flag" ||
22303 test ! -s conftest.err
22304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022305
22306 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022307#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022308_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022309
Martin v. Löwis11437992002-04-12 09:54:03 +000022310
22311cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022312#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022314
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022315 { echo "$as_me:$LINENO: result: yes" >&5
22316echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022317
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022318else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022320sed 's/^/| /' conftest.$ac_ext >&5
22321
Martin v. Löwis11437992002-04-12 09:54:03 +000022322
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022323 { echo "$as_me:$LINENO: result: no" >&5
22324echo "${ECHO_T}no" >&6; }
22325 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22326echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022328/* confdefs.h. */
22329_ACEOF
22330cat confdefs.h >>conftest.$ac_ext
22331cat >>conftest.$ac_ext <<_ACEOF
22332/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022333
22334# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022335
Martin v. Löwis11437992002-04-12 09:54:03 +000022336int
22337main ()
22338{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022339
22340 char *name;
22341 struct hostent *he;
22342 char buffer[2048];
22343 int buflen = 2048;
22344 int h_errnop;
22345
22346 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022347
22348 ;
22349 return 0;
22350}
22351_ACEOF
22352rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022353if { (ac_try="$ac_compile"
22354case "(($ac_try" in
22355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22356 *) ac_try_echo=$ac_try;;
22357esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022361 grep -v '^ *+' conftest.er1 >conftest.err
22362 rm -f conftest.er1
22363 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022365 (exit $ac_status); } && {
22366 test -z "$ac_c_werror_flag" ||
22367 test ! -s conftest.err
22368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
22370 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022371#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022372_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022373
Martin v. Löwis11437992002-04-12 09:54:03 +000022374
22375cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022376#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022377_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022378
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022379 { echo "$as_me:$LINENO: result: yes" >&5
22380echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022381
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022382else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022384sed 's/^/| /' conftest.$ac_ext >&5
22385
Martin v. Löwis11437992002-04-12 09:54:03 +000022386
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022387 { echo "$as_me:$LINENO: result: no" >&5
22388echo "${ECHO_T}no" >&6; }
22389 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22390echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022392/* confdefs.h. */
22393_ACEOF
22394cat confdefs.h >>conftest.$ac_ext
22395cat >>conftest.$ac_ext <<_ACEOF
22396/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022397
22398# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022399
Martin v. Löwis11437992002-04-12 09:54:03 +000022400int
22401main ()
22402{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022403
22404 char *name;
22405 struct hostent *he;
22406 struct hostent_data data;
22407
22408 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022409
22410 ;
22411 return 0;
22412}
22413_ACEOF
22414rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022415if { (ac_try="$ac_compile"
22416case "(($ac_try" in
22417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22418 *) ac_try_echo=$ac_try;;
22419esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022423 grep -v '^ *+' conftest.er1 >conftest.err
22424 rm -f conftest.er1
22425 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022427 (exit $ac_status); } && {
22428 test -z "$ac_c_werror_flag" ||
22429 test ! -s conftest.err
22430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022431
22432 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022433#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022434_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022435
Martin v. Löwis11437992002-04-12 09:54:03 +000022436
22437cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022438#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022439_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022440
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022441 { echo "$as_me:$LINENO: result: yes" >&5
22442echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022444else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022446sed 's/^/| /' conftest.$ac_ext >&5
22447
Martin v. Löwis11437992002-04-12 09:54:03 +000022448
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022449 { echo "$as_me:$LINENO: result: no" >&5
22450echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022451
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022453
22454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022457
22458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022459
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022461
22462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022463 CFLAGS=$OLD_CFLAGS
22464
22465else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022466
Martin v. Löwis11437992002-04-12 09:54:03 +000022467
22468for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022469do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022475else
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022477/* confdefs.h. */
22478_ACEOF
22479cat confdefs.h >>conftest.$ac_ext
22480cat >>conftest.$ac_ext <<_ACEOF
22481/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22484#define $ac_func innocuous_$ac_func
22485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022486/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022487 which can conflict with char $ac_func (); below.
22488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022489 <limits.h> exists even on freestanding compilers. */
22490
22491#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022492# include <limits.h>
22493#else
22494# include <assert.h>
22495#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022496
22497#undef $ac_func
22498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022499/* Override any GCC internal prototype to avoid an error.
22500 Use char because int might match the return type of a GCC
22501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022502#ifdef __cplusplus
22503extern "C"
22504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022505char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022506/* The GNU C library defines this for functions which it implements
22507 to always fail with ENOSYS. Some functions are actually named
22508 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022509#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022510choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022511#endif
22512
Skip Montanaro6dead952003-09-25 14:50:04 +000022513int
22514main ()
22515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022516return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022517 ;
22518 return 0;
22519}
22520_ACEOF
22521rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022522if { (ac_try="$ac_link"
22523case "(($ac_try" in
22524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22525 *) ac_try_echo=$ac_try;;
22526esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022528 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022530 grep -v '^ *+' conftest.er1 >conftest.err
22531 rm -f conftest.er1
22532 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022534 (exit $ac_status); } && {
22535 test -z "$ac_c_werror_flag" ||
22536 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022537 } && test -s conftest$ac_exeext &&
22538 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022539 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022540else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022542sed 's/^/| /' conftest.$ac_ext >&5
22543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022544 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022546
22547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022548 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022549fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022550ac_res=`eval echo '${'$as_ac_var'}'`
22551 { echo "$as_me:$LINENO: result: $ac_res" >&5
22552echo "${ECHO_T}$ac_res" >&6; }
22553if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022554 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022556_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022558fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022559done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022560
Michael W. Hudson54241132001-12-07 15:38:26 +000022561
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022562fi
22563
Michael W. Hudson54241132001-12-07 15:38:26 +000022564
22565
22566
22567
22568
22569
Guido van Rossum627b2d71993-12-24 10:39:16 +000022570# checks for system services
22571# (none yet)
22572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022573# Linux requires this for correct f.p. operations
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022574{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22575echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022576if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022577 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022578else
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022580/* confdefs.h. */
22581_ACEOF
22582cat confdefs.h >>conftest.$ac_ext
22583cat >>conftest.$ac_ext <<_ACEOF
22584/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022585/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22586 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22587#define __fpu_control innocuous___fpu_control
22588
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022589/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022590 which can conflict with char __fpu_control (); below.
22591 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022592 <limits.h> exists even on freestanding compilers. */
22593
22594#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022595# include <limits.h>
22596#else
22597# include <assert.h>
22598#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022599
22600#undef __fpu_control
22601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022602/* Override any GCC internal prototype to avoid an error.
22603 Use char because int might match the return type of a GCC
22604 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022605#ifdef __cplusplus
22606extern "C"
22607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022608char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022609/* The GNU C library defines this for functions which it implements
22610 to always fail with ENOSYS. Some functions are actually named
22611 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022612#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022613choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022614#endif
22615
Skip Montanaro6dead952003-09-25 14:50:04 +000022616int
22617main ()
22618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022619return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022620 ;
22621 return 0;
22622}
22623_ACEOF
22624rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022625if { (ac_try="$ac_link"
22626case "(($ac_try" in
22627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22628 *) ac_try_echo=$ac_try;;
22629esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022631 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022633 grep -v '^ *+' conftest.er1 >conftest.err
22634 rm -f conftest.er1
22635 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022637 (exit $ac_status); } && {
22638 test -z "$ac_c_werror_flag" ||
22639 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022640 } && test -s conftest$ac_exeext &&
22641 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022642 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022643else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022645sed 's/^/| /' conftest.$ac_ext >&5
22646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022647 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022649
22650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022651 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022652fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022653{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22654echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22655if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022656 :
22657else
Martin v. Löwis11437992002-04-12 09:54:03 +000022658
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022659{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22660echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022661if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022662 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022663else
Martin v. Löwis11437992002-04-12 09:54:03 +000022664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022665LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022667/* confdefs.h. */
22668_ACEOF
22669cat confdefs.h >>conftest.$ac_ext
22670cat >>conftest.$ac_ext <<_ACEOF
22671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022673/* Override any GCC internal prototype to avoid an error.
22674 Use char because int might match the return type of a GCC
22675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022676#ifdef __cplusplus
22677extern "C"
22678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022679char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022680int
22681main ()
22682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022683return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022684 ;
22685 return 0;
22686}
22687_ACEOF
22688rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022689if { (ac_try="$ac_link"
22690case "(($ac_try" in
22691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22692 *) ac_try_echo=$ac_try;;
22693esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022695 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022697 grep -v '^ *+' conftest.er1 >conftest.err
22698 rm -f conftest.er1
22699 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022701 (exit $ac_status); } && {
22702 test -z "$ac_c_werror_flag" ||
22703 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022704 } && test -s conftest$ac_exeext &&
22705 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022706 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022707else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022708 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022709sed 's/^/| /' conftest.$ac_ext >&5
22710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022711 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022713
22714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022715 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022716LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022717fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022718{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22719echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22720if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022721 cat >>confdefs.h <<_ACEOF
22722#define HAVE_LIBIEEE 1
22723_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022725 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022726
Guido van Rossum627b2d71993-12-24 10:39:16 +000022727fi
22728
Michael W. Hudson54241132001-12-07 15:38:26 +000022729
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022730fi
22731
Michael W. Hudson54241132001-12-07 15:38:26 +000022732
Guido van Rossum7f253911997-05-09 02:42:48 +000022733# Check for --with-fpectl
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022734{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22735echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022737# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022738if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022739 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022740if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022741then
22742
22743cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022744#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022745_ACEOF
22746
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022747 { echo "$as_me:$LINENO: result: yes" >&5
22748echo "${ECHO_T}yes" >&6; }
22749else { echo "$as_me:$LINENO: result: no" >&5
22750echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022751fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022752else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022753 { echo "$as_me:$LINENO: result: no" >&5
22754echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022755fi
22756
Guido van Rossum7f253911997-05-09 02:42:48 +000022757
Guido van Rossum7f43da71994-08-01 12:15:30 +000022758# check for --with-libm=...
22759
Guido van Rossum563e7081996-09-10 18:20:48 +000022760case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022761Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022762*) LIBM=-lm
22763esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022764{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22765echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022767# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022768if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022769 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022770if test "$withval" = no
22771then LIBM=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022772 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22773echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022774elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022775then LIBM=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022776 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22777echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22778else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22779echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022781fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022782else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022783 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22784echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022785fi
22786
Guido van Rossum7f43da71994-08-01 12:15:30 +000022787
22788# check for --with-libc=...
22789
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022790{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22791echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022793# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022794if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022795 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022796if test "$withval" = no
22797then LIBC=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022798 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22799echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022800elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022801then LIBC=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022802 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22803echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22804else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22805echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022806 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022807fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022808else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022809 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22810echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811fi
22812
Guido van Rossum7f43da71994-08-01 12:15:30 +000022813
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022814# **************************************************
22815# * Check for various properties of floating point *
22816# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022817
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022818{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22819echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022820if test "${ac_cv_little_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022821 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022822else
22823
22824if test "$cross_compiling" = yes; then
22825 ac_cv_little_endian_double=no
22826else
22827 cat >conftest.$ac_ext <<_ACEOF
22828/* confdefs.h. */
22829_ACEOF
22830cat confdefs.h >>conftest.$ac_ext
22831cat >>conftest.$ac_ext <<_ACEOF
22832/* end confdefs.h. */
22833
22834#include <string.h>
22835int main() {
22836 double x = 9006104071832581.0;
22837 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22838 return 0;
22839 else
22840 return 1;
22841}
22842
22843_ACEOF
22844rm -f conftest$ac_exeext
22845if { (ac_try="$ac_link"
22846case "(($ac_try" in
22847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22848 *) ac_try_echo=$ac_try;;
22849esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022851 (eval "$ac_link") 2>&5
22852 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22855 { (case "(($ac_try" in
22856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22857 *) ac_try_echo=$ac_try;;
22858esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022860 (eval "$ac_try") 2>&5
22861 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022863 (exit $ac_status); }; }; then
22864 ac_cv_little_endian_double=yes
22865else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022866 echo "$as_me: program exited with status $ac_status" >&5
22867echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022868sed 's/^/| /' conftest.$ac_ext >&5
22869
22870( exit $ac_status )
22871ac_cv_little_endian_double=no
22872fi
22873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22874fi
22875
22876
22877fi
22878
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022879{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22880echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022881if test "$ac_cv_little_endian_double" = yes
22882then
22883
22884cat >>confdefs.h <<\_ACEOF
22885#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22886_ACEOF
22887
22888fi
22889
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022890{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22891echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022892if test "${ac_cv_big_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022893 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022894else
22895
22896if test "$cross_compiling" = yes; then
22897 ac_cv_big_endian_double=no
22898else
22899 cat >conftest.$ac_ext <<_ACEOF
22900/* confdefs.h. */
22901_ACEOF
22902cat confdefs.h >>conftest.$ac_ext
22903cat >>conftest.$ac_ext <<_ACEOF
22904/* end confdefs.h. */
22905
22906#include <string.h>
22907int main() {
22908 double x = 9006104071832581.0;
22909 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22910 return 0;
22911 else
22912 return 1;
22913}
22914
22915_ACEOF
22916rm -f conftest$ac_exeext
22917if { (ac_try="$ac_link"
22918case "(($ac_try" in
22919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22920 *) ac_try_echo=$ac_try;;
22921esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022923 (eval "$ac_link") 2>&5
22924 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22927 { (case "(($ac_try" in
22928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22929 *) ac_try_echo=$ac_try;;
22930esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022932 (eval "$ac_try") 2>&5
22933 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022935 (exit $ac_status); }; }; then
22936 ac_cv_big_endian_double=yes
22937else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022938 echo "$as_me: program exited with status $ac_status" >&5
22939echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022940sed 's/^/| /' conftest.$ac_ext >&5
22941
22942( exit $ac_status )
22943ac_cv_big_endian_double=no
22944fi
22945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22946fi
22947
22948
22949fi
22950
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022951{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22952echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022953if test "$ac_cv_big_endian_double" = yes
22954then
22955
22956cat >>confdefs.h <<\_ACEOF
22957#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22958_ACEOF
22959
22960fi
22961
22962# Some ARM platforms use a mixed-endian representation for doubles.
22963# While Python doesn't currently have full support for these platforms
22964# (see e.g., issue 1762561), we can at least make sure that float <-> string
22965# conversions work.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022966{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22967echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022968if test "${ac_cv_mixed_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022969 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022970else
22971
22972if test "$cross_compiling" = yes; then
22973 ac_cv_mixed_endian_double=no
22974else
22975 cat >conftest.$ac_ext <<_ACEOF
22976/* confdefs.h. */
22977_ACEOF
22978cat confdefs.h >>conftest.$ac_ext
22979cat >>conftest.$ac_ext <<_ACEOF
22980/* end confdefs.h. */
22981
22982#include <string.h>
22983int main() {
22984 double x = 9006104071832581.0;
22985 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22986 return 0;
22987 else
22988 return 1;
22989}
22990
22991_ACEOF
22992rm -f conftest$ac_exeext
22993if { (ac_try="$ac_link"
22994case "(($ac_try" in
22995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22996 *) ac_try_echo=$ac_try;;
22997esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022999 (eval "$ac_link") 2>&5
23000 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23003 { (case "(($ac_try" in
23004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23005 *) ac_try_echo=$ac_try;;
23006esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023008 (eval "$ac_try") 2>&5
23009 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023011 (exit $ac_status); }; }; then
23012 ac_cv_mixed_endian_double=yes
23013else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023014 echo "$as_me: program exited with status $ac_status" >&5
23015echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023016sed 's/^/| /' conftest.$ac_ext >&5
23017
23018( exit $ac_status )
23019ac_cv_mixed_endian_double=no
23020fi
23021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23022fi
23023
23024
23025fi
23026
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023027{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23028echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023029if test "$ac_cv_mixed_endian_double" = yes
23030then
23031
23032cat >>confdefs.h <<\_ACEOF
23033#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23034_ACEOF
23035
23036fi
23037
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023038# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023039# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023040# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023041# rounding; this is a problem on x86, where the x87 FPU has a default
23042# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23043# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023044if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23045then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023046 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023047 # x87 control word. It should be, but you never know...
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023048 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23049echo $ECHO_N "checking whether we can use gcc inline assembler to get and set x87 control word... $ECHO_C" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023050 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023051/* confdefs.h. */
23052_ACEOF
23053cat confdefs.h >>conftest.$ac_ext
23054cat >>conftest.$ac_ext <<_ACEOF
23055/* end confdefs.h. */
23056
23057int
23058main ()
23059{
23060
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023061 unsigned short cw;
23062 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23063 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023064
23065 ;
23066 return 0;
23067}
23068_ACEOF
23069rm -f conftest.$ac_objext
23070if { (ac_try="$ac_compile"
23071case "(($ac_try" in
23072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23073 *) ac_try_echo=$ac_try;;
23074esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023076 (eval "$ac_compile") 2>conftest.er1
23077 ac_status=$?
23078 grep -v '^ *+' conftest.er1 >conftest.err
23079 rm -f conftest.er1
23080 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023082 (exit $ac_status); } && {
23083 test -z "$ac_c_werror_flag" ||
23084 test ! -s conftest.err
23085 } && test -s conftest.$ac_objext; then
23086 have_gcc_asm_for_x87=yes
23087else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023088 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023089sed 's/^/| /' conftest.$ac_ext >&5
23090
23091 have_gcc_asm_for_x87=no
23092fi
23093
23094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023095 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23096echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023097 if test "$have_gcc_asm_for_x87" = yes
23098 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023099
23100cat >>confdefs.h <<\_ACEOF
23101#define HAVE_GCC_ASM_FOR_X87 1
23102_ACEOF
23103
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023104 fi
23105fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023106
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023107# Detect whether system arithmetic is subject to x87-style double
23108# rounding issues. The result of this test has little meaning on non
23109# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23110# mode is round-to-nearest and double rounding issues are present, and
23111# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023112{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23113echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023114# $BASECFLAGS may affect the result
23115ac_save_cc="$CC"
23116CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023117if test "$cross_compiling" = yes; then
23118 ac_cv_x87_double_rounding=no
23119else
23120 cat >conftest.$ac_ext <<_ACEOF
23121/* confdefs.h. */
23122_ACEOF
23123cat confdefs.h >>conftest.$ac_ext
23124cat >>conftest.$ac_ext <<_ACEOF
23125/* end confdefs.h. */
23126
23127#include <stdlib.h>
23128#include <math.h>
23129int main() {
23130 volatile double x, y, z;
23131 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23132 x = 0.99999999999999989; /* 1-2**-53 */
23133 y = 1./x;
23134 if (y != 1.)
23135 exit(0);
23136 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23137 x = 1e16;
23138 y = 2.99999;
23139 z = x + y;
23140 if (z != 1e16+4.)
23141 exit(0);
23142 /* both tests show evidence of double rounding */
23143 exit(1);
23144}
23145
23146_ACEOF
23147rm -f conftest$ac_exeext
23148if { (ac_try="$ac_link"
23149case "(($ac_try" in
23150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23151 *) ac_try_echo=$ac_try;;
23152esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023154 (eval "$ac_link") 2>&5
23155 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23158 { (case "(($ac_try" in
23159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23160 *) ac_try_echo=$ac_try;;
23161esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023163 (eval "$ac_try") 2>&5
23164 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023166 (exit $ac_status); }; }; then
23167 ac_cv_x87_double_rounding=no
23168else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023169 echo "$as_me: program exited with status $ac_status" >&5
23170echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023171sed 's/^/| /' conftest.$ac_ext >&5
23172
23173( exit $ac_status )
23174ac_cv_x87_double_rounding=yes
23175fi
23176rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23177fi
23178
23179
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023180CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023181{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23182echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023183if test "$ac_cv_x87_double_rounding" = yes
23184then
23185
23186cat >>confdefs.h <<\_ACEOF
23187#define X87_DOUBLE_ROUNDING 1
23188_ACEOF
23189
23190fi
23191
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023192# ************************************
23193# * Check for mathematical functions *
23194# ************************************
23195
23196LIBS_SAVE=$LIBS
23197LIBS="$LIBS $LIBM"
23198
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023199# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23200# -0. on some architectures.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023201{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23202echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023203if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023204 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023205else
23206
23207if test "$cross_compiling" = yes; then
23208 ac_cv_tanh_preserves_zero_sign=no
23209else
23210 cat >conftest.$ac_ext <<_ACEOF
23211/* confdefs.h. */
23212_ACEOF
23213cat confdefs.h >>conftest.$ac_ext
23214cat >>conftest.$ac_ext <<_ACEOF
23215/* end confdefs.h. */
23216
23217#include <math.h>
23218#include <stdlib.h>
23219int main() {
23220 /* return 0 if either negative zeros don't exist
23221 on this platform or if negative zeros exist
23222 and tanh(-0.) == -0. */
23223 if (atan2(0., -1.) == atan2(-0., -1.) ||
23224 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23225 else exit(1);
23226}
23227
23228_ACEOF
23229rm -f conftest$ac_exeext
23230if { (ac_try="$ac_link"
23231case "(($ac_try" in
23232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23233 *) ac_try_echo=$ac_try;;
23234esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023236 (eval "$ac_link") 2>&5
23237 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23240 { (case "(($ac_try" in
23241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23242 *) ac_try_echo=$ac_try;;
23243esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023245 (eval "$ac_try") 2>&5
23246 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023248 (exit $ac_status); }; }; then
23249 ac_cv_tanh_preserves_zero_sign=yes
23250else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023251 echo "$as_me: program exited with status $ac_status" >&5
23252echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023253sed 's/^/| /' conftest.$ac_ext >&5
23254
23255( exit $ac_status )
23256ac_cv_tanh_preserves_zero_sign=no
23257fi
23258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23259fi
23260
23261
23262fi
23263
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023264{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23265echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023266if test "$ac_cv_tanh_preserves_zero_sign" = yes
23267then
23268
23269cat >>confdefs.h <<\_ACEOF
23270#define TANH_PRESERVES_ZERO_SIGN 1
23271_ACEOF
23272
23273fi
23274
23275
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023276
Michael W. Hudson54241132001-12-07 15:38:26 +000023277
Christian Heimes99170a52007-12-19 02:07:34 +000023278
23279
23280
23281
23282
Mark Dickinsonf2537862009-04-18 13:58:18 +000023283
Mark Dickinson9c113362009-09-05 10:36:23 +000023284for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23285do
23286as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23287{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23288echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23289if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23290 echo $ECHO_N "(cached) $ECHO_C" >&6
23291else
23292 cat >conftest.$ac_ext <<_ACEOF
23293/* confdefs.h. */
23294_ACEOF
23295cat confdefs.h >>conftest.$ac_ext
23296cat >>conftest.$ac_ext <<_ACEOF
23297/* end confdefs.h. */
23298/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23299 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23300#define $ac_func innocuous_$ac_func
23301
23302/* System header to define __stub macros and hopefully few prototypes,
23303 which can conflict with char $ac_func (); below.
23304 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23305 <limits.h> exists even on freestanding compilers. */
23306
23307#ifdef __STDC__
23308# include <limits.h>
23309#else
23310# include <assert.h>
23311#endif
23312
23313#undef $ac_func
23314
23315/* Override any GCC internal prototype to avoid an error.
23316 Use char because int might match the return type of a GCC
23317 builtin and then its argument prototype would still apply. */
23318#ifdef __cplusplus
23319extern "C"
23320#endif
23321char $ac_func ();
23322/* The GNU C library defines this for functions which it implements
23323 to always fail with ENOSYS. Some functions are actually named
23324 something starting with __ and the normal name is an alias. */
23325#if defined __stub_$ac_func || defined __stub___$ac_func
23326choke me
23327#endif
23328
23329int
23330main ()
23331{
23332return $ac_func ();
23333 ;
23334 return 0;
23335}
23336_ACEOF
23337rm -f conftest.$ac_objext conftest$ac_exeext
23338if { (ac_try="$ac_link"
23339case "(($ac_try" in
23340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23341 *) ac_try_echo=$ac_try;;
23342esac
23343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23344 (eval "$ac_link") 2>conftest.er1
23345 ac_status=$?
23346 grep -v '^ *+' conftest.er1 >conftest.err
23347 rm -f conftest.er1
23348 cat conftest.err >&5
23349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23350 (exit $ac_status); } && {
23351 test -z "$ac_c_werror_flag" ||
23352 test ! -s conftest.err
23353 } && test -s conftest$ac_exeext &&
23354 $as_test_x conftest$ac_exeext; then
23355 eval "$as_ac_var=yes"
23356else
23357 echo "$as_me: failed program was:" >&5
23358sed 's/^/| /' conftest.$ac_ext >&5
23359
23360 eval "$as_ac_var=no"
23361fi
23362
23363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23364 conftest$ac_exeext conftest.$ac_ext
23365fi
23366ac_res=`eval echo '${'$as_ac_var'}'`
23367 { echo "$as_me:$LINENO: result: $ac_res" >&5
23368echo "${ECHO_T}$ac_res" >&6; }
23369if test `eval echo '${'$as_ac_var'}'` = yes; then
23370 cat >>confdefs.h <<_ACEOF
23371#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23372_ACEOF
23373
23374fi
23375done
23376
23377
23378
23379
23380
23381
23382for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023383do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23385{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023387if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023388 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023389else
23390 cat >conftest.$ac_ext <<_ACEOF
23391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
23396/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23397 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23398#define $ac_func innocuous_$ac_func
23399
23400/* System header to define __stub macros and hopefully few prototypes,
23401 which can conflict with char $ac_func (); below.
23402 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23403 <limits.h> exists even on freestanding compilers. */
23404
23405#ifdef __STDC__
23406# include <limits.h>
23407#else
23408# include <assert.h>
23409#endif
23410
23411#undef $ac_func
23412
23413/* Override any GCC internal prototype to avoid an error.
23414 Use char because int might match the return type of a GCC
23415 builtin and then its argument prototype would still apply. */
23416#ifdef __cplusplus
23417extern "C"
23418#endif
23419char $ac_func ();
23420/* The GNU C library defines this for functions which it implements
23421 to always fail with ENOSYS. Some functions are actually named
23422 something starting with __ and the normal name is an alias. */
23423#if defined __stub_$ac_func || defined __stub___$ac_func
23424choke me
23425#endif
23426
23427int
23428main ()
23429{
23430return $ac_func ();
23431 ;
23432 return 0;
23433}
23434_ACEOF
23435rm -f conftest.$ac_objext conftest$ac_exeext
23436if { (ac_try="$ac_link"
23437case "(($ac_try" in
23438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23439 *) ac_try_echo=$ac_try;;
23440esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023442 (eval "$ac_link") 2>conftest.er1
23443 ac_status=$?
23444 grep -v '^ *+' conftest.er1 >conftest.err
23445 rm -f conftest.er1
23446 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023448 (exit $ac_status); } && {
23449 test -z "$ac_c_werror_flag" ||
23450 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023451 } && test -s conftest$ac_exeext &&
23452 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023453 eval "$as_ac_var=yes"
23454else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023455 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023456sed 's/^/| /' conftest.$ac_ext >&5
23457
23458 eval "$as_ac_var=no"
23459fi
23460
23461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23462 conftest$ac_exeext conftest.$ac_ext
23463fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023464ac_res=`eval echo '${'$as_ac_var'}'`
23465 { echo "$as_me:$LINENO: result: $ac_res" >&5
23466echo "${ECHO_T}$ac_res" >&6; }
23467if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023468 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023470_ACEOF
23471
23472fi
23473done
23474
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023475{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23476echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023477if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023478 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023479else
23480 cat >conftest.$ac_ext <<_ACEOF
23481/* confdefs.h. */
23482_ACEOF
23483cat confdefs.h >>conftest.$ac_ext
23484cat >>conftest.$ac_ext <<_ACEOF
23485/* end confdefs.h. */
23486#include <math.h>
23487
23488int
23489main ()
23490{
23491#ifndef isinf
23492 (void) isinf;
23493#endif
23494
23495 ;
23496 return 0;
23497}
23498_ACEOF
23499rm -f conftest.$ac_objext
23500if { (ac_try="$ac_compile"
23501case "(($ac_try" in
23502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23503 *) ac_try_echo=$ac_try;;
23504esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023506 (eval "$ac_compile") 2>conftest.er1
23507 ac_status=$?
23508 grep -v '^ *+' conftest.er1 >conftest.err
23509 rm -f conftest.er1
23510 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023512 (exit $ac_status); } && {
23513 test -z "$ac_c_werror_flag" ||
23514 test ! -s conftest.err
23515 } && test -s conftest.$ac_objext; then
23516 ac_cv_have_decl_isinf=yes
23517else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023518 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023519sed 's/^/| /' conftest.$ac_ext >&5
23520
23521 ac_cv_have_decl_isinf=no
23522fi
23523
23524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23525fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023526{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23527echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23528if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023529
23530cat >>confdefs.h <<_ACEOF
23531#define HAVE_DECL_ISINF 1
23532_ACEOF
23533
23534
23535else
23536 cat >>confdefs.h <<_ACEOF
23537#define HAVE_DECL_ISINF 0
23538_ACEOF
23539
23540
23541fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023542{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23543echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023544if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023545 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023546else
23547 cat >conftest.$ac_ext <<_ACEOF
23548/* confdefs.h. */
23549_ACEOF
23550cat confdefs.h >>conftest.$ac_ext
23551cat >>conftest.$ac_ext <<_ACEOF
23552/* end confdefs.h. */
23553#include <math.h>
23554
23555int
23556main ()
23557{
23558#ifndef isnan
23559 (void) isnan;
23560#endif
23561
23562 ;
23563 return 0;
23564}
23565_ACEOF
23566rm -f conftest.$ac_objext
23567if { (ac_try="$ac_compile"
23568case "(($ac_try" in
23569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23570 *) ac_try_echo=$ac_try;;
23571esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023573 (eval "$ac_compile") 2>conftest.er1
23574 ac_status=$?
23575 grep -v '^ *+' conftest.er1 >conftest.err
23576 rm -f conftest.er1
23577 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023579 (exit $ac_status); } && {
23580 test -z "$ac_c_werror_flag" ||
23581 test ! -s conftest.err
23582 } && test -s conftest.$ac_objext; then
23583 ac_cv_have_decl_isnan=yes
23584else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023585 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023586sed 's/^/| /' conftest.$ac_ext >&5
23587
23588 ac_cv_have_decl_isnan=no
23589fi
23590
23591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23592fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023593{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23594echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23595if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023596
23597cat >>confdefs.h <<_ACEOF
23598#define HAVE_DECL_ISNAN 1
23599_ACEOF
23600
23601
23602else
23603 cat >>confdefs.h <<_ACEOF
23604#define HAVE_DECL_ISNAN 0
23605_ACEOF
23606
23607
23608fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023609{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23610echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023611if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023612 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023613else
23614 cat >conftest.$ac_ext <<_ACEOF
23615/* confdefs.h. */
23616_ACEOF
23617cat confdefs.h >>conftest.$ac_ext
23618cat >>conftest.$ac_ext <<_ACEOF
23619/* end confdefs.h. */
23620#include <math.h>
23621
23622int
23623main ()
23624{
23625#ifndef isfinite
23626 (void) isfinite;
23627#endif
23628
23629 ;
23630 return 0;
23631}
23632_ACEOF
23633rm -f conftest.$ac_objext
23634if { (ac_try="$ac_compile"
23635case "(($ac_try" in
23636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23637 *) ac_try_echo=$ac_try;;
23638esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023640 (eval "$ac_compile") 2>conftest.er1
23641 ac_status=$?
23642 grep -v '^ *+' conftest.er1 >conftest.err
23643 rm -f conftest.er1
23644 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023646 (exit $ac_status); } && {
23647 test -z "$ac_c_werror_flag" ||
23648 test ! -s conftest.err
23649 } && test -s conftest.$ac_objext; then
23650 ac_cv_have_decl_isfinite=yes
23651else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023652 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023653sed 's/^/| /' conftest.$ac_ext >&5
23654
23655 ac_cv_have_decl_isfinite=no
23656fi
23657
23658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23659fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023660{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23661echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23662if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023663
23664cat >>confdefs.h <<_ACEOF
23665#define HAVE_DECL_ISFINITE 1
23666_ACEOF
23667
23668
23669else
23670 cat >>confdefs.h <<_ACEOF
23671#define HAVE_DECL_ISFINITE 0
23672_ACEOF
23673
23674
23675fi
23676
23677
Christian Heimes99170a52007-12-19 02:07:34 +000023678
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023679LIBS=$LIBS_SAVE
23680
Mark Dickinson10683072009-04-18 21:18:19 +000023681# Multiprocessing check for broken sem_getvalue
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023682{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23683echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023684if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23685 echo $ECHO_N "(cached) $ECHO_C" >&6
23686else
23687 if test "$cross_compiling" = yes; then
23688 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023689else
23690 cat >conftest.$ac_ext <<_ACEOF
23691/* confdefs.h. */
23692_ACEOF
23693cat confdefs.h >>conftest.$ac_ext
23694cat >>conftest.$ac_ext <<_ACEOF
23695/* end confdefs.h. */
23696
23697#include <unistd.h>
23698#include <fcntl.h>
23699#include <stdio.h>
23700#include <semaphore.h>
23701#include <sys/stat.h>
23702
23703int main(void){
23704 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23705 int count;
23706 int res;
23707 if(a==SEM_FAILED){
23708 perror("sem_open");
23709 return 1;
23710
23711 }
23712 res = sem_getvalue(a, &count);
23713 sem_close(a);
23714 return res==-1 ? 1 : 0;
23715}
23716
Mark Dickinson10683072009-04-18 21:18:19 +000023717_ACEOF
23718rm -f conftest$ac_exeext
23719if { (ac_try="$ac_link"
23720case "(($ac_try" in
23721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23722 *) ac_try_echo=$ac_try;;
23723esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023725 (eval "$ac_link") 2>&5
23726 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023728 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23729 { (case "(($ac_try" in
23730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23731 *) ac_try_echo=$ac_try;;
23732esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023734 (eval "$ac_try") 2>&5
23735 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023737 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023738 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023739else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023740 echo "$as_me: program exited with status $ac_status" >&5
23741echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023742sed 's/^/| /' conftest.$ac_ext >&5
23743
23744( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023745ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023746fi
23747rm -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 +000023748fi
23749
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023750
23751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023752fi
23753
23754{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23755echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23756if test $ac_cv_broken_sem_getvalue = yes
23757then
23758
23759cat >>confdefs.h <<\_ACEOF
23760#define HAVE_BROKEN_SEM_GETVALUE 1
23761_ACEOF
23762
23763fi
23764
Mark Dickinsonbd792642009-03-18 20:06:12 +000023765# determine what size digit to use for Python's longs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023766{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23767echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023768# Check whether --enable-big-digits was given.
23769if test "${enable_big_digits+set}" = set; then
23770 enableval=$enable_big_digits; case $enable_big_digits in
23771yes)
23772 enable_big_digits=30 ;;
23773no)
23774 enable_big_digits=15 ;;
2377515|30)
23776 ;;
23777*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023778 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23779echo "$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 +000023780 { (exit 1); exit 1; }; } ;;
23781esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023782{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23783echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023784
23785cat >>confdefs.h <<_ACEOF
23786#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23787_ACEOF
23788
23789
23790else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023791 { echo "$as_me:$LINENO: result: no value specified" >&5
23792echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023793fi
23794
23795
Guido van Rossumef2255b2000-03-10 22:30:29 +000023796# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023797if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023798 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23799echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023800if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023801 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023802fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023803{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23804echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023805else
Martin v. Löwis11437992002-04-12 09:54:03 +000023806 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023807{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23808echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023809cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023810/* confdefs.h. */
23811_ACEOF
23812cat confdefs.h >>conftest.$ac_ext
23813cat >>conftest.$ac_ext <<_ACEOF
23814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023815$ac_includes_default
23816#include <wchar.h>
23817_ACEOF
23818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023819if { (ac_try="$ac_compile"
23820case "(($ac_try" in
23821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23822 *) ac_try_echo=$ac_try;;
23823esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023825 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023826 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023827 grep -v '^ *+' conftest.er1 >conftest.err
23828 rm -f conftest.er1
23829 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023831 (exit $ac_status); } && {
23832 test -z "$ac_c_werror_flag" ||
23833 test ! -s conftest.err
23834 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023835 ac_header_compiler=yes
23836else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023837 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023838sed 's/^/| /' conftest.$ac_ext >&5
23839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023840 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023842
23843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023844{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23845echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023846
23847# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023848{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23849echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023851/* confdefs.h. */
23852_ACEOF
23853cat confdefs.h >>conftest.$ac_ext
23854cat >>conftest.$ac_ext <<_ACEOF
23855/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023856#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023857_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023858if { (ac_try="$ac_cpp conftest.$ac_ext"
23859case "(($ac_try" in
23860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23861 *) ac_try_echo=$ac_try;;
23862esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023864 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023865 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023866 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023867 rm -f conftest.er1
23868 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023870 (exit $ac_status); } >/dev/null && {
23871 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23872 test ! -s conftest.err
23873 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023874 ac_header_preproc=yes
23875else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023877sed 's/^/| /' conftest.$ac_ext >&5
23878
Martin v. Löwis11437992002-04-12 09:54:03 +000023879 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023881
Martin v. Löwis11437992002-04-12 09:54:03 +000023882rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023883{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23884echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023885
23886# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023887case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23888 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023889 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23890echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23891 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23892echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023893 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023894 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023895 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023896 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23897echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23898 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23899echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23900 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23901echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23902 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23903echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23904 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23905echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23906 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23907echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023908 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023909## -------------------------------------- ##
23910## Report this to http://bugs.python.org/ ##
23911## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023912_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023913 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023914 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023915esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023916{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23917echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023918if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023919 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023920else
23921 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023922fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023923{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23924echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023925
23926fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023927if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023928
23929
23930cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023931#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023932_ACEOF
23933
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023934 wchar_h="yes"
23935
Guido van Rossumef2255b2000-03-10 22:30:29 +000023936else
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023938
23939fi
23940
Michael W. Hudson54241132001-12-07 15:38:26 +000023941
Martin v. Löwis11437992002-04-12 09:54:03 +000023942
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023943# determine wchar_t size
23944if test "$wchar_h" = yes
23945then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023946 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23947echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23948if test "${ac_cv_type_wchar_t+set}" = set; then
23949 echo $ECHO_N "(cached) $ECHO_C" >&6
23950else
23951 cat >conftest.$ac_ext <<_ACEOF
23952/* confdefs.h. */
23953_ACEOF
23954cat confdefs.h >>conftest.$ac_ext
23955cat >>conftest.$ac_ext <<_ACEOF
23956/* end confdefs.h. */
23957#include <wchar.h>
23958
23959typedef wchar_t ac__type_new_;
23960int
23961main ()
23962{
23963if ((ac__type_new_ *) 0)
23964 return 0;
23965if (sizeof (ac__type_new_))
23966 return 0;
23967 ;
23968 return 0;
23969}
23970_ACEOF
23971rm -f conftest.$ac_objext
23972if { (ac_try="$ac_compile"
23973case "(($ac_try" in
23974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23975 *) ac_try_echo=$ac_try;;
23976esac
23977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23978 (eval "$ac_compile") 2>conftest.er1
23979 ac_status=$?
23980 grep -v '^ *+' conftest.er1 >conftest.err
23981 rm -f conftest.er1
23982 cat conftest.err >&5
23983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23984 (exit $ac_status); } && {
23985 test -z "$ac_c_werror_flag" ||
23986 test ! -s conftest.err
23987 } && test -s conftest.$ac_objext; then
23988 ac_cv_type_wchar_t=yes
23989else
23990 echo "$as_me: failed program was:" >&5
23991sed 's/^/| /' conftest.$ac_ext >&5
23992
23993 ac_cv_type_wchar_t=no
23994fi
23995
23996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23997fi
23998{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23999echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24000
24001# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24004# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024005{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24006echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024007if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024008 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024009else
Martin v. Löwis11437992002-04-12 09:54:03 +000024010 if test "$cross_compiling" = yes; then
24011 # Depending upon the size, compute the lo and hi bounds.
24012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024013/* confdefs.h. */
24014_ACEOF
24015cat confdefs.h >>conftest.$ac_ext
24016cat >>conftest.$ac_ext <<_ACEOF
24017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024018#include <wchar.h>
24019
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024020 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024021int
24022main ()
24023{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024024static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024025test_array [0] = 0
24026
24027 ;
24028 return 0;
24029}
24030_ACEOF
24031rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024032if { (ac_try="$ac_compile"
24033case "(($ac_try" in
24034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24035 *) ac_try_echo=$ac_try;;
24036esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024038 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024040 grep -v '^ *+' conftest.er1 >conftest.err
24041 rm -f conftest.er1
24042 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024044 (exit $ac_status); } && {
24045 test -z "$ac_c_werror_flag" ||
24046 test ! -s conftest.err
24047 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024048 ac_lo=0 ac_mid=0
24049 while :; do
24050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024051/* confdefs.h. */
24052_ACEOF
24053cat confdefs.h >>conftest.$ac_ext
24054cat >>conftest.$ac_ext <<_ACEOF
24055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024056#include <wchar.h>
24057
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024058 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024059int
24060main ()
24061{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024063test_array [0] = 0
24064
24065 ;
24066 return 0;
24067}
24068_ACEOF
24069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070if { (ac_try="$ac_compile"
24071case "(($ac_try" in
24072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24073 *) ac_try_echo=$ac_try;;
24074esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024078 grep -v '^ *+' conftest.er1 >conftest.err
24079 rm -f conftest.er1
24080 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024082 (exit $ac_status); } && {
24083 test -z "$ac_c_werror_flag" ||
24084 test ! -s conftest.err
24085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024086 ac_hi=$ac_mid; break
24087else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024089sed 's/^/| /' conftest.$ac_ext >&5
24090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024091 ac_lo=`expr $ac_mid + 1`
24092 if test $ac_lo -le $ac_mid; then
24093 ac_lo= ac_hi=
24094 break
24095 fi
24096 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024098
24099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024100 done
24101else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024103sed 's/^/| /' conftest.$ac_ext >&5
24104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024106/* confdefs.h. */
24107_ACEOF
24108cat confdefs.h >>conftest.$ac_ext
24109cat >>conftest.$ac_ext <<_ACEOF
24110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024111#include <wchar.h>
24112
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024113 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024114int
24115main ()
24116{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024117static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024118test_array [0] = 0
24119
24120 ;
24121 return 0;
24122}
24123_ACEOF
24124rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024125if { (ac_try="$ac_compile"
24126case "(($ac_try" in
24127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24128 *) ac_try_echo=$ac_try;;
24129esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024133 grep -v '^ *+' conftest.er1 >conftest.err
24134 rm -f conftest.er1
24135 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024137 (exit $ac_status); } && {
24138 test -z "$ac_c_werror_flag" ||
24139 test ! -s conftest.err
24140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024141 ac_hi=-1 ac_mid=-1
24142 while :; do
24143 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024144/* confdefs.h. */
24145_ACEOF
24146cat confdefs.h >>conftest.$ac_ext
24147cat >>conftest.$ac_ext <<_ACEOF
24148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024149#include <wchar.h>
24150
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024151 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024152int
24153main ()
24154{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024156test_array [0] = 0
24157
24158 ;
24159 return 0;
24160}
24161_ACEOF
24162rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024163if { (ac_try="$ac_compile"
24164case "(($ac_try" in
24165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24166 *) ac_try_echo=$ac_try;;
24167esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024171 grep -v '^ *+' conftest.er1 >conftest.err
24172 rm -f conftest.er1
24173 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024175 (exit $ac_status); } && {
24176 test -z "$ac_c_werror_flag" ||
24177 test ! -s conftest.err
24178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024179 ac_lo=$ac_mid; break
24180else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024182sed 's/^/| /' conftest.$ac_ext >&5
24183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024184 ac_hi=`expr '(' $ac_mid ')' - 1`
24185 if test $ac_mid -le $ac_hi; then
24186 ac_lo= ac_hi=
24187 break
24188 fi
24189 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024191
24192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 done
24194else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024196sed 's/^/| /' conftest.$ac_ext >&5
24197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024198 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024200
24201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024203
24204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024205# Binary search between lo and hi bounds.
24206while test "x$ac_lo" != "x$ac_hi"; do
24207 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024209/* confdefs.h. */
24210_ACEOF
24211cat confdefs.h >>conftest.$ac_ext
24212cat >>conftest.$ac_ext <<_ACEOF
24213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024214#include <wchar.h>
24215
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024216 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024217int
24218main ()
24219{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024220static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024221test_array [0] = 0
24222
24223 ;
24224 return 0;
24225}
24226_ACEOF
24227rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024228if { (ac_try="$ac_compile"
24229case "(($ac_try" in
24230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24231 *) ac_try_echo=$ac_try;;
24232esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024233eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024236 grep -v '^ *+' conftest.er1 >conftest.err
24237 rm -f conftest.er1
24238 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024240 (exit $ac_status); } && {
24241 test -z "$ac_c_werror_flag" ||
24242 test ! -s conftest.err
24243 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024244 ac_hi=$ac_mid
24245else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024247sed 's/^/| /' conftest.$ac_ext >&5
24248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024251
24252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024253done
24254case $ac_lo in
24255?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024258See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024259echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024260See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024261 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024262 else
24263 ac_cv_sizeof_wchar_t=0
24264 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024265esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024266else
Martin v. Löwis11437992002-04-12 09:54:03 +000024267 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024268/* confdefs.h. */
24269_ACEOF
24270cat confdefs.h >>conftest.$ac_ext
24271cat >>conftest.$ac_ext <<_ACEOF
24272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024273#include <wchar.h>
24274
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024275 typedef wchar_t ac__type_sizeof_;
24276static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24277static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024278#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024279#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024280int
24281main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024282{
Martin v. Löwis11437992002-04-12 09:54:03 +000024283
24284 FILE *f = fopen ("conftest.val", "w");
24285 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024286 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024287 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024288 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024289 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024290 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024291 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024292 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024293 }
24294 else
24295 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024296 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024297 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024299 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024300 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024302
24303 ;
24304 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024305}
Martin v. Löwis11437992002-04-12 09:54:03 +000024306_ACEOF
24307rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024308if { (ac_try="$ac_link"
24309case "(($ac_try" in
24310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24311 *) ac_try_echo=$ac_try;;
24312esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024314 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024315 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024317 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024318 { (case "(($ac_try" in
24319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24320 *) ac_try_echo=$ac_try;;
24321esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024323 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024324 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024326 (exit $ac_status); }; }; then
24327 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024328else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024329 echo "$as_me: program exited with status $ac_status" >&5
24330echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024331sed 's/^/| /' conftest.$ac_ext >&5
24332
Martin v. Löwis11437992002-04-12 09:54:03 +000024333( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024334if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024335 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024336See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024337echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024338See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024339 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024340 else
24341 ac_cv_sizeof_wchar_t=0
24342 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024344rm -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 +000024345fi
24346rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024347fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024348{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24349echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024350
24351
24352
Martin v. Löwis11437992002-04-12 09:54:03 +000024353cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024354#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024355_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024356
Michael W. Hudson54241132001-12-07 15:38:26 +000024357
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024358fi
24359
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024360{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24361echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024362have_ucs4_tcl=no
24363cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024364/* confdefs.h. */
24365_ACEOF
24366cat confdefs.h >>conftest.$ac_ext
24367cat >>conftest.$ac_ext <<_ACEOF
24368/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024369
24370#include <tcl.h>
24371#if TCL_UTF_MAX != 6
24372# error "NOT UCS4_TCL"
24373#endif
24374int
24375main ()
24376{
24377
24378 ;
24379 return 0;
24380}
24381_ACEOF
24382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383if { (ac_try="$ac_compile"
24384case "(($ac_try" in
24385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24386 *) ac_try_echo=$ac_try;;
24387esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024391 grep -v '^ *+' conftest.er1 >conftest.err
24392 rm -f conftest.er1
24393 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024395 (exit $ac_status); } && {
24396 test -z "$ac_c_werror_flag" ||
24397 test ! -s conftest.err
24398 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024399
24400
24401cat >>confdefs.h <<\_ACEOF
24402#define HAVE_UCS4_TCL 1
24403_ACEOF
24404
24405 have_ucs4_tcl=yes
24406
24407else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024409sed 's/^/| /' conftest.$ac_ext >&5
24410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024411
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024413
24414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024415{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24416echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024417
Skip Montanaro6dead952003-09-25 14:50:04 +000024418# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024419if test "$wchar_h" = yes
24420then
24421 # check whether wchar_t is signed or not
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024422 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24423echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024424 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024425 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024426else
24427
24428 if test "$cross_compiling" = yes; then
24429 ac_cv_wchar_t_signed=yes
24430else
24431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024432/* confdefs.h. */
24433_ACEOF
24434cat confdefs.h >>conftest.$ac_ext
24435cat >>conftest.$ac_ext <<_ACEOF
24436/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024437
24438 #include <wchar.h>
24439 int main()
24440 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024441 /* Success: exit code 0 */
24442 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024443 }
24444
24445_ACEOF
24446rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024447if { (ac_try="$ac_link"
24448case "(($ac_try" in
24449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24450 *) ac_try_echo=$ac_try;;
24451esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024452eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024453 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024454 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024456 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024457 { (case "(($ac_try" in
24458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24459 *) ac_try_echo=$ac_try;;
24460esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024462 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024463 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024465 (exit $ac_status); }; }; then
24466 ac_cv_wchar_t_signed=yes
24467else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024468 echo "$as_me: program exited with status $ac_status" >&5
24469echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024470sed 's/^/| /' conftest.$ac_ext >&5
24471
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024472( exit $ac_status )
24473ac_cv_wchar_t_signed=no
24474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024475rm -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 +000024476fi
24477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024478
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024479fi
24480
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024481 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24482echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024483fi
24484
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024485{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24486echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024487
24488# Check whether --with-wide-unicode was given.
24489if test "${with_wide_unicode+set}" = set; then
24490 withval=$with_wide_unicode;
24491if test "$withval" != no
24492then unicode_size="4"
24493else unicode_size="2"
24494fi
24495
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024496else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024497
Georg Brandl52d168a2008-01-07 18:10:24 +000024498case "$have_ucs4_tcl" in
24499 yes) unicode_size="4" ;;
24500 *) unicode_size="2" ;;
24501esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024502
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024503fi
24504
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024505
24506
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024507
Georg Brandl52d168a2008-01-07 18:10:24 +000024508case "$unicode_size" in
24509 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024510#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024511_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024512 ;;
24513 *) cat >>confdefs.h <<\_ACEOF
24514#define Py_UNICODE_SIZE 2
24515_ACEOF
24516 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024517esac
24518
Michael W. Hudson54241132001-12-07 15:38:26 +000024519
Martin v. Löwis11437992002-04-12 09:54:03 +000024520
24521
Georg Brandl52d168a2008-01-07 18:10:24 +000024522# wchar_t is only usable if it maps to an unsigned type
24523if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024524 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024525then
24526 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024527
Martin v. Löwis11437992002-04-12 09:54:03 +000024528cat >>confdefs.h <<\_ACEOF
24529#define HAVE_USABLE_WCHAR_T 1
24530_ACEOF
24531
Georg Brandl52d168a2008-01-07 18:10:24 +000024532 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024533#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024534_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024535
Georg Brandl52d168a2008-01-07 18:10:24 +000024536elif test "$ac_cv_sizeof_short" = "$unicode_size"
24537then
24538 PY_UNICODE_TYPE="unsigned short"
24539 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024540#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024541_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024542
Georg Brandl52d168a2008-01-07 18:10:24 +000024543elif test "$ac_cv_sizeof_long" = "$unicode_size"
24544then
24545 PY_UNICODE_TYPE="unsigned long"
24546 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024547#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024548_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024549
Georg Brandl52d168a2008-01-07 18:10:24 +000024550else
24551 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024552fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024553{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24554echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024555
24556# check for endianness
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024557{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24558echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024559if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024560 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024561else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024562 # See if sys/param.h defines the BYTE_ORDER macro.
24563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024564/* confdefs.h. */
24565_ACEOF
24566cat confdefs.h >>conftest.$ac_ext
24567cat >>conftest.$ac_ext <<_ACEOF
24568/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024569#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024570#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024571
Martin v. Löwis11437992002-04-12 09:54:03 +000024572int
24573main ()
24574{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024575#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24576 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24577 bogus endian macros
24578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024579
24580 ;
24581 return 0;
24582}
24583_ACEOF
24584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024585if { (ac_try="$ac_compile"
24586case "(($ac_try" in
24587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24588 *) ac_try_echo=$ac_try;;
24589esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024591 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024593 grep -v '^ *+' conftest.er1 >conftest.err
24594 rm -f conftest.er1
24595 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024597 (exit $ac_status); } && {
24598 test -z "$ac_c_werror_flag" ||
24599 test ! -s conftest.err
24600 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024601 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024603/* confdefs.h. */
24604_ACEOF
24605cat confdefs.h >>conftest.$ac_ext
24606cat >>conftest.$ac_ext <<_ACEOF
24607/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024608#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024609#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024610
Martin v. Löwis11437992002-04-12 09:54:03 +000024611int
24612main ()
24613{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024614#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024615 not big endian
24616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024617
24618 ;
24619 return 0;
24620}
24621_ACEOF
24622rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024623if { (ac_try="$ac_compile"
24624case "(($ac_try" in
24625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24626 *) ac_try_echo=$ac_try;;
24627esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024631 grep -v '^ *+' conftest.er1 >conftest.err
24632 rm -f conftest.er1
24633 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024635 (exit $ac_status); } && {
24636 test -z "$ac_c_werror_flag" ||
24637 test ! -s conftest.err
24638 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024639 ac_cv_c_bigendian=yes
24640else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024642sed 's/^/| /' conftest.$ac_ext >&5
24643
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024644 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024646
24647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024648else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024650sed 's/^/| /' conftest.$ac_ext >&5
24651
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024652 # It does not; compile a test program.
24653if test "$cross_compiling" = yes; then
24654 # try to guess the endianness by grepping values into an object file
24655 ac_cv_c_bigendian=unknown
24656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024657/* confdefs.h. */
24658_ACEOF
24659cat confdefs.h >>conftest.$ac_ext
24660cat >>conftest.$ac_ext <<_ACEOF
24661/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024662short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24663short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24664void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24665short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24666short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24667void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024668int
24669main ()
24670{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024671 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024672 ;
24673 return 0;
24674}
24675_ACEOF
24676rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024677if { (ac_try="$ac_compile"
24678case "(($ac_try" in
24679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24680 *) ac_try_echo=$ac_try;;
24681esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024685 grep -v '^ *+' conftest.er1 >conftest.err
24686 rm -f conftest.er1
24687 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024689 (exit $ac_status); } && {
24690 test -z "$ac_c_werror_flag" ||
24691 test ! -s conftest.err
24692 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024693 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024694 ac_cv_c_bigendian=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024695fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024696if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24697 if test "$ac_cv_c_bigendian" = unknown; then
24698 ac_cv_c_bigendian=no
24699 else
24700 # finding both strings is unlikely to happen, but who knows?
24701 ac_cv_c_bigendian=unknown
24702 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024703fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024704else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024706sed 's/^/| /' conftest.$ac_ext >&5
24707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024708
Martin v. Löwis11437992002-04-12 09:54:03 +000024709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024710
24711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024712else
24713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024714/* confdefs.h. */
24715_ACEOF
24716cat confdefs.h >>conftest.$ac_ext
24717cat >>conftest.$ac_ext <<_ACEOF
24718/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024720int
24721main ()
24722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024723
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024724 /* Are we little or big endian? From Harbison&Steele. */
24725 union
24726 {
24727 long int l;
24728 char c[sizeof (long int)];
24729 } u;
24730 u.l = 1;
24731 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024732
24733 ;
24734 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024735}
Martin v. Löwis11437992002-04-12 09:54:03 +000024736_ACEOF
24737rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024738if { (ac_try="$ac_link"
24739case "(($ac_try" in
24740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24741 *) ac_try_echo=$ac_try;;
24742esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024745 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024748 { (case "(($ac_try" in
24749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24750 *) ac_try_echo=$ac_try;;
24751esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024754 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024756 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024757 ac_cv_c_bigendian=no
24758else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024759 echo "$as_me: program exited with status $ac_status" >&5
24760echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024761sed 's/^/| /' conftest.$ac_ext >&5
24762
Martin v. Löwis11437992002-04-12 09:54:03 +000024763( exit $ac_status )
24764ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024766rm -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 +000024767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024768
24769
Martin v. Löwis11437992002-04-12 09:54:03 +000024770fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024771
24772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24773fi
24774{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24775echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24776case $ac_cv_c_bigendian in
24777 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024778
24779cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024780#define WORDS_BIGENDIAN 1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024781_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024782 ;;
24783 no)
24784 ;;
24785 *)
24786 { { echo "$as_me:$LINENO: error: unknown endianness
24787presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24788echo "$as_me: error: unknown endianness
24789presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024790 { (exit 1); exit 1; }; } ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024791esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024792
Michael W. Hudson54241132001-12-07 15:38:26 +000024793
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024794# Check whether right shifting a negative integer extends the sign bit
24795# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024796{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24797echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024798if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024799 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024800else
Martin v. Löwis11437992002-04-12 09:54:03 +000024801
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024802if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024803 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024804else
Martin v. Löwis11437992002-04-12 09:54:03 +000024805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024806/* confdefs.h. */
24807_ACEOF
24808cat confdefs.h >>conftest.$ac_ext
24809cat >>conftest.$ac_ext <<_ACEOF
24810/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024811
24812int main()
24813{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024814 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024815}
24816
Martin v. Löwis11437992002-04-12 09:54:03 +000024817_ACEOF
24818rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024819if { (ac_try="$ac_link"
24820case "(($ac_try" in
24821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24822 *) ac_try_echo=$ac_try;;
24823esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024825 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024826 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024828 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829 { (case "(($ac_try" in
24830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24831 *) ac_try_echo=$ac_try;;
24832esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024834 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024835 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024837 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024838 ac_cv_rshift_extends_sign=yes
24839else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024840 echo "$as_me: program exited with status $ac_status" >&5
24841echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024842sed 's/^/| /' conftest.$ac_ext >&5
24843
Martin v. Löwis11437992002-04-12 09:54:03 +000024844( exit $ac_status )
24845ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024847rm -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 +000024848fi
24849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024850
24851fi
24852
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024853{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24854echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024855if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024856then
Martin v. Löwis11437992002-04-12 09:54:03 +000024857
24858cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024859#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024860_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024861
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024862fi
24863
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024864# check for getc_unlocked and related locking functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024865{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24866echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024867if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024868 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024869else
Martin v. Löwis11437992002-04-12 09:54:03 +000024870
24871cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024872/* confdefs.h. */
24873_ACEOF
24874cat confdefs.h >>conftest.$ac_ext
24875cat >>conftest.$ac_ext <<_ACEOF
24876/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024877#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024878int
24879main ()
24880{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024881
24882 FILE *f = fopen("/dev/null", "r");
24883 flockfile(f);
24884 getc_unlocked(f);
24885 funlockfile(f);
24886
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 ;
24888 return 0;
24889}
24890_ACEOF
24891rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024892if { (ac_try="$ac_link"
24893case "(($ac_try" in
24894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24895 *) ac_try_echo=$ac_try;;
24896esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024898 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024900 grep -v '^ *+' conftest.er1 >conftest.err
24901 rm -f conftest.er1
24902 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024904 (exit $ac_status); } && {
24905 test -z "$ac_c_werror_flag" ||
24906 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024907 } && test -s conftest$ac_exeext &&
24908 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024909 ac_cv_have_getc_unlocked=yes
24910else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024912sed 's/^/| /' conftest.$ac_ext >&5
24913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024914 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916
24917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024918 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024919fi
24920
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024921{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24922echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024923if test "$ac_cv_have_getc_unlocked" = yes
24924then
Martin v. Löwis11437992002-04-12 09:54:03 +000024925
24926cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024927#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024928_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024929
24930fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024931
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024932# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024933# save the value of LIBS so we don't actually link Python with readline
24934LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024935
Gregory P. Smith18820942008-09-07 06:24:49 +000024936# On some systems we need to link readline to a termcap compatible
24937# library. NOTE: Keep the precedence of listed libraries synchronised
24938# with setup.py.
24939py_cv_lib_readline=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024940{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24941echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024942for py_libtermcap in "" ncursesw ncurses curses termcap; do
24943 if test -z "$py_libtermcap"; then
24944 READLINE_LIBS="-lreadline"
24945 else
24946 READLINE_LIBS="-lreadline -l$py_libtermcap"
24947 fi
24948 LIBS="$READLINE_LIBS $LIBS_no_readline"
24949 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024950/* confdefs.h. */
24951_ACEOF
24952cat confdefs.h >>conftest.$ac_ext
24953cat >>conftest.$ac_ext <<_ACEOF
24954/* end confdefs.h. */
24955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024956/* Override any GCC internal prototype to avoid an error.
24957 Use char because int might match the return type of a GCC
24958 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024959#ifdef __cplusplus
24960extern "C"
24961#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024962char readline ();
24963int
24964main ()
24965{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024966return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024967 ;
24968 return 0;
24969}
24970_ACEOF
24971rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972if { (ac_try="$ac_link"
24973case "(($ac_try" in
24974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24975 *) ac_try_echo=$ac_try;;
24976esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024979 ac_status=$?
24980 grep -v '^ *+' conftest.er1 >conftest.err
24981 rm -f conftest.er1
24982 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024984 (exit $ac_status); } && {
24985 test -z "$ac_c_werror_flag" ||
24986 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024987 } && test -s conftest$ac_exeext &&
24988 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024989 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024990else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024991 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024992sed 's/^/| /' conftest.$ac_ext >&5
24993
Gregory P. Smith18820942008-09-07 06:24:49 +000024994
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024996
24997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024998 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024999 if test $py_cv_lib_readline = yes; then
25000 break
25001 fi
25002done
25003# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25004#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025005if test $py_cv_lib_readline = no; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025006 { echo "$as_me:$LINENO: result: none" >&5
25007echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025008else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025009 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25010echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025011
25012cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025013#define HAVE_LIBREADLINE 1
25014_ACEOF
25015
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025016fi
25017
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025018# check for readline 2.1
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025019{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25020echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025021if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025022 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025023else
25024 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025025LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025026cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025027/* confdefs.h. */
25028_ACEOF
25029cat confdefs.h >>conftest.$ac_ext
25030cat >>conftest.$ac_ext <<_ACEOF
25031/* end confdefs.h. */
25032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025033/* Override any GCC internal prototype to avoid an error.
25034 Use char because int might match the return type of a GCC
25035 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025036#ifdef __cplusplus
25037extern "C"
25038#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025039char rl_callback_handler_install ();
25040int
25041main ()
25042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025043return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025044 ;
25045 return 0;
25046}
25047_ACEOF
25048rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025049if { (ac_try="$ac_link"
25050case "(($ac_try" in
25051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25052 *) ac_try_echo=$ac_try;;
25053esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025055 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025057 grep -v '^ *+' conftest.er1 >conftest.err
25058 rm -f conftest.er1
25059 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025061 (exit $ac_status); } && {
25062 test -z "$ac_c_werror_flag" ||
25063 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025064 } && test -s conftest$ac_exeext &&
25065 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025066 ac_cv_lib_readline_rl_callback_handler_install=yes
25067else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025068 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025069sed 's/^/| /' conftest.$ac_ext >&5
25070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025071 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025073
25074rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025075 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025076LIBS=$ac_check_lib_save_LIBS
25077fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025078{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25079echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25080if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025081
25082cat >>confdefs.h <<\_ACEOF
25083#define HAVE_RL_CALLBACK 1
25084_ACEOF
25085
25086fi
25087
25088
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025089# check for readline 2.2
25090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025091/* confdefs.h. */
25092_ACEOF
25093cat confdefs.h >>conftest.$ac_ext
25094cat >>conftest.$ac_ext <<_ACEOF
25095/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025096#include <readline/readline.h>
25097_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025098if { (ac_try="$ac_cpp conftest.$ac_ext"
25099case "(($ac_try" in
25100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25101 *) ac_try_echo=$ac_try;;
25102esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025104 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025105 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025106 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025107 rm -f conftest.er1
25108 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025110 (exit $ac_status); } >/dev/null && {
25111 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25112 test ! -s conftest.err
25113 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025114 have_readline=yes
25115else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025116 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025117sed 's/^/| /' conftest.$ac_ext >&5
25118
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025119 have_readline=no
25120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025121
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025122rm -f conftest.err conftest.$ac_ext
25123if test $have_readline = yes
25124then
25125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025126/* confdefs.h. */
25127_ACEOF
25128cat confdefs.h >>conftest.$ac_ext
25129cat >>conftest.$ac_ext <<_ACEOF
25130/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025131#include <readline/readline.h>
25132
25133_ACEOF
25134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025135 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025136
25137cat >>confdefs.h <<\_ACEOF
25138#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25139_ACEOF
25140
25141fi
25142rm -f conftest*
25143
25144fi
25145
Martin v. Löwis0daad592001-09-30 21:09:59 +000025146# check for readline 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025147{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25148echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025149if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025151else
Martin v. Löwis11437992002-04-12 09:54:03 +000025152 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025153LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025155/* confdefs.h. */
25156_ACEOF
25157cat confdefs.h >>conftest.$ac_ext
25158cat >>conftest.$ac_ext <<_ACEOF
25159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025161/* Override any GCC internal prototype to avoid an error.
25162 Use char because int might match the return type of a GCC
25163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025164#ifdef __cplusplus
25165extern "C"
25166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025167char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025168int
25169main ()
25170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025172 ;
25173 return 0;
25174}
25175_ACEOF
25176rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025177if { (ac_try="$ac_link"
25178case "(($ac_try" in
25179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25180 *) ac_try_echo=$ac_try;;
25181esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025185 grep -v '^ *+' conftest.er1 >conftest.err
25186 rm -f conftest.er1
25187 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025189 (exit $ac_status); } && {
25190 test -z "$ac_c_werror_flag" ||
25191 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025192 } && test -s conftest$ac_exeext &&
25193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025194 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025195else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025197sed 's/^/| /' conftest.$ac_ext >&5
25198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025199 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025201
25202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025204LIBS=$ac_check_lib_save_LIBS
25205fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025206{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25207echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25208if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025209
Martin v. Löwis11437992002-04-12 09:54:03 +000025210cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025211#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025212_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025213
Martin v. Löwis0daad592001-09-30 21:09:59 +000025214fi
25215
Michael W. Hudson54241132001-12-07 15:38:26 +000025216
Thomas Wouters89d996e2007-09-08 17:39:28 +000025217# also in 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025218{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25219echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025220if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025221 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025222else
25223 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025224LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025225cat >conftest.$ac_ext <<_ACEOF
25226/* confdefs.h. */
25227_ACEOF
25228cat confdefs.h >>conftest.$ac_ext
25229cat >>conftest.$ac_ext <<_ACEOF
25230/* end confdefs.h. */
25231
25232/* Override any GCC internal prototype to avoid an error.
25233 Use char because int might match the return type of a GCC
25234 builtin and then its argument prototype would still apply. */
25235#ifdef __cplusplus
25236extern "C"
25237#endif
25238char rl_completion_display_matches_hook ();
25239int
25240main ()
25241{
25242return rl_completion_display_matches_hook ();
25243 ;
25244 return 0;
25245}
25246_ACEOF
25247rm -f conftest.$ac_objext conftest$ac_exeext
25248if { (ac_try="$ac_link"
25249case "(($ac_try" in
25250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25251 *) ac_try_echo=$ac_try;;
25252esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025254 (eval "$ac_link") 2>conftest.er1
25255 ac_status=$?
25256 grep -v '^ *+' conftest.er1 >conftest.err
25257 rm -f conftest.er1
25258 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025260 (exit $ac_status); } && {
25261 test -z "$ac_c_werror_flag" ||
25262 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025263 } && test -s conftest$ac_exeext &&
25264 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025265 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25266else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025267 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025268sed 's/^/| /' conftest.$ac_ext >&5
25269
25270 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25271fi
25272
25273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25274 conftest$ac_exeext conftest.$ac_ext
25275LIBS=$ac_check_lib_save_LIBS
25276fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025277{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25278echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25279if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025280
25281cat >>confdefs.h <<\_ACEOF
25282#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25283_ACEOF
25284
25285fi
25286
25287
Martin v. Löwis0daad592001-09-30 21:09:59 +000025288# check for readline 4.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025289{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25290echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025291if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025292 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025293else
Martin v. Löwis11437992002-04-12 09:54:03 +000025294 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025295LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025297/* confdefs.h. */
25298_ACEOF
25299cat confdefs.h >>conftest.$ac_ext
25300cat >>conftest.$ac_ext <<_ACEOF
25301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025303/* Override any GCC internal prototype to avoid an error.
25304 Use char because int might match the return type of a GCC
25305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025306#ifdef __cplusplus
25307extern "C"
25308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025309char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025310int
25311main ()
25312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025313return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025314 ;
25315 return 0;
25316}
25317_ACEOF
25318rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025319if { (ac_try="$ac_link"
25320case "(($ac_try" in
25321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25322 *) ac_try_echo=$ac_try;;
25323esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025325 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025327 grep -v '^ *+' conftest.er1 >conftest.err
25328 rm -f conftest.er1
25329 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025331 (exit $ac_status); } && {
25332 test -z "$ac_c_werror_flag" ||
25333 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025334 } && test -s conftest$ac_exeext &&
25335 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025336 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025337else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025338 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025339sed 's/^/| /' conftest.$ac_ext >&5
25340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025341 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025343
25344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025346LIBS=$ac_check_lib_save_LIBS
25347fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025348{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25349echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25350if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025351
Martin v. Löwis11437992002-04-12 09:54:03 +000025352cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025353#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025354_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025355
Guido van Rossum353ae582001-07-10 16:45:32 +000025356fi
25357
Jack Jansendd19cf82001-12-06 22:36:17 +000025358
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025359# also in readline 4.2
25360cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025361/* confdefs.h. */
25362_ACEOF
25363cat confdefs.h >>conftest.$ac_ext
25364cat >>conftest.$ac_ext <<_ACEOF
25365/* end confdefs.h. */
25366#include <readline/readline.h>
25367_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025368if { (ac_try="$ac_cpp conftest.$ac_ext"
25369case "(($ac_try" in
25370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25371 *) ac_try_echo=$ac_try;;
25372esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025374 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025375 ac_status=$?
25376 grep -v '^ *+' conftest.er1 >conftest.err
25377 rm -f conftest.er1
25378 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025380 (exit $ac_status); } >/dev/null && {
25381 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25382 test ! -s conftest.err
25383 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025384 have_readline=yes
25385else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025386 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025387sed 's/^/| /' conftest.$ac_ext >&5
25388
25389 have_readline=no
25390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025391
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025392rm -f conftest.err conftest.$ac_ext
25393if test $have_readline = yes
25394then
25395 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025396/* confdefs.h. */
25397_ACEOF
25398cat confdefs.h >>conftest.$ac_ext
25399cat >>conftest.$ac_ext <<_ACEOF
25400/* end confdefs.h. */
25401#include <readline/readline.h>
25402
25403_ACEOF
25404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25405 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25406
25407cat >>confdefs.h <<\_ACEOF
25408#define HAVE_RL_CATCH_SIGNAL 1
25409_ACEOF
25410
25411fi
25412rm -f conftest*
25413
25414fi
25415
Martin v. Löwis82bca632006-02-10 20:49:30 +000025416# End of readline checks: restore LIBS
25417LIBS=$LIBS_no_readline
25418
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025419{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25420echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025421if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025422 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025423else
Martin v. Löwis11437992002-04-12 09:54:03 +000025424
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025425if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025426 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025427else
Martin v. Löwis11437992002-04-12 09:54:03 +000025428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025429/* confdefs.h. */
25430_ACEOF
25431cat confdefs.h >>conftest.$ac_ext
25432cat >>conftest.$ac_ext <<_ACEOF
25433/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025434
25435int main()
25436{
25437 int val1 = nice(1);
25438 if (val1 != -1 && val1 == nice(2))
25439 exit(0);
25440 exit(1);
25441}
25442
Martin v. Löwis11437992002-04-12 09:54:03 +000025443_ACEOF
25444rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025445if { (ac_try="$ac_link"
25446case "(($ac_try" in
25447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25448 *) ac_try_echo=$ac_try;;
25449esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025452 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025455 { (case "(($ac_try" in
25456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25457 *) ac_try_echo=$ac_try;;
25458esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025461 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025463 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025464 ac_cv_broken_nice=yes
25465else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025466 echo "$as_me: program exited with status $ac_status" >&5
25467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025468sed 's/^/| /' conftest.$ac_ext >&5
25469
Martin v. Löwis11437992002-04-12 09:54:03 +000025470( exit $ac_status )
25471ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025473rm -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 +000025474fi
25475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025476
25477fi
25478
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025479{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25480echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025481if test "$ac_cv_broken_nice" = yes
25482then
Martin v. Löwis11437992002-04-12 09:54:03 +000025483
25484cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025485#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025486_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025487
25488fi
25489
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025490{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25491echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025492if test "${ac_cv_broken_poll+set}" = set; then
25493 echo $ECHO_N "(cached) $ECHO_C" >&6
25494else
25495 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025496 ac_cv_broken_poll=no
25497else
25498 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025499/* confdefs.h. */
25500_ACEOF
25501cat confdefs.h >>conftest.$ac_ext
25502cat >>conftest.$ac_ext <<_ACEOF
25503/* end confdefs.h. */
25504
25505#include <poll.h>
25506
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025507int main()
25508{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025509 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025510 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025511
25512 close (42);
25513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025514 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025515 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025516 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025517 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025518 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025519 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025520 return 1;
25521}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025522
25523_ACEOF
25524rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025525if { (ac_try="$ac_link"
25526case "(($ac_try" in
25527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25528 *) ac_try_echo=$ac_try;;
25529esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025531 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025532 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025535 { (case "(($ac_try" in
25536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25537 *) ac_try_echo=$ac_try;;
25538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025540 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025541 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025543 (exit $ac_status); }; }; then
25544 ac_cv_broken_poll=yes
25545else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025546 echo "$as_me: program exited with status $ac_status" >&5
25547echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025548sed 's/^/| /' conftest.$ac_ext >&5
25549
25550( exit $ac_status )
25551ac_cv_broken_poll=no
25552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025553rm -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 +000025554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025555
25556
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025557fi
25558
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025559{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25560echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025561if test "$ac_cv_broken_poll" = yes
25562then
25563
25564cat >>confdefs.h <<\_ACEOF
25565#define HAVE_BROKEN_POLL 1
25566_ACEOF
25567
25568fi
25569
Brett Cannon43802422005-02-10 20:48:03 +000025570# 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 +000025571# (which is not required by ISO C or UNIX spec) and/or if we support
25572# tzname[]
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025573{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25574echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025575if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025576 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025577else
25578 cat >conftest.$ac_ext <<_ACEOF
25579/* confdefs.h. */
25580_ACEOF
25581cat confdefs.h >>conftest.$ac_ext
25582cat >>conftest.$ac_ext <<_ACEOF
25583/* end confdefs.h. */
25584#include <sys/types.h>
25585#include <$ac_cv_struct_tm>
25586
25587
25588int
25589main ()
25590{
25591static struct tm ac_aggr;
25592if (ac_aggr.tm_zone)
25593return 0;
25594 ;
25595 return 0;
25596}
25597_ACEOF
25598rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025599if { (ac_try="$ac_compile"
25600case "(($ac_try" in
25601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25602 *) ac_try_echo=$ac_try;;
25603esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025605 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025606 ac_status=$?
25607 grep -v '^ *+' conftest.er1 >conftest.err
25608 rm -f conftest.er1
25609 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025611 (exit $ac_status); } && {
25612 test -z "$ac_c_werror_flag" ||
25613 test ! -s conftest.err
25614 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025615 ac_cv_member_struct_tm_tm_zone=yes
25616else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025617 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025618sed 's/^/| /' conftest.$ac_ext >&5
25619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025620 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025621/* confdefs.h. */
25622_ACEOF
25623cat confdefs.h >>conftest.$ac_ext
25624cat >>conftest.$ac_ext <<_ACEOF
25625/* end confdefs.h. */
25626#include <sys/types.h>
25627#include <$ac_cv_struct_tm>
25628
25629
25630int
25631main ()
25632{
25633static struct tm ac_aggr;
25634if (sizeof ac_aggr.tm_zone)
25635return 0;
25636 ;
25637 return 0;
25638}
25639_ACEOF
25640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025641if { (ac_try="$ac_compile"
25642case "(($ac_try" in
25643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25644 *) ac_try_echo=$ac_try;;
25645esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025648 ac_status=$?
25649 grep -v '^ *+' conftest.er1 >conftest.err
25650 rm -f conftest.er1
25651 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653 (exit $ac_status); } && {
25654 test -z "$ac_c_werror_flag" ||
25655 test ! -s conftest.err
25656 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025657 ac_cv_member_struct_tm_tm_zone=yes
25658else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025659 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025660sed 's/^/| /' conftest.$ac_ext >&5
25661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025662 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025664
25665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025667
25668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025669fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025670{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25671echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25672if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025673
25674cat >>confdefs.h <<_ACEOF
25675#define HAVE_STRUCT_TM_TM_ZONE 1
25676_ACEOF
25677
25678
25679fi
25680
25681if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25682
25683cat >>confdefs.h <<\_ACEOF
25684#define HAVE_TM_ZONE 1
25685_ACEOF
25686
25687else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025688 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25689echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025690if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025691 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025692else
25693 cat >conftest.$ac_ext <<_ACEOF
25694/* confdefs.h. */
25695_ACEOF
25696cat confdefs.h >>conftest.$ac_ext
25697cat >>conftest.$ac_ext <<_ACEOF
25698/* end confdefs.h. */
25699#include <time.h>
25700
25701int
25702main ()
25703{
25704#ifndef tzname
25705 (void) tzname;
25706#endif
25707
25708 ;
25709 return 0;
25710}
25711_ACEOF
25712rm -f conftest.$ac_objext
25713if { (ac_try="$ac_compile"
25714case "(($ac_try" in
25715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25716 *) ac_try_echo=$ac_try;;
25717esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025719 (eval "$ac_compile") 2>conftest.er1
25720 ac_status=$?
25721 grep -v '^ *+' conftest.er1 >conftest.err
25722 rm -f conftest.er1
25723 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025725 (exit $ac_status); } && {
25726 test -z "$ac_c_werror_flag" ||
25727 test ! -s conftest.err
25728 } && test -s conftest.$ac_objext; then
25729 ac_cv_have_decl_tzname=yes
25730else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025731 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025732sed 's/^/| /' conftest.$ac_ext >&5
25733
25734 ac_cv_have_decl_tzname=no
25735fi
25736
25737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25738fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025739{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25740echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25741if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025742
25743cat >>confdefs.h <<_ACEOF
25744#define HAVE_DECL_TZNAME 1
25745_ACEOF
25746
25747
25748else
25749 cat >>confdefs.h <<_ACEOF
25750#define HAVE_DECL_TZNAME 0
25751_ACEOF
25752
25753
25754fi
25755
25756
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025757 { echo "$as_me:$LINENO: checking for tzname" >&5
25758echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025759if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025760 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025761else
25762 cat >conftest.$ac_ext <<_ACEOF
25763/* confdefs.h. */
25764_ACEOF
25765cat confdefs.h >>conftest.$ac_ext
25766cat >>conftest.$ac_ext <<_ACEOF
25767/* end confdefs.h. */
25768#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025769#if !HAVE_DECL_TZNAME
25770extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025771#endif
25772
25773int
25774main ()
25775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025776return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025777 ;
25778 return 0;
25779}
25780_ACEOF
25781rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025782if { (ac_try="$ac_link"
25783case "(($ac_try" in
25784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25785 *) ac_try_echo=$ac_try;;
25786esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025788 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025789 ac_status=$?
25790 grep -v '^ *+' conftest.er1 >conftest.err
25791 rm -f conftest.er1
25792 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025794 (exit $ac_status); } && {
25795 test -z "$ac_c_werror_flag" ||
25796 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025797 } && test -s conftest$ac_exeext &&
25798 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025799 ac_cv_var_tzname=yes
25800else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025801 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025802sed 's/^/| /' conftest.$ac_ext >&5
25803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025804 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025806
25807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025808 conftest$ac_exeext conftest.$ac_ext
25809fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025810{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25811echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025812 if test $ac_cv_var_tzname = yes; then
25813
25814cat >>confdefs.h <<\_ACEOF
25815#define HAVE_TZNAME 1
25816_ACEOF
25817
25818 fi
25819fi
25820
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025821
Martin v. Löwis1d459062005-03-14 21:23:33 +000025822# check tzset(3) exists and works like we expect it to
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025823{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25824echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025825if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025826 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025827else
25828
25829if test "$cross_compiling" = yes; then
25830 ac_cv_working_tzset=no
25831else
25832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025833/* confdefs.h. */
25834_ACEOF
25835cat confdefs.h >>conftest.$ac_ext
25836cat >>conftest.$ac_ext <<_ACEOF
25837/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025838
25839#include <stdlib.h>
25840#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025841#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025842
25843#if HAVE_TZNAME
25844extern char *tzname[];
25845#endif
25846
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025847int main()
25848{
Brett Cannon18367812003-09-19 00:59:16 +000025849 /* Note that we need to ensure that not only does tzset(3)
25850 do 'something' with localtime, but it works as documented
25851 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025852 This includes making sure that tzname is set properly if
25853 tm->tm_zone does not exist since it is the alternative way
25854 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025855
25856 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025857 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025858 */
25859
Martin v. Löwis1d459062005-03-14 21:23:33 +000025860 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025861 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25862
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025863 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025864 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025865 if (localtime(&groundhogday)->tm_hour != 0)
25866 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025867#if HAVE_TZNAME
25868 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25869 if (strcmp(tzname[0], "UTC") ||
25870 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25871 exit(1);
25872#endif
Brett Cannon18367812003-09-19 00:59:16 +000025873
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025874 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025875 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025876 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025877 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025878#if HAVE_TZNAME
25879 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25880 exit(1);
25881#endif
Brett Cannon18367812003-09-19 00:59:16 +000025882
25883 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25884 tzset();
25885 if (localtime(&groundhogday)->tm_hour != 11)
25886 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025887#if HAVE_TZNAME
25888 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25889 exit(1);
25890#endif
25891
25892#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025893 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25894 exit(1);
25895 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25896 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025897#endif
Brett Cannon18367812003-09-19 00:59:16 +000025898
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025899 exit(0);
25900}
25901
25902_ACEOF
25903rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904if { (ac_try="$ac_link"
25905case "(($ac_try" in
25906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25907 *) ac_try_echo=$ac_try;;
25908esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025910 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025911 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025913 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025914 { (case "(($ac_try" in
25915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25916 *) ac_try_echo=$ac_try;;
25917esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025919 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025920 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025922 (exit $ac_status); }; }; then
25923 ac_cv_working_tzset=yes
25924else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025925 echo "$as_me: program exited with status $ac_status" >&5
25926echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025927sed 's/^/| /' conftest.$ac_ext >&5
25928
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025929( exit $ac_status )
25930ac_cv_working_tzset=no
25931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025932rm -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 +000025933fi
25934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935
25936fi
25937
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025938{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25939echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025940if test "$ac_cv_working_tzset" = yes
25941then
25942
25943cat >>confdefs.h <<\_ACEOF
25944#define HAVE_WORKING_TZSET 1
25945_ACEOF
25946
25947fi
25948
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025949# Look for subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025950{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25951echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025952if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025953 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025954else
25955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025956/* confdefs.h. */
25957_ACEOF
25958cat confdefs.h >>conftest.$ac_ext
25959cat >>conftest.$ac_ext <<_ACEOF
25960/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025961#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025962int
25963main ()
25964{
25965
25966struct stat st;
25967st.st_mtim.tv_nsec = 1;
25968
25969 ;
25970 return 0;
25971}
25972_ACEOF
25973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025974if { (ac_try="$ac_compile"
25975case "(($ac_try" in
25976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25977 *) ac_try_echo=$ac_try;;
25978esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025982 grep -v '^ *+' conftest.er1 >conftest.err
25983 rm -f conftest.er1
25984 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +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
25989 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025990 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025991else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025993sed 's/^/| /' conftest.$ac_ext >&5
25994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025996fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25999fi
26000
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026001{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26002echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026003if test "$ac_cv_stat_tv_nsec" = yes
26004then
26005
26006cat >>confdefs.h <<\_ACEOF
26007#define HAVE_STAT_TV_NSEC 1
26008_ACEOF
26009
26010fi
26011
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026012# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026013{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26014echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026015if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026016 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026017else
26018 cat >conftest.$ac_ext <<_ACEOF
26019/* confdefs.h. */
26020_ACEOF
26021cat confdefs.h >>conftest.$ac_ext
26022cat >>conftest.$ac_ext <<_ACEOF
26023/* end confdefs.h. */
26024#include <sys/stat.h>
26025int
26026main ()
26027{
26028
26029struct stat st;
26030st.st_mtimespec.tv_nsec = 1;
26031
26032 ;
26033 return 0;
26034}
26035_ACEOF
26036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026037if { (ac_try="$ac_compile"
26038case "(($ac_try" in
26039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26040 *) ac_try_echo=$ac_try;;
26041esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026044 ac_status=$?
26045 grep -v '^ *+' conftest.er1 >conftest.err
26046 rm -f conftest.er1
26047 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026049 (exit $ac_status); } && {
26050 test -z "$ac_c_werror_flag" ||
26051 test ! -s conftest.err
26052 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026053 ac_cv_stat_tv_nsec2=yes
26054else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026055 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026056sed 's/^/| /' conftest.$ac_ext >&5
26057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026058 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26062fi
26063
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026064{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26065echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026066if test "$ac_cv_stat_tv_nsec2" = yes
26067then
26068
26069cat >>confdefs.h <<\_ACEOF
26070#define HAVE_STAT_TV_NSEC2 1
26071_ACEOF
26072
26073fi
26074
Jack Jansen666b1e72001-10-31 12:11:48 +000026075# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026076{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26077echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026078if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026079 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026080else
Martin v. Löwis11437992002-04-12 09:54:03 +000026081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026082/* confdefs.h. */
26083_ACEOF
26084cat confdefs.h >>conftest.$ac_ext
26085cat >>conftest.$ac_ext <<_ACEOF
26086/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026087#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026088int
26089main ()
26090{
Jack Jansen666b1e72001-10-31 12:11:48 +000026091
26092 int rtn;
26093 rtn = mvwdelch(0,0,0);
26094
Martin v. Löwis11437992002-04-12 09:54:03 +000026095 ;
26096 return 0;
26097}
26098_ACEOF
26099rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026100if { (ac_try="$ac_compile"
26101case "(($ac_try" in
26102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26103 *) ac_try_echo=$ac_try;;
26104esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026108 grep -v '^ *+' conftest.er1 >conftest.err
26109 rm -f conftest.er1
26110 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026112 (exit $ac_status); } && {
26113 test -z "$ac_c_werror_flag" ||
26114 test ! -s conftest.err
26115 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026116 ac_cv_mvwdelch_is_expression=yes
26117else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026119sed 's/^/| /' conftest.$ac_ext >&5
26120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026121 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026122fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026123
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26125fi
26126
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026127{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26128echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026129
26130if test "$ac_cv_mvwdelch_is_expression" = yes
26131then
Martin v. Löwis11437992002-04-12 09:54:03 +000026132
26133cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026134#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026135_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026136
26137fi
26138
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026139{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26140echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026141if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026142 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026143else
Martin v. Löwis11437992002-04-12 09:54:03 +000026144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026145/* confdefs.h. */
26146_ACEOF
26147cat confdefs.h >>conftest.$ac_ext
26148cat >>conftest.$ac_ext <<_ACEOF
26149/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026150#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026151int
26152main ()
26153{
Jack Jansen666b1e72001-10-31 12:11:48 +000026154
26155 WINDOW *w;
26156 w->_flags = 0;
26157
Martin v. Löwis11437992002-04-12 09:54:03 +000026158 ;
26159 return 0;
26160}
26161_ACEOF
26162rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026163if { (ac_try="$ac_compile"
26164case "(($ac_try" in
26165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26166 *) ac_try_echo=$ac_try;;
26167esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026171 grep -v '^ *+' conftest.er1 >conftest.err
26172 rm -f conftest.er1
26173 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026175 (exit $ac_status); } && {
26176 test -z "$ac_c_werror_flag" ||
26177 test ! -s conftest.err
26178 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026179 ac_cv_window_has_flags=yes
26180else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026182sed 's/^/| /' conftest.$ac_ext >&5
26183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026184 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026186
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26188fi
26189
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026190{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26191echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026192
Jack Jansen666b1e72001-10-31 12:11:48 +000026193
26194if test "$ac_cv_window_has_flags" = yes
26195then
Martin v. Löwis11437992002-04-12 09:54:03 +000026196
26197cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026198#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026199_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026200
26201fi
26202
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026203{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26204echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026205cat >conftest.$ac_ext <<_ACEOF
26206/* confdefs.h. */
26207_ACEOF
26208cat confdefs.h >>conftest.$ac_ext
26209cat >>conftest.$ac_ext <<_ACEOF
26210/* end confdefs.h. */
26211#include <curses.h>
26212int
26213main ()
26214{
26215void *x=is_term_resized
26216 ;
26217 return 0;
26218}
26219_ACEOF
26220rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026221if { (ac_try="$ac_compile"
26222case "(($ac_try" in
26223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26224 *) ac_try_echo=$ac_try;;
26225esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026227 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026228 ac_status=$?
26229 grep -v '^ *+' conftest.er1 >conftest.err
26230 rm -f conftest.er1
26231 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026233 (exit $ac_status); } && {
26234 test -z "$ac_c_werror_flag" ||
26235 test ! -s conftest.err
26236 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026237
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026238cat >>confdefs.h <<\_ACEOF
26239#define HAVE_CURSES_IS_TERM_RESIZED 1
26240_ACEOF
26241
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026242 { echo "$as_me:$LINENO: result: yes" >&5
26243echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026244else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026245 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026246sed 's/^/| /' conftest.$ac_ext >&5
26247
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026248 { echo "$as_me:$LINENO: result: no" >&5
26249echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026250
26251fi
26252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26254
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026255{ echo "$as_me:$LINENO: checking for resize_term" >&5
26256echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026257cat >conftest.$ac_ext <<_ACEOF
26258/* confdefs.h. */
26259_ACEOF
26260cat confdefs.h >>conftest.$ac_ext
26261cat >>conftest.$ac_ext <<_ACEOF
26262/* end confdefs.h. */
26263#include <curses.h>
26264int
26265main ()
26266{
26267void *x=resize_term
26268 ;
26269 return 0;
26270}
26271_ACEOF
26272rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026273if { (ac_try="$ac_compile"
26274case "(($ac_try" in
26275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26276 *) ac_try_echo=$ac_try;;
26277esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026279 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026280 ac_status=$?
26281 grep -v '^ *+' conftest.er1 >conftest.err
26282 rm -f conftest.er1
26283 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026285 (exit $ac_status); } && {
26286 test -z "$ac_c_werror_flag" ||
26287 test ! -s conftest.err
26288 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026289
26290cat >>confdefs.h <<\_ACEOF
26291#define HAVE_CURSES_RESIZE_TERM 1
26292_ACEOF
26293
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026294 { echo "$as_me:$LINENO: result: yes" >&5
26295echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026296else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026297 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026298sed 's/^/| /' conftest.$ac_ext >&5
26299
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026300 { echo "$as_me:$LINENO: result: no" >&5
26301echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026302
26303fi
26304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26306
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026307{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26308echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026309cat >conftest.$ac_ext <<_ACEOF
26310/* confdefs.h. */
26311_ACEOF
26312cat confdefs.h >>conftest.$ac_ext
26313cat >>conftest.$ac_ext <<_ACEOF
26314/* end confdefs.h. */
26315#include <curses.h>
26316int
26317main ()
26318{
26319void *x=resizeterm
26320 ;
26321 return 0;
26322}
26323_ACEOF
26324rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325if { (ac_try="$ac_compile"
26326case "(($ac_try" in
26327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26328 *) ac_try_echo=$ac_try;;
26329esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026331 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026332 ac_status=$?
26333 grep -v '^ *+' conftest.er1 >conftest.err
26334 rm -f conftest.er1
26335 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026337 (exit $ac_status); } && {
26338 test -z "$ac_c_werror_flag" ||
26339 test ! -s conftest.err
26340 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026341
26342cat >>confdefs.h <<\_ACEOF
26343#define HAVE_CURSES_RESIZETERM 1
26344_ACEOF
26345
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026346 { echo "$as_me:$LINENO: result: yes" >&5
26347echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026348else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026349 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026350sed 's/^/| /' conftest.$ac_ext >&5
26351
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026352 { echo "$as_me:$LINENO: result: no" >&5
26353echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026354
26355fi
26356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26358
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026359{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26360echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026361
26362if test -r /dev/ptmx
26363then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026364 { echo "$as_me:$LINENO: result: yes" >&5
26365echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026366
26367cat >>confdefs.h <<\_ACEOF
26368#define HAVE_DEV_PTMX 1
26369_ACEOF
26370
Thomas Wouters89f507f2006-12-13 04:49:30 +000026371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026372 { echo "$as_me:$LINENO: result: no" >&5
26373echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026374fi
26375
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026376{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26377echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026378
26379if test -r /dev/ptc
26380then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026381 { echo "$as_me:$LINENO: result: yes" >&5
26382echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026383
26384cat >>confdefs.h <<\_ACEOF
26385#define HAVE_DEV_PTC 1
26386_ACEOF
26387
Thomas Wouters89f507f2006-12-13 04:49:30 +000026388else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026389 { echo "$as_me:$LINENO: result: no" >&5
26390echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026391fi
26392
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026393{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26394echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026395if test "${ac_cv_have_size_t_format+set}" = set; then
26396 echo $ECHO_N "(cached) $ECHO_C" >&6
26397else
26398 if test "$cross_compiling" = yes; then
26399 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026400else
26401 cat >conftest.$ac_ext <<_ACEOF
26402/* confdefs.h. */
26403_ACEOF
26404cat confdefs.h >>conftest.$ac_ext
26405cat >>conftest.$ac_ext <<_ACEOF
26406/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026407
Thomas Wouters477c8d52006-05-27 19:21:47 +000026408#include <stdio.h>
26409#include <stddef.h>
26410#include <string.h>
26411
Christian Heimes2c181612007-12-17 20:04:13 +000026412#ifdef HAVE_SYS_TYPES_H
26413#include <sys/types.h>
26414#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026415
26416#ifdef HAVE_SSIZE_T
26417typedef ssize_t Py_ssize_t;
26418#elif SIZEOF_VOID_P == SIZEOF_LONG
26419typedef long Py_ssize_t;
26420#else
26421typedef int Py_ssize_t;
26422#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026423
Christian Heimes2c181612007-12-17 20:04:13 +000026424int main()
26425{
26426 char buffer[256];
26427
Thomas Wouters477c8d52006-05-27 19:21:47 +000026428 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26429 return 1;
26430
Thomas Wouters89f507f2006-12-13 04:49:30 +000026431 if (strcmp(buffer, "123"))
26432 return 1;
26433
26434 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26435 return 1;
26436
26437 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026438 return 1;
26439
26440 return 0;
26441}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026442
Thomas Wouters477c8d52006-05-27 19:21:47 +000026443_ACEOF
26444rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026445if { (ac_try="$ac_link"
26446case "(($ac_try" in
26447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26448 *) ac_try_echo=$ac_try;;
26449esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026452 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026455 { (case "(($ac_try" in
26456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26457 *) ac_try_echo=$ac_try;;
26458esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026460 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026461 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026463 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026464 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026465else
26466 echo "$as_me: program exited with status $ac_status" >&5
26467echo "$as_me: failed program was:" >&5
26468sed 's/^/| /' conftest.$ac_ext >&5
26469
26470( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026471ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026472fi
26473rm -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 +000026474fi
26475
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026476
26477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026478fi
26479
26480{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26481echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26482if test $ac_cv_have_size_t_format = yes
26483then
26484
26485cat >>confdefs.h <<\_ACEOF
26486#define PY_FORMAT_SIZE_T "z"
26487_ACEOF
26488
26489fi
26490
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026491{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26492echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026493if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026495else
Martin v. Löwis11437992002-04-12 09:54:03 +000026496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026497/* confdefs.h. */
26498_ACEOF
26499cat confdefs.h >>conftest.$ac_ext
26500cat >>conftest.$ac_ext <<_ACEOF
26501/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026502
26503#ifdef HAVE_SYS_TYPES_H
26504#include <sys/types.h>
26505#endif
26506#ifdef HAVE_SYS_SOCKET_H
26507#include <sys/socket.h>
26508#endif
26509
26510
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026511typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026512int
26513main ()
26514{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026515if ((ac__type_new_ *) 0)
26516 return 0;
26517if (sizeof (ac__type_new_))
26518 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026519 ;
26520 return 0;
26521}
26522_ACEOF
26523rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026524if { (ac_try="$ac_compile"
26525case "(($ac_try" in
26526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26527 *) ac_try_echo=$ac_try;;
26528esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026532 grep -v '^ *+' conftest.er1 >conftest.err
26533 rm -f conftest.er1
26534 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536 (exit $ac_status); } && {
26537 test -z "$ac_c_werror_flag" ||
26538 test ! -s conftest.err
26539 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026540 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026541else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026543sed 's/^/| /' conftest.$ac_ext >&5
26544
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026545 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026547
26548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026549fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026550{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26551echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26552if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026553 :
26554else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026555
Martin v. Löwis01c04012002-11-11 14:58:44 +000026556cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026557#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026558_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026559
26560fi
26561
Michael W. Hudson54241132001-12-07 15:38:26 +000026562
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026563{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26564echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026565if test "${ac_cv_broken_mbstowcs+set}" = set; then
26566 echo $ECHO_N "(cached) $ECHO_C" >&6
26567else
26568 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026569 ac_cv_broken_mbstowcs=no
26570else
26571 cat >conftest.$ac_ext <<_ACEOF
26572/* confdefs.h. */
26573_ACEOF
26574cat confdefs.h >>conftest.$ac_ext
26575cat >>conftest.$ac_ext <<_ACEOF
26576/* end confdefs.h. */
26577
26578#include<stdlib.h>
26579int main() {
26580 size_t len = -1;
26581 const char *str = "text";
26582 len = mbstowcs(NULL, str, 0);
26583 return (len != 4);
26584}
26585
26586_ACEOF
26587rm -f conftest$ac_exeext
26588if { (ac_try="$ac_link"
26589case "(($ac_try" in
26590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26591 *) ac_try_echo=$ac_try;;
26592esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026593eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026594 (eval "$ac_link") 2>&5
26595 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026597 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26598 { (case "(($ac_try" in
26599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26600 *) ac_try_echo=$ac_try;;
26601esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026603 (eval "$ac_try") 2>&5
26604 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026606 (exit $ac_status); }; }; then
26607 ac_cv_broken_mbstowcs=no
26608else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026609 echo "$as_me: program exited with status $ac_status" >&5
26610echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026611sed 's/^/| /' conftest.$ac_ext >&5
26612
26613( exit $ac_status )
26614ac_cv_broken_mbstowcs=yes
26615fi
26616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26617fi
26618
26619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026620fi
26621
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026622{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26623echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026624if test "$ac_cv_broken_mbstowcs" = yes
26625then
26626
26627cat >>confdefs.h <<\_ACEOF
26628#define HAVE_BROKEN_MBSTOWCS 1
26629_ACEOF
26630
26631fi
26632
Antoine Pitroub52ec782009-01-25 16:34:23 +000026633# Check for --with-computed-gotos
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026634{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26635echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026636
26637# Check whether --with-computed-gotos was given.
26638if test "${with_computed_gotos+set}" = set; then
26639 withval=$with_computed_gotos;
26640if test "$withval" != no
26641then
26642
26643cat >>confdefs.h <<\_ACEOF
26644#define USE_COMPUTED_GOTOS 1
26645_ACEOF
26646
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026647 { echo "$as_me:$LINENO: result: yes" >&5
26648echo "${ECHO_T}yes" >&6; }
26649else { echo "$as_me:$LINENO: result: no" >&5
26650echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026651fi
26652else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026653 { echo "$as_me:$LINENO: result: no" >&5
26654echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026655fi
26656
26657
26658
Michael W. Hudson54241132001-12-07 15:38:26 +000026659
26660
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026661for h in `(cd $srcdir;echo Python/thread_*.h)`
26662do
26663 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26664done
26665
Michael W. Hudson54241132001-12-07 15:38:26 +000026666
Neal Norwitzd24499d2005-12-18 21:36:39 +000026667SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026668{ echo "$as_me:$LINENO: checking for build directories" >&5
26669echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026670for dir in $SRCDIRS; do
26671 if test ! -d $dir; then
26672 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026673 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026674done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026675{ echo "$as_me:$LINENO: result: done" >&5
26676echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026677
Guido van Rossum627b2d71993-12-24 10:39:16 +000026678# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026679ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026680
Martin v. Löwis11437992002-04-12 09:54:03 +000026681cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026682# This file is a shell script that caches the results of configure
26683# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026684# scripts and configure runs, see configure's option --config-cache.
26685# It is not useful on other systems. If it contains results you don't
26686# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026687#
Martin v. Löwis11437992002-04-12 09:54:03 +000026688# config.status only pays attention to the cache file if you give it
26689# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026690#
Skip Montanaro6dead952003-09-25 14:50:04 +000026691# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026692# loading this file, other *unset* `ac_cv_foo' will be assigned the
26693# following values.
26694
26695_ACEOF
26696
Guido van Rossumf78abae1997-01-21 22:02:36 +000026697# The following way of writing the cache mishandles newlines in values,
26698# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026699# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026700# Ultrix sh set writes to stderr and can't be redirected directly,
26701# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026702(
26703 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26704 eval ac_val=\$$ac_var
26705 case $ac_val in #(
26706 *${as_nl}*)
26707 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026708 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26709echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026710 esac
26711 case $ac_var in #(
26712 _ | IFS | as_nl) ;; #(
26713 *) $as_unset $ac_var ;;
26714 esac ;;
26715 esac
26716 done
26717
Martin v. Löwis11437992002-04-12 09:54:03 +000026718 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026719 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26720 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026721 # `set' does not quote correctly, so add quotes (double-quote
26722 # substitution turns \\\\ into \\, and sed turns \\ into \).
26723 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026724 "s/'/'\\\\''/g;
26725 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026726 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026727 *)
26728 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026729 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026730 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 esac |
26732 sort
26733) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026734 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026735 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026736 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026737 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026738 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26739 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026740 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26741 :end' >>confcache
26742if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26743 if test -w "$cache_file"; then
26744 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026745 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26746echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026747 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026748 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026749 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26750echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026751 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026752fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026753rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026755test "x$prefix" = xNONE && prefix=$ac_default_prefix
26756# Let make expand exec_prefix.
26757test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026758
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026759DEFS=-DHAVE_CONFIG_H
26760
Skip Montanaro6dead952003-09-25 14:50:04 +000026761ac_libobjs=
26762ac_ltlibobjs=
26763for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26764 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026765 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026766 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026767 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26768 # will be set to the directory where LIBOBJS objects are built.
26769 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26770 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026771done
26772LIBOBJS=$ac_libobjs
26773
26774LTLIBOBJS=$ac_ltlibobjs
26775
26776
Martin v. Löwis11437992002-04-12 09:54:03 +000026777
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026778: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026779ac_clean_files_save=$ac_clean_files
26780ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026781{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26782echo "$as_me: creating $CONFIG_STATUS" >&6;}
26783cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026784#! $SHELL
26785# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026786# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026787# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026788# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026789
Martin v. Löwis11437992002-04-12 09:54:03 +000026790debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026791ac_cs_recheck=false
26792ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026793SHELL=\${CONFIG_SHELL-$SHELL}
26794_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026795
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026796cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026797## --------------------- ##
26798## M4sh Initialization. ##
26799## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026801# Be more Bourne compatible
26802DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026803if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26804 emulate sh
26805 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026806 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026807 # is contrary to our usage. Disable this feature.
26808 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026809 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026810else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026811 case `(set -o) 2>/dev/null` in
26812 *posix*) set -o posix ;;
26813esac
26814
Michael W. Hudson54241132001-12-07 15:38:26 +000026815fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026816
26817
Michael W. Hudson54241132001-12-07 15:38:26 +000026818
Michael W. Hudson54241132001-12-07 15:38:26 +000026819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026820# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026821# Avoid depending upon Character Ranges.
26822as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26823as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26824as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26825as_cr_digits='0123456789'
26826as_cr_alnum=$as_cr_Letters$as_cr_digits
26827
26828# The user is always right.
26829if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026830 echo "#! /bin/sh" >conf$$.sh
26831 echo "exit 0" >>conf$$.sh
26832 chmod +x conf$$.sh
26833 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26834 PATH_SEPARATOR=';'
26835 else
26836 PATH_SEPARATOR=:
26837 fi
26838 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026839fi
26840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026841# Support unset when possible.
26842if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26843 as_unset=unset
26844else
26845 as_unset=false
26846fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026848
26849# IFS
26850# We need space, tab and new line, in precisely that order. Quoting is
26851# there to prevent editors from complaining about space-tab.
26852# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26853# splitting by setting IFS to empty value.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026854as_nl='
26855'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026856IFS=" "" $as_nl"
26857
26858# Find who we are. Look in the path if we contain no directory separator.
26859case $0 in
26860 *[\\/]* ) as_myself=$0 ;;
26861 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026862for as_dir in $PATH
26863do
26864 IFS=$as_save_IFS
26865 test -z "$as_dir" && as_dir=.
26866 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26867done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026868IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026870 ;;
26871esac
26872# We did not find ourselves, most probably we were run as `sh COMMAND'
26873# in which case we are not to be found in the path.
26874if test "x$as_myself" = x; then
26875 as_myself=$0
26876fi
26877if test ! -f "$as_myself"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026878 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026879 { (exit 1); exit 1; }
26880fi
26881
26882# Work around bugs in pre-3.0 UWIN ksh.
26883for as_var in ENV MAIL MAILPATH
26884do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26885done
26886PS1='$ '
26887PS2='> '
26888PS4='+ '
26889
26890# NLS nuisances.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026891for as_var in \
26892 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26893 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26894 LC_TELEPHONE LC_TIME
26895do
26896 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26897 eval $as_var=C; export $as_var
26898 else
26899 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26900 fi
26901done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026902
26903# Required to use basename.
26904if expr a : '\(a\)' >/dev/null 2>&1 &&
26905 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26906 as_expr=expr
26907else
26908 as_expr=false
26909fi
26910
26911if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26912 as_basename=basename
26913else
26914 as_basename=false
26915fi
26916
26917
26918# Name of the executable.
26919as_me=`$as_basename -- "$0" ||
26920$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26921 X"$0" : 'X\(//\)$' \| \
26922 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026923echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026924 sed '/^.*\/\([^/][^/]*\)\/*$/{
26925 s//\1/
26926 q
26927 }
26928 /^X\/\(\/\/\)$/{
26929 s//\1/
26930 q
26931 }
26932 /^X\/\(\/\).*/{
26933 s//\1/
26934 q
26935 }
26936 s/.*/./; q'`
26937
26938# CDPATH.
26939$as_unset CDPATH
26940
26941
26942
Martin v. Löwis11437992002-04-12 09:54:03 +000026943 as_lineno_1=$LINENO
26944 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026945 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026946 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026947
Martin v. Löwis11437992002-04-12 09:54:03 +000026948 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26949 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026950 # line-number line after each line using $LINENO; the second 'sed'
26951 # does the real work. The second script uses 'N' to pair each
26952 # line-number line with the line containing $LINENO, and appends
26953 # trailing '-' during substitution so that $LINENO is not a special
26954 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026955 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026956 # scripts with optimization help from Paolo Bonzini. Blame Lee
26957 # E. McMahon (1931-1989) for sed's syntax. :-)
26958 sed -n '
26959 p
26960 /[$]LINENO/=
26961 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026962 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026963 s/[$]LINENO.*/&-/
26964 t lineno
26965 b
26966 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026967 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026968 :loop
26969 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026970 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026972 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026973 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026974 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026975 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026976
Martin v. Löwis11437992002-04-12 09:54:03 +000026977 # Don't try to exec as it changes $[0], causing all sort of problems
26978 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026979 # original and so on. Autoconf is especially sensitive to this).
26980 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026981 # Exit status is that of the last command.
26982 exit
26983}
26984
26985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026986if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26987 as_dirname=dirname
26988else
26989 as_dirname=false
26990fi
26991
26992ECHO_C= ECHO_N= ECHO_T=
26993case `echo -n x` in
26994-n*)
26995 case `echo 'x\c'` in
26996 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26997 *) ECHO_C='\c';;
26998 esac;;
26999*)
27000 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027001esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027003if expr a : '\(a\)' >/dev/null 2>&1 &&
27004 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027005 as_expr=expr
27006else
27007 as_expr=false
27008fi
27009
27010rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027011if test -d conf$$.dir; then
27012 rm -f conf$$.dir/conf$$.file
27013else
27014 rm -f conf$$.dir
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027015 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027016fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027017echo >conf$$.file
27018if ln -s conf$$.file conf$$ 2>/dev/null; then
27019 as_ln_s='ln -s'
27020 # ... but there are two gotchas:
27021 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27022 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27023 # In both cases, we have to default to `cp -p'.
27024 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027025 as_ln_s='cp -p'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027026elif ln conf$$.file conf$$ 2>/dev/null; then
27027 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027028else
27029 as_ln_s='cp -p'
27030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027031rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27032rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027033
Skip Montanaro6dead952003-09-25 14:50:04 +000027034if mkdir -p . 2>/dev/null; then
27035 as_mkdir_p=:
27036else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027037 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027038 as_mkdir_p=false
27039fi
27040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027041if test -x / >/dev/null 2>&1; then
27042 as_test_x='test -x'
27043else
27044 if ls -dL / >/dev/null 2>&1; then
27045 as_ls_L_option=L
27046 else
27047 as_ls_L_option=
27048 fi
27049 as_test_x='
27050 eval sh -c '\''
27051 if test -d "$1"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027052 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027053 else
27054 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027055 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027056 esac;
27057 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27058 ???[sx]*):;;*)false;;esac;fi
27059 '\'' sh
27060 '
27061fi
27062as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027063
27064# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027065as_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 +000027066
27067# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027068as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027069
27070
Martin v. Löwis11437992002-04-12 09:54:03 +000027071exec 6>&1
27072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027073# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027074# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027075# values after options handling.
27076ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027077This file was extended by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027078generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027079
27080 CONFIG_FILES = $CONFIG_FILES
27081 CONFIG_HEADERS = $CONFIG_HEADERS
27082 CONFIG_LINKS = $CONFIG_LINKS
27083 CONFIG_COMMANDS = $CONFIG_COMMANDS
27084 $ $0 $@
27085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027086on `(hostname || uname -n) 2>/dev/null | sed 1q`
27087"
27088
Martin v. Löwis11437992002-04-12 09:54:03 +000027089_ACEOF
27090
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027091cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027092# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027093config_files="$ac_config_files"
27094config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027096_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027097
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027098cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027099ac_cs_usage="\
27100\`$as_me' instantiates files from templates according to the
27101current configuration.
27102
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027103Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027104
27105 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027106 -V, --version print version number and configuration settings, then exit
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027107 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027108 -d, --debug don't remove temporary files
27109 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027110 --file=FILE[:TEMPLATE]
27111 instantiate the configuration file FILE
27112 --header=FILE[:TEMPLATE]
27113 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027114
27115Configuration files:
27116$config_files
27117
27118Configuration headers:
27119$config_headers
27120
27121Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027123_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027124cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027125ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027126python config.status 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027127configured by $0, generated by GNU Autoconf 2.61,
27128 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027129
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027130Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027131This config.status script is free software; the Free Software Foundation
27132gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027133
27134ac_pwd='$ac_pwd'
27135srcdir='$srcdir'
27136INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027137_ACEOF
27138
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027139cat >>$CONFIG_STATUS <<\_ACEOF
27140# If no file are specified by the user, then we need to provide default
27141# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027142ac_need_defaults=:
27143while test $# != 0
27144do
27145 case $1 in
27146 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027147 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27148 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027149 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027150 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027151 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027152 ac_option=$1
27153 ac_optarg=$2
27154 ac_shift=shift
27155 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027156 esac
27157
Skip Montanaro6dead952003-09-25 14:50:04 +000027158 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027159 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027160 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27161 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027162 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027163 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027164 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027165 debug=: ;;
27166 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027167 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027168 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027169 ac_need_defaults=false;;
27170 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027171 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027172 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027173 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027174 --he | --h)
27175 # Conflict between --help and --header
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027176 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027177Try \`$0 --help' for more information." >&2
27178 { (exit 1); exit 1; }; };;
27179 --help | --hel | -h )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027180 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027181 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27182 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27183 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027184
27185 # This is an error.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027186 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027187Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027188 { (exit 1); exit 1; }; } ;;
27189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027190 *) ac_config_targets="$ac_config_targets $1"
27191 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027192
27193 esac
27194 shift
27195done
27196
Skip Montanaro6dead952003-09-25 14:50:04 +000027197ac_configure_extra_args=
27198
27199if $ac_cs_silent; then
27200 exec 6>/dev/null
27201 ac_configure_extra_args="$ac_configure_extra_args --silent"
27202fi
27203
27204_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027205cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027206if \$ac_cs_recheck; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027207 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27208 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027209 export CONFIG_SHELL
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027210 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027211fi
27212
Martin v. Löwis11437992002-04-12 09:54:03 +000027213_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027214cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027215exec 5>>config.log
27216{
27217 echo
27218 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27219## Running $as_me. ##
27220_ASBOX
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027221 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027222} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027224_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027225cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027226_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027227
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027228cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027229
27230# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027231for ac_config_target in $ac_config_targets
27232do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027233 case $ac_config_target in
27234 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27235 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27236 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027237 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27238 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027239 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27240 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027241 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027242
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027243 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27244echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027245 { (exit 1); exit 1; }; };;
27246 esac
27247done
27248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027249
Martin v. Löwis11437992002-04-12 09:54:03 +000027250# If the user did not use the arguments to specify the items to instantiate,
27251# then the envvar interface is used. Set only those that are not.
27252# We use the long form for the default assignment because of an extremely
27253# bizarre bug on SunOS 4.1.3.
27254if $ac_need_defaults; then
27255 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27256 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27257fi
27258
Skip Montanaro6dead952003-09-25 14:50:04 +000027259# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027261# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027262# Hook for its removal unless debugging.
27263# Note that there is a small window in which the directory will not be cleaned:
27264# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027265$debug ||
27266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027267 tmp=
27268 trap 'exit_status=$?
27269 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27270' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027271 trap '{ (exit 1); exit 1; }' 1 2 13 15
27272}
Martin v. Löwis11437992002-04-12 09:54:03 +000027273# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027274
Martin v. Löwis11437992002-04-12 09:54:03 +000027275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027276 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027277 test -n "$tmp" && test -d "$tmp"
27278} ||
27279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027280 tmp=./conf$$-$RANDOM
27281 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027282} ||
27283{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027284 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027285 { (exit 1); exit 1; }
27286}
27287
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027288#
27289# Set up the sed scripts for CONFIG_FILES section.
27290#
27291
27292# No need to generate the scripts if there are no CONFIG_FILES.
27293# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027294if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027295
27296_ACEOF
27297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027298
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027300ac_delim='%!_!# '
27301for ac_last_try in false false false false false :; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027302 cat >conf$$subs.sed <<_ACEOF
27303SHELL!$SHELL$ac_delim
27304PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27305PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27306PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27307PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27308PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27309PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27310exec_prefix!$exec_prefix$ac_delim
27311prefix!$prefix$ac_delim
27312program_transform_name!$program_transform_name$ac_delim
27313bindir!$bindir$ac_delim
27314sbindir!$sbindir$ac_delim
27315libexecdir!$libexecdir$ac_delim
27316datarootdir!$datarootdir$ac_delim
27317datadir!$datadir$ac_delim
27318sysconfdir!$sysconfdir$ac_delim
27319sharedstatedir!$sharedstatedir$ac_delim
27320localstatedir!$localstatedir$ac_delim
27321includedir!$includedir$ac_delim
27322oldincludedir!$oldincludedir$ac_delim
27323docdir!$docdir$ac_delim
27324infodir!$infodir$ac_delim
27325htmldir!$htmldir$ac_delim
27326dvidir!$dvidir$ac_delim
27327pdfdir!$pdfdir$ac_delim
27328psdir!$psdir$ac_delim
27329libdir!$libdir$ac_delim
27330localedir!$localedir$ac_delim
27331mandir!$mandir$ac_delim
27332DEFS!$DEFS$ac_delim
27333ECHO_C!$ECHO_C$ac_delim
27334ECHO_N!$ECHO_N$ac_delim
27335ECHO_T!$ECHO_T$ac_delim
27336LIBS!$LIBS$ac_delim
27337build_alias!$build_alias$ac_delim
27338host_alias!$host_alias$ac_delim
27339target_alias!$target_alias$ac_delim
27340VERSION!$VERSION$ac_delim
27341SOVERSION!$SOVERSION$ac_delim
27342CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27343UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27344ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27345PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27346PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27347PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27348PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27349PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27350FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27351FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27352FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27353FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27354FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27355MACHDEP!$MACHDEP$ac_delim
27356SGI_ABI!$SGI_ABI$ac_delim
27357CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27358EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27359CC!$CC$ac_delim
27360CFLAGS!$CFLAGS$ac_delim
27361LDFLAGS!$LDFLAGS$ac_delim
27362CPPFLAGS!$CPPFLAGS$ac_delim
27363ac_ct_CC!$ac_ct_CC$ac_delim
27364EXEEXT!$EXEEXT$ac_delim
27365OBJEXT!$OBJEXT$ac_delim
27366CXX!$CXX$ac_delim
27367MAINCC!$MAINCC$ac_delim
27368CPP!$CPP$ac_delim
27369GREP!$GREP$ac_delim
27370EGREP!$EGREP$ac_delim
27371BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27372LIBRARY!$LIBRARY$ac_delim
27373LDLIBRARY!$LDLIBRARY$ac_delim
27374DLLLIBRARY!$DLLLIBRARY$ac_delim
27375BLDLIBRARY!$BLDLIBRARY$ac_delim
27376LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27377INSTSONAME!$INSTSONAME$ac_delim
27378RUNSHARED!$RUNSHARED$ac_delim
27379LINKCC!$LINKCC$ac_delim
27380GNULD!$GNULD$ac_delim
27381RANLIB!$RANLIB$ac_delim
27382AR!$AR$ac_delim
27383ARFLAGS!$ARFLAGS$ac_delim
27384SVNVERSION!$SVNVERSION$ac_delim
27385INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27386INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27387INSTALL_DATA!$INSTALL_DATA$ac_delim
27388LN!$LN$ac_delim
27389OPT!$OPT$ac_delim
27390BASECFLAGS!$BASECFLAGS$ac_delim
27391UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27392OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27393LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27394SO!$SO$ac_delim
27395LDSHARED!$LDSHARED$ac_delim
27396BLDSHARED!$BLDSHARED$ac_delim
27397CCSHARED!$CCSHARED$ac_delim
27398LINKFORSHARED!$LINKFORSHARED$ac_delim
27399CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27400_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027401
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027402 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027403 break
27404 elif $ac_last_try; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027405 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27406echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027407 { (exit 1); exit 1; }; }
27408 else
27409 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027410 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027411done
27412
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027413ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27414if test -n "$ac_eof"; then
27415 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27416 ac_eof=`expr $ac_eof + 1`
27417fi
27418
27419cat >>$CONFIG_STATUS <<_ACEOF
27420cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27421/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027422_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027423sed '
27424s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27425s/^/s,@/; s/!/@,|#_!!_#|/
27426:n
27427t n
27428s/'"$ac_delim"'$/,g/; t
27429s/$/\\/; p
27430N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27431' >>$CONFIG_STATUS <conf$$subs.sed
27432rm -f conf$$subs.sed
27433cat >>$CONFIG_STATUS <<_ACEOF
27434CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027435_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027436
27437
27438ac_delim='%!_!# '
27439for ac_last_try in false false false false false :; do
27440 cat >conf$$subs.sed <<_ACEOF
27441SHLIBS!$SHLIBS$ac_delim
27442USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27443SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27444USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27445LDLAST!$LDLAST$ac_delim
27446THREADOBJ!$THREADOBJ$ac_delim
27447DLINCLDIR!$DLINCLDIR$ac_delim
27448DYNLOADFILE!$DYNLOADFILE$ac_delim
27449MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27450TRUE!$TRUE$ac_delim
27451LIBOBJS!$LIBOBJS$ac_delim
27452HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27453HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27454HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27455HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27456HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27457LIBM!$LIBM$ac_delim
27458LIBC!$LIBC$ac_delim
27459THREADHEADERS!$THREADHEADERS$ac_delim
27460SRCDIRS!$SRCDIRS$ac_delim
27461LTLIBOBJS!$LTLIBOBJS$ac_delim
27462_ACEOF
27463
27464 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27465 break
27466 elif $ac_last_try; then
27467 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27468echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027469 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027470 else
27471 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27472 fi
27473done
27474
27475ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27476if test -n "$ac_eof"; then
27477 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27478 ac_eof=`expr $ac_eof + 1`
27479fi
27480
27481cat >>$CONFIG_STATUS <<_ACEOF
27482cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27483/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027484_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027485sed '
27486s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27487s/^/s,@/; s/!/@,|#_!!_#|/
27488:n
27489t n
27490s/'"$ac_delim"'$/,g/; t
27491s/$/\\/; p
27492N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27493' >>$CONFIG_STATUS <conf$$subs.sed
27494rm -f conf$$subs.sed
27495cat >>$CONFIG_STATUS <<_ACEOF
27496:end
27497s/|#_!!_#|//g
27498CEOF$ac_eof
27499_ACEOF
27500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027501
27502# VPATH may cause trouble with some makes, so we remove $(srcdir),
27503# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27504# trailing colons and then remove the whole line if VPATH becomes empty
27505# (actually we leave an empty line to preserve line numbers).
27506if test "x$srcdir" = x.; then
27507 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27508s/:*\$(srcdir):*/:/
27509s/:*\${srcdir}:*/:/
27510s/:*@srcdir@:*/:/
27511s/^\([^=]*=[ ]*\):*/\1/
27512s/:*$//
27513s/^[^=]*=[ ]*$//
27514}'
27515fi
27516
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027517cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027518fi # test -n "$CONFIG_FILES"
27519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027520
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027521for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027522do
27523 case $ac_tag in
27524 :[FHLC]) ac_mode=$ac_tag; continue;;
27525 esac
27526 case $ac_mode$ac_tag in
27527 :[FHL]*:*);;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027528 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27529echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027530 { (exit 1); exit 1; }; };;
27531 :[FH]-) ac_tag=-:-;;
27532 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27533 esac
27534 ac_save_IFS=$IFS
27535 IFS=:
27536 set x $ac_tag
27537 IFS=$ac_save_IFS
27538 shift
27539 ac_file=$1
27540 shift
27541
27542 case $ac_mode in
27543 :L) ac_source=$1;;
27544 :[FH])
27545 ac_file_inputs=
27546 for ac_f
27547 do
27548 case $ac_f in
27549 -) ac_f="$tmp/stdin";;
27550 *) # Look for the file first in the build tree, then in the source tree
27551 # (if the path is not absolute). The absolute path cannot be DOS-style,
27552 # because $ac_f cannot contain `:'.
27553 test -f "$ac_f" ||
27554 case $ac_f in
27555 [\\/$]*) false;;
27556 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27557 esac ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027558 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27559echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027560 { (exit 1); exit 1; }; };;
27561 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027562 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027563 done
27564
27565 # Let's still pretend it is `configure' which instantiates (i.e., don't
27566 # use $as_me), people would be surprised to read:
27567 # /* config.h. Generated by config.status. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027568 configure_input="Generated from "`IFS=:
27569 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027570 if test x"$ac_file" != x-; then
27571 configure_input="$ac_file. $configure_input"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027572 { echo "$as_me:$LINENO: creating $ac_file" >&5
27573echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027574 fi
27575
27576 case $ac_tag in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027577 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027578 esac
27579 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027580 esac
27581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027583$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027584 X"$ac_file" : 'X\(//\)[^/]' \| \
27585 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027586 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027587echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027588 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27589 s//\1/
27590 q
27591 }
27592 /^X\(\/\/\)[^/].*/{
27593 s//\1/
27594 q
27595 }
27596 /^X\(\/\/\)$/{
27597 s//\1/
27598 q
27599 }
27600 /^X\(\/\).*/{
27601 s//\1/
27602 q
27603 }
27604 s/.*/./; q'`
27605 { as_dir="$ac_dir"
27606 case $as_dir in #(
27607 -*) as_dir=./$as_dir;;
27608 esac
27609 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027610 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027611 while :; do
27612 case $as_dir in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027613 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027614 *) as_qdir=$as_dir;;
27615 esac
27616 as_dirs="'$as_qdir' $as_dirs"
27617 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027618$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027619 X"$as_dir" : 'X\(//\)[^/]' \| \
27620 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027621 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027622echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027623 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27624 s//\1/
27625 q
27626 }
27627 /^X\(\/\/\)[^/].*/{
27628 s//\1/
27629 q
27630 }
27631 /^X\(\/\/\)$/{
27632 s//\1/
27633 q
27634 }
27635 /^X\(\/\).*/{
27636 s//\1/
27637 q
27638 }
27639 s/.*/./; q'`
27640 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027642 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027643 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27644echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027645 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027646 ac_builddir=.
27647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027648case "$ac_dir" in
27649.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27650*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027651 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027652 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027653 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027654 case $ac_top_builddir_sub in
27655 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27656 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27657 esac ;;
27658esac
27659ac_abs_top_builddir=$ac_pwd
27660ac_abs_builddir=$ac_pwd$ac_dir_suffix
27661# for backward compatibility:
27662ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027663
27664case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027665 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027666 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027667 ac_top_srcdir=$ac_top_builddir_sub
27668 ac_abs_top_srcdir=$ac_pwd ;;
27669 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027670 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027671 ac_top_srcdir=$srcdir
27672 ac_abs_top_srcdir=$srcdir ;;
27673 *) # Relative name.
27674 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27675 ac_top_srcdir=$ac_top_build_prefix$srcdir
27676 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027677esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027678ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027679
Martin v. Löwis11437992002-04-12 09:54:03 +000027680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027681 case $ac_mode in
27682 :F)
27683 #
27684 # CONFIG_FILE
27685 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027686
27687 case $INSTALL in
27688 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027689 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027690 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027691_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027692
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027693cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027694# If the template does not know about datarootdir, expand it.
27695# FIXME: This hack should be removed a few years after 2.60.
27696ac_datarootdir_hack=; ac_datarootdir_seen=
27697
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027698case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027699 p
27700 q
27701}
27702/@datadir@/p
27703/@docdir@/p
27704/@infodir@/p
27705/@localedir@/p
27706/@mandir@/p
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027707' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027708*datarootdir*) ac_datarootdir_seen=yes;;
27709*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027710 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27711echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027712_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027713cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027714 ac_datarootdir_hack='
27715 s&@datadir@&$datadir&g
27716 s&@docdir@&$docdir&g
27717 s&@infodir@&$infodir&g
27718 s&@localedir@&$localedir&g
27719 s&@mandir@&$mandir&g
27720 s&\\\${datarootdir}&$datarootdir&g' ;;
27721esac
27722_ACEOF
27723
27724# Neutralize VPATH when `$srcdir' = `.'.
27725# Shell code in configure.ac might set extrasub.
27726# FIXME: do we really want to maintain this feature?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027727cat >>$CONFIG_STATUS <<_ACEOF
27728 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027729$extrasub
27730_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027731cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027732:t
27733/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027734s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027735s&@top_builddir@&$ac_top_builddir_sub&;t t
27736s&@srcdir@&$ac_srcdir&;t t
27737s&@abs_srcdir@&$ac_abs_srcdir&;t t
27738s&@top_srcdir@&$ac_top_srcdir&;t t
27739s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27740s&@builddir@&$ac_builddir&;t t
27741s&@abs_builddir@&$ac_abs_builddir&;t t
27742s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27743s&@INSTALL@&$ac_INSTALL&;t t
27744$ac_datarootdir_hack
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027745" $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 +000027746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027747test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27748 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27749 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027750 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027751which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027752echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027753which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027755 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027756 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027757 -) cat "$tmp/out"; rm -f "$tmp/out";;
27758 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27759 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027760 ;;
27761 :H)
27762 #
27763 # CONFIG_HEADER
27764 #
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027765_ACEOF
27766
27767# Transform confdefs.h into a sed script `conftest.defines', that
27768# substitutes the proper values into config.h.in to produce config.h.
27769rm -f conftest.defines conftest.tail
27770# First, append a space to every undef/define line, to ease matching.
27771echo 's/$/ /' >conftest.defines
27772# Then, protect against being on the right side of a sed subst, or in
27773# an unquoted here document, in config.status. If some macros were
27774# called several times there might be several #defines for the same
27775# symbol, which is useless. But do not sort them, since the last
27776# AC_DEFINE must be honored.
27777ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27778# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27779# NAME is the cpp macro being defined, VALUE is the value it is being given.
27780# PARAMS is the parameter list in the macro definition--in most cases, it's
27781# just an empty string.
27782ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27783ac_dB='\\)[ (].*,\\1define\\2'
27784ac_dC=' '
27785ac_dD=' ,'
27786
27787uniq confdefs.h |
27788 sed -n '
27789 t rset
27790 :rset
27791 s/^[ ]*#[ ]*define[ ][ ]*//
27792 t ok
27793 d
27794 :ok
27795 s/[\\&,]/\\&/g
27796 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27797 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27798 ' >>conftest.defines
27799
27800# Remove the space that was appended to ease matching.
27801# Then replace #undef with comments. This is necessary, for
27802# example, in the case of _POSIX_SOURCE, which is predefined and required
27803# on some systems where configure will not decide to define it.
27804# (The regexp can be short, since the line contains either #define or #undef.)
27805echo 's/ $//
27806s,^[ #]*u.*,/* & */,' >>conftest.defines
27807
27808# Break up conftest.defines:
27809ac_max_sed_lines=50
27810
27811# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27812# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27813# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27814# et cetera.
27815ac_in='$ac_file_inputs'
27816ac_out='"$tmp/out1"'
27817ac_nxt='"$tmp/out2"'
27818
27819while :
27820do
27821 # Write a here document:
27822 cat >>$CONFIG_STATUS <<_ACEOF
27823 # First, check the format of the line:
27824 cat >"\$tmp/defines.sed" <<\\CEOF
27825/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27826/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27827b
27828:def
27829_ACEOF
27830 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27831 echo 'CEOF
27832 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27833 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27834 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27835 grep . conftest.tail >/dev/null || break
27836 rm -f conftest.defines
27837 mv conftest.tail conftest.defines
27838done
27839rm -f conftest.defines conftest.tail
27840
27841echo "ac_result=$ac_in" >>$CONFIG_STATUS
27842cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027843 if test x"$ac_file" != x-; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027844 echo "/* $configure_input */" >"$tmp/config.h"
27845 cat "$ac_result" >>"$tmp/config.h"
27846 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27847 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27848echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027849 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027850 rm -f $ac_file
27851 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027852 fi
27853 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027854 echo "/* $configure_input */"
27855 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027856 fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027857 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027860
27861 esac
27862
27863done # for ac_tag
27864
Guido van Rossum627b2d71993-12-24 10:39:16 +000027865
Martin v. Löwis11437992002-04-12 09:54:03 +000027866{ (exit 0); exit 0; }
27867_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027868chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027869ac_clean_files=$ac_clean_files_save
27870
27871
27872# configure is writing to config.log, and then calls config.status.
27873# config.status does its own redirection, appending to config.log.
27874# Unfortunately, on DOS this fails, as config.log is still kept open
27875# by configure, so config.status won't be able to write to it; its
27876# output is simply discarded. So we exec the FD to /dev/null,
27877# effectively closing config.log, so it can be properly (re)opened and
27878# appended to by config.status. When coming back to configure, we
27879# need to make the FD available again.
27880if test "$no_create" != yes; then
27881 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027882 ac_config_status_args=
27883 test "$silent" = yes &&
27884 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027885 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027886 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027887 exec 5>>config.log
27888 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27889 # would make configure fail if this is the last instruction.
27890 $ac_cs_success || { (exit 1); exit 1; }
27891fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027892
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027893
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027894echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027895if test ! -f Modules/Setup
27896then
27897 cp $srcdir/Modules/Setup.dist Modules/Setup
27898fi
27899
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027900echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027901if test ! -f Modules/Setup.local
27902then
27903 echo "# Edit this file for local setup changes" >Modules/Setup.local
27904fi
27905
27906echo "creating Makefile"
27907$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27908 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027909 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027910mv config.c Modules