blob: 31e766298c2e41a5c14a71a4abc461eb334ea0e2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002# From configure.in Revision: 73307 .
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 Vassalotti19142282009-07-17 23:11:52 +00004573 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004574 ac_cv_no_strict_aliasing_ok=no
4575else
4576 cat >conftest.$ac_ext <<_ACEOF
4577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
4582int main() { return 0; }
4583_ACEOF
4584rm -f conftest$ac_exeext
4585if { (ac_try="$ac_link"
4586case "(($ac_try" in
4587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4588 *) ac_try_echo=$ac_try;;
4589esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004591 (eval "$ac_link") 2>&5
4592 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004594 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4595 { (case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004600 (eval "$ac_try") 2>&5
4601 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603 (exit $ac_status); }; }; then
4604 ac_cv_no_strict_aliasing_ok=yes
4605else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004606 echo "$as_me: program exited with status $ac_status" >&5
4607echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004608sed 's/^/| /' conftest.$ac_ext >&5
4609
4610( exit $ac_status )
4611ac_cv_no_strict_aliasing_ok=no
4612fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4614fi
4615
4616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004617 CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004618 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4619echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004620 if test $ac_cv_no_strict_aliasing_ok = yes
4621 then
4622 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4623 fi
4624
4625 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4626 # support. Without this, treatment of subnormals doesn't follow
4627 # the standard.
4628 case $ac_sys_machine in
4629 alpha*)
4630 BASECFLAGS="$BASECFLAGS -mieee"
4631 ;;
4632 esac
4633
4634 case $ac_sys_system in
4635 SCO_SV*)
4636 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4637 ;;
4638 # is there any other compiler on Darwin besides gcc?
4639 Darwin*)
4640 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4641 # used to be here, but non-Apple gcc doesn't accept them.
4642
4643
4644 if test "${enable_universalsdk}"; then
4645 UNIVERSAL_ARCH_FLAGS=""
4646 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4647 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4648 ARCH_RUN_32BIT=""
4649
4650 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4652
4653 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4654 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4655 ARCH_RUN_32BIT="arch -i386 -ppc"
4656
4657 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004658 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4659echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004660 { (exit 1); exit 1; }; }
4661
4662 fi
4663
4664
4665 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4666 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4667 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4668 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4669 fi
4670 fi
4671
4672 # Calculate the right deployment target for this build.
4673 #
4674 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4675 if test ${cur_target} '>' 10.2; then
4676 cur_target=10.3
4677 fi
4678 if test "${UNIVERSAL_ARCHS}" = "all"; then
4679 # Ensure that the default platform for a 4-way
4680 # universal build is OSX 10.5, that's the first
4681 # OS release where 4-way builds make sense.
4682 cur_target='10.5'
4683 fi
4684 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4685
4686 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4687 # environment with a value that is the same as what we'll use
4688 # in the Makefile to ensure that we'll get the same compiler
4689 # environment during configure and build time.
4690 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4691 export MACOSX_DEPLOYMENT_TARGET
4692 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4693
4694 ;;
4695 OSF*)
4696 BASECFLAGS="$BASECFLAGS -mieee"
4697 ;;
4698 esac
4699 ;;
4700
4701*)
4702 case $ac_sys_system in
4703 OpenUNIX*|UnixWare*)
4704 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4705 ;;
4706 OSF*)
4707 BASECFLAGS="$BASECFLAGS -ieee -std"
4708 ;;
4709 SCO_SV*)
4710 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4711 ;;
4712 esac
4713 ;;
4714esac
4715
4716if test "$Py_DEBUG" = 'true'; then
4717 :
4718else
4719 OPT="-DNDEBUG $OPT"
4720fi
4721
4722if test "$ac_arch_flags"
4723then
4724 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4725fi
4726
4727# disable check for icc since it seems to pass, but generates a warning
4728if test "$CC" = icc
4729then
4730 ac_cv_opt_olimit_ok=no
4731fi
4732
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004733{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4734echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004735if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004736 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004737else
4738 ac_save_cc="$CC"
4739CC="$CC -OPT:Olimit=0"
4740if test "$cross_compiling" = yes; then
4741 ac_cv_opt_olimit_ok=no
4742else
4743 cat >conftest.$ac_ext <<_ACEOF
4744/* confdefs.h. */
4745_ACEOF
4746cat confdefs.h >>conftest.$ac_ext
4747cat >>conftest.$ac_ext <<_ACEOF
4748/* end confdefs.h. */
4749int main() { return 0; }
4750_ACEOF
4751rm -f conftest$ac_exeext
4752if { (ac_try="$ac_link"
4753case "(($ac_try" in
4754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4755 *) ac_try_echo=$ac_try;;
4756esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004758 (eval "$ac_link") 2>&5
4759 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4762 { (case "(($ac_try" in
4763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4764 *) ac_try_echo=$ac_try;;
4765esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004767 (eval "$ac_try") 2>&5
4768 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770 (exit $ac_status); }; }; then
4771 ac_cv_opt_olimit_ok=yes
4772else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004773 echo "$as_me: program exited with status $ac_status" >&5
4774echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004775sed 's/^/| /' conftest.$ac_ext >&5
4776
4777( exit $ac_status )
4778ac_cv_opt_olimit_ok=no
4779fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4781fi
4782
4783
4784CC="$ac_save_cc"
4785fi
4786
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004787{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4788echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004789if test $ac_cv_opt_olimit_ok = yes; then
4790 case $ac_sys_system in
4791 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4792 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4793 # environment?
4794 Darwin*)
4795 ;;
4796 *)
4797 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4798 ;;
4799 esac
4800else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004801 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4802echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004803 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004804 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004805else
4806 ac_save_cc="$CC"
4807 CC="$CC -Olimit 1500"
4808 if test "$cross_compiling" = yes; then
4809 ac_cv_olimit_ok=no
4810else
4811 cat >conftest.$ac_ext <<_ACEOF
4812/* confdefs.h. */
4813_ACEOF
4814cat confdefs.h >>conftest.$ac_ext
4815cat >>conftest.$ac_ext <<_ACEOF
4816/* end confdefs.h. */
4817int main() { return 0; }
4818_ACEOF
4819rm -f conftest$ac_exeext
4820if { (ac_try="$ac_link"
4821case "(($ac_try" in
4822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4823 *) ac_try_echo=$ac_try;;
4824esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004826 (eval "$ac_link") 2>&5
4827 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004829 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4830 { (case "(($ac_try" in
4831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4832 *) ac_try_echo=$ac_try;;
4833esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835 (eval "$ac_try") 2>&5
4836 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004838 (exit $ac_status); }; }; then
4839 ac_cv_olimit_ok=yes
4840else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004841 echo "$as_me: program exited with status $ac_status" >&5
4842echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004843sed 's/^/| /' conftest.$ac_ext >&5
4844
4845( exit $ac_status )
4846ac_cv_olimit_ok=no
4847fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4849fi
4850
4851
4852 CC="$ac_save_cc"
4853fi
4854
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004855 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4856echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 if test $ac_cv_olimit_ok = yes; then
4858 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4859 fi
4860fi
4861
4862# Check whether GCC supports PyArg_ParseTuple format
4863if test "$GCC" = "yes"
4864then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004865 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4866echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 save_CFLAGS=$CFLAGS
4868 CFLAGS="$CFLAGS -Werror"
4869 cat >conftest.$ac_ext <<_ACEOF
4870/* confdefs.h. */
4871_ACEOF
4872cat confdefs.h >>conftest.$ac_ext
4873cat >>conftest.$ac_ext <<_ACEOF
4874/* end confdefs.h. */
4875
4876 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4877
4878int
4879main ()
4880{
4881
4882 ;
4883 return 0;
4884}
4885_ACEOF
4886rm -f conftest.$ac_objext
4887if { (ac_try="$ac_compile"
4888case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4891esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893 (eval "$ac_compile") 2>conftest.er1
4894 ac_status=$?
4895 grep -v '^ *+' conftest.er1 >conftest.err
4896 rm -f conftest.er1
4897 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004899 (exit $ac_status); } && {
4900 test -z "$ac_c_werror_flag" ||
4901 test ! -s conftest.err
4902 } && test -s conftest.$ac_objext; then
4903
4904cat >>confdefs.h <<\_ACEOF
4905#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4906_ACEOF
4907
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004908 { echo "$as_me:$LINENO: result: yes" >&5
4909echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004911 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004912sed 's/^/| /' conftest.$ac_ext >&5
4913
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004914 { echo "$as_me:$LINENO: result: no" >&5
4915echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004916
4917fi
4918
4919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4920 CFLAGS=$save_CFLAGS
4921fi
4922
4923# On some compilers, pthreads are available without further options
4924# (e.g. MacOS X). On some of these systems, the compiler will not
4925# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4926# So we have to see first whether pthreads are available without
4927# options before we can check whether -Kpthread improves anything.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004928{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4929echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004930if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004931 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004932else
4933 if test "$cross_compiling" = yes; then
4934 ac_cv_pthread_is_default=no
4935else
4936 cat >conftest.$ac_ext <<_ACEOF
4937/* confdefs.h. */
4938_ACEOF
4939cat confdefs.h >>conftest.$ac_ext
4940cat >>conftest.$ac_ext <<_ACEOF
4941/* end confdefs.h. */
4942
4943#include <pthread.h>
4944
4945void* routine(void* p){return NULL;}
4946
4947int main(){
4948 pthread_t p;
4949 if(pthread_create(&p,NULL,routine,NULL)!=0)
4950 return 1;
4951 (void)pthread_detach(p);
4952 return 0;
4953}
4954
4955_ACEOF
4956rm -f conftest$ac_exeext
4957if { (ac_try="$ac_link"
4958case "(($ac_try" in
4959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4960 *) ac_try_echo=$ac_try;;
4961esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004963 (eval "$ac_link") 2>&5
4964 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4967 { (case "(($ac_try" in
4968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4969 *) ac_try_echo=$ac_try;;
4970esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004972 (eval "$ac_try") 2>&5
4973 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 (exit $ac_status); }; }; then
4976
4977 ac_cv_pthread_is_default=yes
4978 ac_cv_kthread=no
4979 ac_cv_pthread=no
4980
4981else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004982 echo "$as_me: program exited with status $ac_status" >&5
4983echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004984sed 's/^/| /' conftest.$ac_ext >&5
4985
4986( exit $ac_status )
4987ac_cv_pthread_is_default=no
4988fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4990fi
4991
4992
4993
4994fi
4995
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004996{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4997echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004998
4999
5000if test $ac_cv_pthread_is_default = yes
5001then
5002 ac_cv_kpthread=no
5003else
5004# -Kpthread, if available, provides the right #defines
5005# and linker options to make pthread_create available
5006# Some compilers won't report that they do not support -Kpthread,
5007# so we need to run a program to see whether it really made the
5008# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005009{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5010echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005012 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013else
5014 ac_save_cc="$CC"
5015CC="$CC -Kpthread"
5016if test "$cross_compiling" = yes; then
5017 ac_cv_kpthread=no
5018else
5019 cat >conftest.$ac_ext <<_ACEOF
5020/* confdefs.h. */
5021_ACEOF
5022cat confdefs.h >>conftest.$ac_ext
5023cat >>conftest.$ac_ext <<_ACEOF
5024/* end confdefs.h. */
5025
5026#include <pthread.h>
5027
5028void* routine(void* p){return NULL;}
5029
5030int main(){
5031 pthread_t p;
5032 if(pthread_create(&p,NULL,routine,NULL)!=0)
5033 return 1;
5034 (void)pthread_detach(p);
5035 return 0;
5036}
5037
5038_ACEOF
5039rm -f conftest$ac_exeext
5040if { (ac_try="$ac_link"
5041case "(($ac_try" in
5042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5043 *) ac_try_echo=$ac_try;;
5044esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005046 (eval "$ac_link") 2>&5
5047 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5050 { (case "(($ac_try" in
5051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5052 *) ac_try_echo=$ac_try;;
5053esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005055 (eval "$ac_try") 2>&5
5056 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005058 (exit $ac_status); }; }; then
5059 ac_cv_kpthread=yes
5060else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005061 echo "$as_me: program exited with status $ac_status" >&5
5062echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063sed 's/^/| /' conftest.$ac_ext >&5
5064
5065( exit $ac_status )
5066ac_cv_kpthread=no
5067fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5069fi
5070
5071
5072CC="$ac_save_cc"
5073fi
5074
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005075{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5076echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077fi
5078
5079if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5080then
5081# -Kthread, if available, provides the right #defines
5082# and linker options to make pthread_create available
5083# Some compilers won't report that they do not support -Kthread,
5084# so we need to run a program to see whether it really made the
5085# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005086{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5087echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005088if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005089 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090else
5091 ac_save_cc="$CC"
5092CC="$CC -Kthread"
5093if test "$cross_compiling" = yes; then
5094 ac_cv_kthread=no
5095else
5096 cat >conftest.$ac_ext <<_ACEOF
5097/* confdefs.h. */
5098_ACEOF
5099cat confdefs.h >>conftest.$ac_ext
5100cat >>conftest.$ac_ext <<_ACEOF
5101/* end confdefs.h. */
5102
5103#include <pthread.h>
5104
5105void* routine(void* p){return NULL;}
5106
5107int main(){
5108 pthread_t p;
5109 if(pthread_create(&p,NULL,routine,NULL)!=0)
5110 return 1;
5111 (void)pthread_detach(p);
5112 return 0;
5113}
5114
5115_ACEOF
5116rm -f conftest$ac_exeext
5117if { (ac_try="$ac_link"
5118case "(($ac_try" in
5119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5120 *) ac_try_echo=$ac_try;;
5121esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005123 (eval "$ac_link") 2>&5
5124 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5127 { (case "(($ac_try" in
5128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5129 *) ac_try_echo=$ac_try;;
5130esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132 (eval "$ac_try") 2>&5
5133 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135 (exit $ac_status); }; }; then
5136 ac_cv_kthread=yes
5137else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005138 echo "$as_me: program exited with status $ac_status" >&5
5139echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140sed 's/^/| /' conftest.$ac_ext >&5
5141
5142( exit $ac_status )
5143ac_cv_kthread=no
5144fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5146fi
5147
5148
5149CC="$ac_save_cc"
5150fi
5151
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005152{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5153echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005154fi
5155
5156if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5157then
5158# -pthread, if available, provides the right #defines
5159# and linker options to make pthread_create available
5160# Some compilers won't report that they do not support -pthread,
5161# so we need to run a program to see whether it really made the
5162# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005163{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5164echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005165if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005166 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005167else
5168 ac_save_cc="$CC"
5169CC="$CC -pthread"
5170if test "$cross_compiling" = yes; then
5171 ac_cv_pthread=no
5172else
5173 cat >conftest.$ac_ext <<_ACEOF
5174/* confdefs.h. */
5175_ACEOF
5176cat confdefs.h >>conftest.$ac_ext
5177cat >>conftest.$ac_ext <<_ACEOF
5178/* end confdefs.h. */
5179
5180#include <pthread.h>
5181
5182void* routine(void* p){return NULL;}
5183
5184int main(){
5185 pthread_t p;
5186 if(pthread_create(&p,NULL,routine,NULL)!=0)
5187 return 1;
5188 (void)pthread_detach(p);
5189 return 0;
5190}
5191
5192_ACEOF
5193rm -f conftest$ac_exeext
5194if { (ac_try="$ac_link"
5195case "(($ac_try" in
5196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5197 *) ac_try_echo=$ac_try;;
5198esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200 (eval "$ac_link") 2>&5
5201 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5204 { (case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209 (eval "$ac_try") 2>&5
5210 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005212 (exit $ac_status); }; }; then
5213 ac_cv_pthread=yes
5214else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005215 echo "$as_me: program exited with status $ac_status" >&5
5216echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217sed 's/^/| /' conftest.$ac_ext >&5
5218
5219( exit $ac_status )
5220ac_cv_pthread=no
5221fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5223fi
5224
5225
5226CC="$ac_save_cc"
5227fi
5228
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005229{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5230echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005231fi
5232
5233# If we have set a CC compiler flag for thread support then
5234# check if it works for CXX, too.
5235ac_cv_cxx_thread=no
5236if test ! -z "$CXX"
5237then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005238{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5239echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240ac_save_cxx="$CXX"
5241
5242if test "$ac_cv_kpthread" = "yes"
5243then
5244 CXX="$CXX -Kpthread"
5245 ac_cv_cxx_thread=yes
5246elif test "$ac_cv_kthread" = "yes"
5247then
5248 CXX="$CXX -Kthread"
5249 ac_cv_cxx_thread=yes
5250elif test "$ac_cv_pthread" = "yes"
5251then
5252 CXX="$CXX -pthread"
5253 ac_cv_cxx_thread=yes
5254fi
5255
5256if test $ac_cv_cxx_thread = yes
5257then
5258 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5259 $CXX -c conftest.$ac_ext 2>&5
5260 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5261 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5262 then
5263 ac_cv_cxx_thread=yes
5264 else
5265 ac_cv_cxx_thread=no
5266 fi
5267 rm -fr conftest*
5268fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005269{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5270echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005271fi
5272CXX="$ac_save_cxx"
5273
5274
5275# checks for header files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005276{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5277echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005279 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280else
5281 cat >conftest.$ac_ext <<_ACEOF
5282/* confdefs.h. */
5283_ACEOF
5284cat confdefs.h >>conftest.$ac_ext
5285cat >>conftest.$ac_ext <<_ACEOF
5286/* end confdefs.h. */
5287#include <stdlib.h>
5288#include <stdarg.h>
5289#include <string.h>
5290#include <float.h>
5291
5292int
5293main ()
5294{
5295
5296 ;
5297 return 0;
5298}
5299_ACEOF
5300rm -f conftest.$ac_objext
5301if { (ac_try="$ac_compile"
5302case "(($ac_try" in
5303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5304 *) ac_try_echo=$ac_try;;
5305esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 (eval "$ac_compile") 2>conftest.er1
5308 ac_status=$?
5309 grep -v '^ *+' conftest.er1 >conftest.err
5310 rm -f conftest.er1
5311 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 (exit $ac_status); } && {
5314 test -z "$ac_c_werror_flag" ||
5315 test ! -s conftest.err
5316 } && test -s conftest.$ac_objext; then
5317 ac_cv_header_stdc=yes
5318else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005319 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320sed 's/^/| /' conftest.$ac_ext >&5
5321
5322 ac_cv_header_stdc=no
5323fi
5324
5325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5326
5327if test $ac_cv_header_stdc = yes; then
5328 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5329 cat >conftest.$ac_ext <<_ACEOF
5330/* confdefs.h. */
5331_ACEOF
5332cat confdefs.h >>conftest.$ac_ext
5333cat >>conftest.$ac_ext <<_ACEOF
5334/* end confdefs.h. */
5335#include <string.h>
5336
5337_ACEOF
5338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5339 $EGREP "memchr" >/dev/null 2>&1; then
5340 :
5341else
5342 ac_cv_header_stdc=no
5343fi
5344rm -f conftest*
5345
5346fi
5347
5348if test $ac_cv_header_stdc = yes; then
5349 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5350 cat >conftest.$ac_ext <<_ACEOF
5351/* confdefs.h. */
5352_ACEOF
5353cat confdefs.h >>conftest.$ac_ext
5354cat >>conftest.$ac_ext <<_ACEOF
5355/* end confdefs.h. */
5356#include <stdlib.h>
5357
5358_ACEOF
5359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5360 $EGREP "free" >/dev/null 2>&1; then
5361 :
5362else
5363 ac_cv_header_stdc=no
5364fi
5365rm -f conftest*
5366
5367fi
5368
5369if test $ac_cv_header_stdc = yes; then
5370 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5371 if test "$cross_compiling" = yes; then
5372 :
5373else
5374 cat >conftest.$ac_ext <<_ACEOF
5375/* confdefs.h. */
5376_ACEOF
5377cat confdefs.h >>conftest.$ac_ext
5378cat >>conftest.$ac_ext <<_ACEOF
5379/* end confdefs.h. */
5380#include <ctype.h>
5381#include <stdlib.h>
5382#if ((' ' & 0x0FF) == 0x020)
5383# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5384# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5385#else
5386# define ISLOWER(c) \
5387 (('a' <= (c) && (c) <= 'i') \
5388 || ('j' <= (c) && (c) <= 'r') \
5389 || ('s' <= (c) && (c) <= 'z'))
5390# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5391#endif
5392
5393#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5394int
5395main ()
5396{
5397 int i;
5398 for (i = 0; i < 256; i++)
5399 if (XOR (islower (i), ISLOWER (i))
5400 || toupper (i) != TOUPPER (i))
5401 return 2;
5402 return 0;
5403}
5404_ACEOF
5405rm -f conftest$ac_exeext
5406if { (ac_try="$ac_link"
5407case "(($ac_try" in
5408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5409 *) ac_try_echo=$ac_try;;
5410esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412 (eval "$ac_link") 2>&5
5413 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5416 { (case "(($ac_try" in
5417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418 *) ac_try_echo=$ac_try;;
5419esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005421 (eval "$ac_try") 2>&5
5422 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424 (exit $ac_status); }; }; then
5425 :
5426else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005427 echo "$as_me: program exited with status $ac_status" >&5
5428echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429sed 's/^/| /' conftest.$ac_ext >&5
5430
5431( exit $ac_status )
5432ac_cv_header_stdc=no
5433fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5435fi
5436
5437
5438fi
5439fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005440{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5441echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442if test $ac_cv_header_stdc = yes; then
5443
5444cat >>confdefs.h <<\_ACEOF
5445#define STDC_HEADERS 1
5446_ACEOF
5447
5448fi
5449
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005450# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5461 inttypes.h stdint.h unistd.h
5462do
5463as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5464{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5465echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5466if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5467 echo $ECHO_N "(cached) $ECHO_C" >&6
5468else
5469 cat >conftest.$ac_ext <<_ACEOF
5470/* confdefs.h. */
5471_ACEOF
5472cat confdefs.h >>conftest.$ac_ext
5473cat >>conftest.$ac_ext <<_ACEOF
5474/* end confdefs.h. */
5475$ac_includes_default
5476
5477#include <$ac_header>
5478_ACEOF
5479rm -f conftest.$ac_objext
5480if { (ac_try="$ac_compile"
5481case "(($ac_try" in
5482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5483 *) ac_try_echo=$ac_try;;
5484esac
5485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5486 (eval "$ac_compile") 2>conftest.er1
5487 ac_status=$?
5488 grep -v '^ *+' conftest.er1 >conftest.err
5489 rm -f conftest.er1
5490 cat conftest.err >&5
5491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5492 (exit $ac_status); } && {
5493 test -z "$ac_c_werror_flag" ||
5494 test ! -s conftest.err
5495 } && test -s conftest.$ac_objext; then
5496 eval "$as_ac_Header=yes"
5497else
5498 echo "$as_me: failed program was:" >&5
5499sed 's/^/| /' conftest.$ac_ext >&5
5500
5501 eval "$as_ac_Header=no"
5502fi
5503
5504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5505fi
5506ac_res=`eval echo '${'$as_ac_Header'}'`
5507 { echo "$as_me:$LINENO: result: $ac_res" >&5
5508echo "${ECHO_T}$ac_res" >&6; }
5509if test `eval echo '${'$as_ac_Header'}'` = yes; then
5510 cat >>confdefs.h <<_ACEOF
5511#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5512_ACEOF
5513
5514fi
5515
5516done
5517
5518
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519
Martin v. Löwis11437992002-04-12 09:54:03 +00005520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
Anthony Baxter8a560de2004-10-13 15:30:56 +00005555
Martin v. Löwisc3001752005-01-23 09:27:24 +00005556
Martin v. Löwis11017b12006-01-14 18:12:57 +00005557
Thomas Wouters477c8d52006-05-27 19:21:47 +00005558
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005559
5560
5561
5562
5563
5564
5565
5566
Thomas Wouters89f507f2006-12-13 04:49:30 +00005567
Christian Heimes043d6f62008-01-07 17:19:16 +00005568
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005569
5570
Christian Heimesbbe741d2008-03-28 10:53:29 +00005571
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005572
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005573for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5574fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005575ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005576shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005577unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005578sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5579sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005580sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005581sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005582sys/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 +00005583sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005584bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005585do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005586as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005587if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005588 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5589echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005590if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005591 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005592fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005593ac_res=`eval echo '${'$as_ac_Header'}'`
5594 { echo "$as_me:$LINENO: result: $ac_res" >&5
5595echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005596else
Martin v. Löwis11437992002-04-12 09:54:03 +00005597 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005598{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5599echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005601/* confdefs.h. */
5602_ACEOF
5603cat confdefs.h >>conftest.$ac_ext
5604cat >>conftest.$ac_ext <<_ACEOF
5605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005606$ac_includes_default
5607#include <$ac_header>
5608_ACEOF
5609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005610if { (ac_try="$ac_compile"
5611case "(($ac_try" in
5612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5613 *) ac_try_echo=$ac_try;;
5614esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005618 grep -v '^ *+' conftest.er1 >conftest.err
5619 rm -f conftest.er1
5620 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005622 (exit $ac_status); } && {
5623 test -z "$ac_c_werror_flag" ||
5624 test ! -s conftest.err
5625 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005626 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005627else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005629sed 's/^/| /' conftest.$ac_ext >&5
5630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005633
5634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005635{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5636echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005637
5638# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005639{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5640echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005641cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005642/* confdefs.h. */
5643_ACEOF
5644cat confdefs.h >>conftest.$ac_ext
5645cat >>conftest.$ac_ext <<_ACEOF
5646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005647#include <$ac_header>
5648_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005649if { (ac_try="$ac_cpp conftest.$ac_ext"
5650case "(($ac_try" in
5651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5652 *) ac_try_echo=$ac_try;;
5653esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005655 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005657 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 rm -f conftest.er1
5659 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005661 (exit $ac_status); } >/dev/null && {
5662 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5663 test ! -s conftest.err
5664 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_header_preproc=yes
5666else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005668sed 's/^/| /' conftest.$ac_ext >&5
5669
Martin v. Löwis11437992002-04-12 09:54:03 +00005670 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005672
Martin v. Löwis11437992002-04-12 09:54:03 +00005673rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005674{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5675echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005676
5677# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005678case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5679 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005680 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5681echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5682 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5683echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005684 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005685 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005686 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005687 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5688echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5689 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5690echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5691 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5692echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5693 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5694echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5695 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5696echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5698echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005699 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005700## -------------------------------------- ##
5701## Report this to http://bugs.python.org/ ##
5702## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005703_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005704 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005705 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005706esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005707{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5708echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005709if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005710 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005711else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005712 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005713fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005714ac_res=`eval echo '${'$as_ac_Header'}'`
5715 { echo "$as_me:$LINENO: result: $ac_res" >&5
5716echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005717
5718fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005719if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005720 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005721#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005722_ACEOF
5723
5724fi
5725
Guido van Rossum627b2d71993-12-24 10:39:16 +00005726done
5727
Martin v. Löwis11437992002-04-12 09:54:03 +00005728
5729
5730
5731
5732
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005733ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005734for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005735 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5736{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5737echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005738if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005739 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005740else
Martin v. Löwis11437992002-04-12 09:54:03 +00005741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747#include <sys/types.h>
5748#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005749
Martin v. Löwis11437992002-04-12 09:54:03 +00005750int
5751main ()
5752{
5753if ((DIR *) 0)
5754return 0;
5755 ;
5756 return 0;
5757}
5758_ACEOF
5759rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005760if { (ac_try="$ac_compile"
5761case "(($ac_try" in
5762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5763 *) ac_try_echo=$ac_try;;
5764esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005766 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005767 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005768 grep -v '^ *+' conftest.er1 >conftest.err
5769 rm -f conftest.er1
5770 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005772 (exit $ac_status); } && {
5773 test -z "$ac_c_werror_flag" ||
5774 test ! -s conftest.err
5775 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005776 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005777else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005778 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005779sed 's/^/| /' conftest.$ac_ext >&5
5780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005783
5784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005785fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005786ac_res=`eval echo '${'$as_ac_Header'}'`
5787 { echo "$as_me:$LINENO: result: $ac_res" >&5
5788echo "${ECHO_T}$ac_res" >&6; }
5789if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005790 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005791#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005792_ACEOF
5793
5794ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005795fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005796
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797done
5798# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5799if test $ac_header_dirent = dirent.h; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005800 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5801echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005802if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005803 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804else
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005806cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005807/* confdefs.h. */
5808_ACEOF
5809cat confdefs.h >>conftest.$ac_ext
5810cat >>conftest.$ac_ext <<_ACEOF
5811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005813/* Override any GCC internal prototype to avoid an error.
5814 Use char because int might match the return type of a GCC
5815 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005816#ifdef __cplusplus
5817extern "C"
5818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005819char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005820int
5821main ()
5822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005823return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005824 ;
5825 return 0;
5826}
5827_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005828for ac_lib in '' dir; do
5829 if test -z "$ac_lib"; then
5830 ac_res="none required"
5831 else
5832 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005833 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005834 fi
5835 rm -f conftest.$ac_objext conftest$ac_exeext
5836if { (ac_try="$ac_link"
5837case "(($ac_try" in
5838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5839 *) ac_try_echo=$ac_try;;
5840esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005842 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005843 ac_status=$?
5844 grep -v '^ *+' conftest.er1 >conftest.err
5845 rm -f conftest.er1
5846 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005848 (exit $ac_status); } && {
5849 test -z "$ac_c_werror_flag" ||
5850 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005851 } && test -s conftest$ac_exeext &&
5852 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005853 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005854else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005855 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005856sed 's/^/| /' conftest.$ac_ext >&5
5857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005858
Thomas Wouters477c8d52006-05-27 19:21:47 +00005859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005860
5861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5862 conftest$ac_exeext
5863 if test "${ac_cv_search_opendir+set}" = set; then
5864 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005866done
5867if test "${ac_cv_search_opendir+set}" = set; then
5868 :
5869else
5870 ac_cv_search_opendir=no
5871fi
5872rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005873LIBS=$ac_func_search_save_LIBS
5874fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005875{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5876echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005877ac_res=$ac_cv_search_opendir
5878if test "$ac_res" != no; then
5879 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005880
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005881fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005882
Michael W. Hudson54241132001-12-07 15:38:26 +00005883else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005884 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5885echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005886if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005887 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005888else
5889 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005890cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005897/* Override any GCC internal prototype to avoid an error.
5898 Use char because int might match the return type of a GCC
5899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005900#ifdef __cplusplus
5901extern "C"
5902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005903char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005904int
5905main ()
5906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005907return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005908 ;
5909 return 0;
5910}
5911_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005912for ac_lib in '' x; do
5913 if test -z "$ac_lib"; then
5914 ac_res="none required"
5915 else
5916 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005917 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005918 fi
5919 rm -f conftest.$ac_objext conftest$ac_exeext
5920if { (ac_try="$ac_link"
5921case "(($ac_try" in
5922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5923 *) ac_try_echo=$ac_try;;
5924esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005926 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005927 ac_status=$?
5928 grep -v '^ *+' conftest.er1 >conftest.err
5929 rm -f conftest.er1
5930 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005932 (exit $ac_status); } && {
5933 test -z "$ac_c_werror_flag" ||
5934 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005935 } && test -s conftest$ac_exeext &&
5936 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005937 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005938else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005939 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005940sed 's/^/| /' conftest.$ac_ext >&5
5941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005942
Thomas Wouters477c8d52006-05-27 19:21:47 +00005943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005944
5945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5946 conftest$ac_exeext
5947 if test "${ac_cv_search_opendir+set}" = set; then
5948 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005950done
5951if test "${ac_cv_search_opendir+set}" = set; then
5952 :
5953else
5954 ac_cv_search_opendir=no
5955fi
5956rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005957LIBS=$ac_func_search_save_LIBS
5958fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005959{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5960echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005961ac_res=$ac_cv_search_opendir
5962if test "$ac_res" != no; then
5963 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005965fi
5966
5967fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005968
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005969{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5970echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005971if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005972 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005973else
5974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005975/* confdefs.h. */
5976_ACEOF
5977cat confdefs.h >>conftest.$ac_ext
5978cat >>conftest.$ac_ext <<_ACEOF
5979/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005980#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005981int
5982main ()
5983{
5984return makedev(0, 0);
5985 ;
5986 return 0;
5987}
5988_ACEOF
5989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005990if { (ac_try="$ac_link"
5991case "(($ac_try" in
5992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5993 *) ac_try_echo=$ac_try;;
5994esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005996 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005998 grep -v '^ *+' conftest.er1 >conftest.err
5999 rm -f conftest.er1
6000 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006002 (exit $ac_status); } && {
6003 test -z "$ac_c_werror_flag" ||
6004 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006005 } && test -s conftest$ac_exeext &&
6006 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006007 ac_cv_header_sys_types_h_makedev=yes
6008else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006010sed 's/^/| /' conftest.$ac_ext >&5
6011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006012 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006014
6015rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006017
6018fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006019{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6020echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006021
6022if test $ac_cv_header_sys_types_h_makedev = no; then
6023if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006024 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6025echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006026if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006027 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006029{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6030echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031else
6032 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006033{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6034echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006036/* confdefs.h. */
6037_ACEOF
6038cat confdefs.h >>conftest.$ac_ext
6039cat >>conftest.$ac_ext <<_ACEOF
6040/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041$ac_includes_default
6042#include <sys/mkdev.h>
6043_ACEOF
6044rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006045if { (ac_try="$ac_compile"
6046case "(($ac_try" in
6047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6048 *) ac_try_echo=$ac_try;;
6049esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006051 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006053 grep -v '^ *+' conftest.er1 >conftest.err
6054 rm -f conftest.er1
6055 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006057 (exit $ac_status); } && {
6058 test -z "$ac_c_werror_flag" ||
6059 test ! -s conftest.err
6060 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006061 ac_header_compiler=yes
6062else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006064sed 's/^/| /' conftest.$ac_ext >&5
6065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006068
6069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006070{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6071echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006072
6073# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006074{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6075echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006077/* confdefs.h. */
6078_ACEOF
6079cat confdefs.h >>conftest.$ac_ext
6080cat >>conftest.$ac_ext <<_ACEOF
6081/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082#include <sys/mkdev.h>
6083_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084if { (ac_try="$ac_cpp conftest.$ac_ext"
6085case "(($ac_try" in
6086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6087 *) ac_try_echo=$ac_try;;
6088esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006090 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006092 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093 rm -f conftest.er1
6094 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006096 (exit $ac_status); } >/dev/null && {
6097 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6098 test ! -s conftest.err
6099 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_header_preproc=yes
6101else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006103sed 's/^/| /' conftest.$ac_ext >&5
6104
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006105 ac_header_preproc=no
6106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006107
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006109{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6110echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111
6112# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6114 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006115 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6116echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6117 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6118echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006119 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006120 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006122 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6123echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6124 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6125echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6127echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6129echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006135## -------------------------------------- ##
6136## Report this to http://bugs.python.org/ ##
6137## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006138_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006139 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006140 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006141esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006142{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6143echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006145 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006146else
6147 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6148fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006149{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6150echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151
6152fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006153if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154
6155cat >>confdefs.h <<\_ACEOF
6156#define MAJOR_IN_MKDEV 1
6157_ACEOF
6158
6159fi
6160
6161
6162
6163 if test $ac_cv_header_sys_mkdev_h = no; then
6164 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006165 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6166echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006167if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006168 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006170{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6171echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006172else
6173 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006174{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6175echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006177/* confdefs.h. */
6178_ACEOF
6179cat confdefs.h >>conftest.$ac_ext
6180cat >>conftest.$ac_ext <<_ACEOF
6181/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182$ac_includes_default
6183#include <sys/sysmacros.h>
6184_ACEOF
6185rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186if { (ac_try="$ac_compile"
6187case "(($ac_try" in
6188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6189 *) ac_try_echo=$ac_try;;
6190esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006194 grep -v '^ *+' conftest.er1 >conftest.err
6195 rm -f conftest.er1
6196 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006198 (exit $ac_status); } && {
6199 test -z "$ac_c_werror_flag" ||
6200 test ! -s conftest.err
6201 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202 ac_header_compiler=yes
6203else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006205sed 's/^/| /' conftest.$ac_ext >&5
6206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006209
6210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006211{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6212echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213
6214# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006215{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6216echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006218/* confdefs.h. */
6219_ACEOF
6220cat confdefs.h >>conftest.$ac_ext
6221cat >>conftest.$ac_ext <<_ACEOF
6222/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223#include <sys/sysmacros.h>
6224_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006225if { (ac_try="$ac_cpp conftest.$ac_ext"
6226case "(($ac_try" in
6227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6228 *) ac_try_echo=$ac_try;;
6229esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006233 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234 rm -f conftest.er1
6235 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006237 (exit $ac_status); } >/dev/null && {
6238 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6239 test ! -s conftest.err
6240 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 ac_header_preproc=yes
6242else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006244sed 's/^/| /' conftest.$ac_ext >&5
6245
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006246 ac_header_preproc=no
6247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006250{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6251echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252
6253# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6255 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006256 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6257echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6258 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6259echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006260 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006261 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006262 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006263 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6264echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6265 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6266echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6267 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6268echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6269 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6270echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006275 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006276## -------------------------------------- ##
6277## Report this to http://bugs.python.org/ ##
6278## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006279_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006280 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006281 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006282esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006283{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6284echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006286 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287else
6288 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6289fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006290{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6291echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292
6293fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006294if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295
6296cat >>confdefs.h <<\_ACEOF
6297#define MAJOR_IN_SYSMACROS 1
6298_ACEOF
6299
6300fi
6301
6302
6303 fi
6304fi
6305
Michael W. Hudson54241132001-12-07 15:38:26 +00006306
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006307# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006308
6309for ac_header in term.h
6310do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006311as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6312{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6313echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006314if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006315 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006316else
6317 cat >conftest.$ac_ext <<_ACEOF
6318/* confdefs.h. */
6319_ACEOF
6320cat confdefs.h >>conftest.$ac_ext
6321cat >>conftest.$ac_ext <<_ACEOF
6322/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006323
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006324#ifdef HAVE_CURSES_H
6325#include <curses.h>
6326#endif
6327
6328
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006329#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006330_ACEOF
6331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332if { (ac_try="$ac_compile"
6333case "(($ac_try" in
6334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6335 *) ac_try_echo=$ac_try;;
6336esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006339 ac_status=$?
6340 grep -v '^ *+' conftest.er1 >conftest.err
6341 rm -f conftest.er1
6342 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006344 (exit $ac_status); } && {
6345 test -z "$ac_c_werror_flag" ||
6346 test ! -s conftest.err
6347 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006348 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006349else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006350 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006351sed 's/^/| /' conftest.$ac_ext >&5
6352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006355
6356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006357fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006358ac_res=`eval echo '${'$as_ac_Header'}'`
6359 { echo "$as_me:$LINENO: result: $ac_res" >&5
6360echo "${ECHO_T}$ac_res" >&6; }
6361if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006362 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006364_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006366fi
6367
6368done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369
6370
Martin v. Löwis11017b12006-01-14 18:12:57 +00006371# On Linux, netlink.h requires asm/types.h
6372
6373for ac_header in linux/netlink.h
6374do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006375as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6376{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6377echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006378if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006380else
6381 cat >conftest.$ac_ext <<_ACEOF
6382/* confdefs.h. */
6383_ACEOF
6384cat confdefs.h >>conftest.$ac_ext
6385cat >>conftest.$ac_ext <<_ACEOF
6386/* end confdefs.h. */
6387
6388#ifdef HAVE_ASM_TYPES_H
6389#include <asm/types.h>
6390#endif
6391#ifdef HAVE_SYS_SOCKET_H
6392#include <sys/socket.h>
6393#endif
6394
6395
6396#include <$ac_header>
6397_ACEOF
6398rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006406 ac_status=$?
6407 grep -v '^ *+' conftest.er1 >conftest.err
6408 rm -f conftest.er1
6409 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006411 (exit $ac_status); } && {
6412 test -z "$ac_c_werror_flag" ||
6413 test ! -s conftest.err
6414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006415 eval "$as_ac_Header=yes"
6416else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006417 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418sed 's/^/| /' conftest.$ac_ext >&5
6419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006424fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006425ac_res=`eval echo '${'$as_ac_Header'}'`
6426 { echo "$as_me:$LINENO: result: $ac_res" >&5
6427echo "${ECHO_T}$ac_res" >&6; }
6428if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006430#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006431_ACEOF
6432
6433fi
6434
6435done
6436
6437
Guido van Rossum627b2d71993-12-24 10:39:16 +00006438# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006439was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006440{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6441echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006442cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006443/* confdefs.h. */
6444_ACEOF
6445cat confdefs.h >>conftest.$ac_ext
6446cat >>conftest.$ac_ext <<_ACEOF
6447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
6450_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006452 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006453 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006454else
Martin v. Löwis11437992002-04-12 09:54:03 +00006455
6456
6457cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006459_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006461
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462fi
6463rm -f conftest*
6464
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006465{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6466echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006467
Neal Norwitz11690112002-07-30 01:08:28 +00006468# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006469{ echo "$as_me:$LINENO: checking for makedev" >&5
6470echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006472/* confdefs.h. */
6473_ACEOF
6474cat confdefs.h >>conftest.$ac_ext
6475cat >>conftest.$ac_ext <<_ACEOF
6476/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006477#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006478int
6479main ()
6480{
6481 makedev(0, 0)
6482 ;
6483 return 0;
6484}
6485_ACEOF
6486rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006487if { (ac_try="$ac_link"
6488case "(($ac_try" in
6489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6490 *) ac_try_echo=$ac_try;;
6491esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006495 grep -v '^ *+' conftest.er1 >conftest.err
6496 rm -f conftest.er1
6497 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006499 (exit $ac_status); } && {
6500 test -z "$ac_c_werror_flag" ||
6501 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006502 } && test -s conftest$ac_exeext &&
6503 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006504 ac_cv_has_makedev=yes
6505else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006507sed 's/^/| /' conftest.$ac_ext >&5
6508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006511
6512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006513 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006514if test "$ac_cv_has_makedev" = "no"; then
6515 # we didn't link, try if _OSF_SOURCE will allow us to link
6516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* confdefs.h. */
6518_ACEOF
6519cat confdefs.h >>conftest.$ac_ext
6520cat >>conftest.$ac_ext <<_ACEOF
6521/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006522
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006523#define _OSF_SOURCE 1
6524#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006525
Neal Norwitz11690112002-07-30 01:08:28 +00006526int
6527main ()
6528{
6529 makedev(0, 0)
6530 ;
6531 return 0;
6532}
6533_ACEOF
6534rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535if { (ac_try="$ac_link"
6536case "(($ac_try" in
6537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6538 *) ac_try_echo=$ac_try;;
6539esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006541 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006543 grep -v '^ *+' conftest.er1 >conftest.err
6544 rm -f conftest.er1
6545 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547 (exit $ac_status); } && {
6548 test -z "$ac_c_werror_flag" ||
6549 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006550 } && test -s conftest$ac_exeext &&
6551 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006552 ac_cv_has_makedev=yes
6553else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006555sed 's/^/| /' conftest.$ac_ext >&5
6556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006557 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006559
6560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006561 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006562 if test "$ac_cv_has_makedev" = "yes"; then
6563
6564cat >>confdefs.h <<\_ACEOF
6565#define _OSF_SOURCE 1
6566_ACEOF
6567
6568 fi
6569fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006570{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6571echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006572if test "$ac_cv_has_makedev" = "yes"; then
6573
6574cat >>confdefs.h <<\_ACEOF
6575#define HAVE_MAKEDEV 1
6576_ACEOF
6577
6578fi
6579
Martin v. Löwis399a6892002-10-04 10:22:02 +00006580# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6581# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6582# defined, but the compiler does not support pragma redefine_extname,
6583# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6584# structures (such as rlimit64) without declaring them. As a
6585# work-around, disable LFS on such configurations
6586
6587use_lfs=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006588{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6589echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006591/* confdefs.h. */
6592_ACEOF
6593cat confdefs.h >>conftest.$ac_ext
6594cat >>conftest.$ac_ext <<_ACEOF
6595/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006596
6597#define _LARGEFILE_SOURCE 1
6598#define _FILE_OFFSET_BITS 64
6599#include <sys/resource.h>
6600
Martin v. Löwis399a6892002-10-04 10:22:02 +00006601int
6602main ()
6603{
6604struct rlimit foo;
6605 ;
6606 return 0;
6607}
6608_ACEOF
6609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006610if { (ac_try="$ac_compile"
6611case "(($ac_try" in
6612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6613 *) ac_try_echo=$ac_try;;
6614esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006616 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006618 grep -v '^ *+' conftest.er1 >conftest.err
6619 rm -f conftest.er1
6620 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006622 (exit $ac_status); } && {
6623 test -z "$ac_c_werror_flag" ||
6624 test ! -s conftest.err
6625 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006626 sol_lfs_bug=no
6627else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006629sed 's/^/| /' conftest.$ac_ext >&5
6630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633
6634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006635{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6636echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006637if test "$sol_lfs_bug" = "yes"; then
6638 use_lfs=no
6639fi
6640
6641if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006642# Two defines needed to enable largefile support on various platforms
6643# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006644
Martin v. Löwis11437992002-04-12 09:54:03 +00006645cat >>confdefs.h <<\_ACEOF
6646#define _LARGEFILE_SOURCE 1
6647_ACEOF
6648
6649
6650cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006651#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006652_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006653
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006655
Guido van Rossum84e7b241996-08-19 21:59:00 +00006656# Add some code to confdefs.h so that the test for off_t works on SCO
6657cat >> confdefs.h <<\EOF
6658#if defined(SCO_DS)
6659#undef _OFF_T
6660#endif
6661EOF
6662
Guido van Rossumef2255b2000-03-10 22:30:29 +00006663# Type availability checks
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006664{ echo "$as_me:$LINENO: checking for mode_t" >&5
6665echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006666if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006667 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006668else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669 cat >conftest.$ac_ext <<_ACEOF
6670/* confdefs.h. */
6671_ACEOF
6672cat confdefs.h >>conftest.$ac_ext
6673cat >>conftest.$ac_ext <<_ACEOF
6674/* end confdefs.h. */
6675$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006676typedef mode_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677int
6678main ()
6679{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006680if ((ac__type_new_ *) 0)
6681 return 0;
6682if (sizeof (ac__type_new_))
6683 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684 ;
6685 return 0;
6686}
6687_ACEOF
6688rm -f conftest.$ac_objext
6689if { (ac_try="$ac_compile"
6690case "(($ac_try" in
6691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6692 *) ac_try_echo=$ac_try;;
6693esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695 (eval "$ac_compile") 2>conftest.er1
6696 ac_status=$?
6697 grep -v '^ *+' conftest.er1 >conftest.err
6698 rm -f conftest.er1
6699 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701 (exit $ac_status); } && {
6702 test -z "$ac_c_werror_flag" ||
6703 test ! -s conftest.err
6704 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006705 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006706else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006708sed 's/^/| /' conftest.$ac_ext >&5
6709
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006710 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006712
6713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006714fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006715{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6716echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6717if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006719else
Martin v. Löwis11437992002-04-12 09:54:03 +00006720
6721cat >>confdefs.h <<_ACEOF
6722#define mode_t int
6723_ACEOF
6724
6725fi
6726
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006727{ echo "$as_me:$LINENO: checking for off_t" >&5
6728echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006729if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006730 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006731else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 cat >conftest.$ac_ext <<_ACEOF
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
6738$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006739typedef off_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740int
6741main ()
6742{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006743if ((ac__type_new_ *) 0)
6744 return 0;
6745if (sizeof (ac__type_new_))
6746 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 ;
6748 return 0;
6749}
6750_ACEOF
6751rm -f conftest.$ac_objext
6752if { (ac_try="$ac_compile"
6753case "(($ac_try" in
6754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6755 *) ac_try_echo=$ac_try;;
6756esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758 (eval "$ac_compile") 2>conftest.er1
6759 ac_status=$?
6760 grep -v '^ *+' conftest.er1 >conftest.err
6761 rm -f conftest.er1
6762 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 (exit $ac_status); } && {
6765 test -z "$ac_c_werror_flag" ||
6766 test ! -s conftest.err
6767 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006768 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006769else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006771sed 's/^/| /' conftest.$ac_ext >&5
6772
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006773 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006775
6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006777fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006778{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6779echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6780if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006781 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006782else
Martin v. Löwis11437992002-04-12 09:54:03 +00006783
6784cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006786_ACEOF
6787
6788fi
6789
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006790{ echo "$as_me:$LINENO: checking for pid_t" >&5
6791echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006792if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006793 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795 cat >conftest.$ac_ext <<_ACEOF
6796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
6801$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006802typedef pid_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803int
6804main ()
6805{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006806if ((ac__type_new_ *) 0)
6807 return 0;
6808if (sizeof (ac__type_new_))
6809 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810 ;
6811 return 0;
6812}
6813_ACEOF
6814rm -f conftest.$ac_objext
6815if { (ac_try="$ac_compile"
6816case "(($ac_try" in
6817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6818 *) ac_try_echo=$ac_try;;
6819esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821 (eval "$ac_compile") 2>conftest.er1
6822 ac_status=$?
6823 grep -v '^ *+' conftest.er1 >conftest.err
6824 rm -f conftest.er1
6825 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 (exit $ac_status); } && {
6828 test -z "$ac_c_werror_flag" ||
6829 test ! -s conftest.err
6830 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006831 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006832else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006834sed 's/^/| /' conftest.$ac_ext >&5
6835
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006836 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006838
6839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006840fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006841{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6842echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6843if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006845else
Martin v. Löwis11437992002-04-12 09:54:03 +00006846
6847cat >>confdefs.h <<_ACEOF
6848#define pid_t int
6849_ACEOF
6850
6851fi
6852
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006853{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6854echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006855if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006856 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006857else
6858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006859/* confdefs.h. */
6860_ACEOF
6861cat confdefs.h >>conftest.$ac_ext
6862cat >>conftest.$ac_ext <<_ACEOF
6863/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006864#include <sys/types.h>
6865#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867int
6868main ()
6869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006871 ;
6872 return 0;
6873}
6874_ACEOF
6875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876if { (ac_try="$ac_compile"
6877case "(($ac_try" in
6878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6879 *) ac_try_echo=$ac_try;;
6880esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006884 grep -v '^ *+' conftest.er1 >conftest.err
6885 rm -f conftest.er1
6886 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006888 (exit $ac_status); } && {
6889 test -z "$ac_c_werror_flag" ||
6890 test ! -s conftest.err
6891 } && test -s conftest.$ac_objext; then
6892 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006893else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006894 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006895sed 's/^/| /' conftest.$ac_ext >&5
6896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006899
6900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006902{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6903echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006904
Martin v. Löwis11437992002-04-12 09:54:03 +00006905cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006906#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908
Michael W. Hudson54241132001-12-07 15:38:26 +00006909
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006910{ echo "$as_me:$LINENO: checking for size_t" >&5
6911echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006912if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006914else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915 cat >conftest.$ac_ext <<_ACEOF
6916/* confdefs.h. */
6917_ACEOF
6918cat confdefs.h >>conftest.$ac_ext
6919cat >>conftest.$ac_ext <<_ACEOF
6920/* end confdefs.h. */
6921$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006922typedef size_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006923int
6924main ()
6925{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006926if ((ac__type_new_ *) 0)
6927 return 0;
6928if (sizeof (ac__type_new_))
6929 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (ac_try="$ac_compile"
6936case "(($ac_try" in
6937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6938 *) ac_try_echo=$ac_try;;
6939esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941 (eval "$ac_compile") 2>conftest.er1
6942 ac_status=$?
6943 grep -v '^ *+' conftest.er1 >conftest.err
6944 rm -f conftest.er1
6945 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947 (exit $ac_status); } && {
6948 test -z "$ac_c_werror_flag" ||
6949 test ! -s conftest.err
6950 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006951 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006954sed 's/^/| /' conftest.$ac_ext >&5
6955
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006956 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958
6959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006960fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006961{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6962echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6963if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006965else
Martin v. Löwis11437992002-04-12 09:54:03 +00006966
6967cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006969_ACEOF
6970
6971fi
6972
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006973{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6974echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006975if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006976 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006977else
6978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006979/* confdefs.h. */
6980_ACEOF
6981cat confdefs.h >>conftest.$ac_ext
6982cat >>conftest.$ac_ext <<_ACEOF
6983/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
6986_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006988 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989 ac_cv_type_uid_t=yes
6990else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991 ac_cv_type_uid_t=no
6992fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006993rm -f conftest*
6994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006995fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006996{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6997echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006998if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999
Martin v. Löwis11437992002-04-12 09:54:03 +00007000cat >>confdefs.h <<\_ACEOF
7001#define uid_t int
7002_ACEOF
7003
7004
7005cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007007_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007008
7009fi
7010
Mark Dickinsonbd792642009-03-18 20:06:12 +00007011
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007012 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7013echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007014if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007015 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007016else
7017 ac_cv_c_uint32_t=no
7018 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7019 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7020 cat >conftest.$ac_ext <<_ACEOF
7021/* confdefs.h. */
7022_ACEOF
7023cat confdefs.h >>conftest.$ac_ext
7024cat >>conftest.$ac_ext <<_ACEOF
7025/* end confdefs.h. */
7026$ac_includes_default
7027int
7028main ()
7029{
7030static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7031test_array [0] = 0
7032
7033 ;
7034 return 0;
7035}
7036_ACEOF
7037rm -f conftest.$ac_objext
7038if { (ac_try="$ac_compile"
7039case "(($ac_try" in
7040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7041 *) ac_try_echo=$ac_try;;
7042esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007044 (eval "$ac_compile") 2>conftest.er1
7045 ac_status=$?
7046 grep -v '^ *+' conftest.er1 >conftest.err
7047 rm -f conftest.er1
7048 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007050 (exit $ac_status); } && {
7051 test -z "$ac_c_werror_flag" ||
7052 test ! -s conftest.err
7053 } && test -s conftest.$ac_objext; then
7054 case $ac_type in
7055 uint32_t) ac_cv_c_uint32_t=yes ;;
7056 *) ac_cv_c_uint32_t=$ac_type ;;
7057esac
7058
7059else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007060 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007061sed 's/^/| /' conftest.$ac_ext >&5
7062
7063
7064fi
7065
7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7067 test "$ac_cv_c_uint32_t" != no && break
7068 done
7069fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007070{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7071echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007072 case $ac_cv_c_uint32_t in #(
7073 no|yes) ;; #(
7074 *)
7075
7076cat >>confdefs.h <<\_ACEOF
7077#define _UINT32_T 1
7078_ACEOF
7079
7080
7081cat >>confdefs.h <<_ACEOF
7082#define uint32_t $ac_cv_c_uint32_t
7083_ACEOF
7084;;
7085 esac
7086
7087
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007088 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7089echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007090if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007091 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007092else
7093 ac_cv_c_uint64_t=no
7094 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7095 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7096 cat >conftest.$ac_ext <<_ACEOF
7097/* confdefs.h. */
7098_ACEOF
7099cat confdefs.h >>conftest.$ac_ext
7100cat >>conftest.$ac_ext <<_ACEOF
7101/* end confdefs.h. */
7102$ac_includes_default
7103int
7104main ()
7105{
7106static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7107test_array [0] = 0
7108
7109 ;
7110 return 0;
7111}
7112_ACEOF
7113rm -f conftest.$ac_objext
7114if { (ac_try="$ac_compile"
7115case "(($ac_try" in
7116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7117 *) ac_try_echo=$ac_try;;
7118esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007120 (eval "$ac_compile") 2>conftest.er1
7121 ac_status=$?
7122 grep -v '^ *+' conftest.er1 >conftest.err
7123 rm -f conftest.er1
7124 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007126 (exit $ac_status); } && {
7127 test -z "$ac_c_werror_flag" ||
7128 test ! -s conftest.err
7129 } && test -s conftest.$ac_objext; then
7130 case $ac_type in
7131 uint64_t) ac_cv_c_uint64_t=yes ;;
7132 *) ac_cv_c_uint64_t=$ac_type ;;
7133esac
7134
7135else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007136 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007137sed 's/^/| /' conftest.$ac_ext >&5
7138
7139
7140fi
7141
7142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7143 test "$ac_cv_c_uint64_t" != no && break
7144 done
7145fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007146{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7147echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007148 case $ac_cv_c_uint64_t in #(
7149 no|yes) ;; #(
7150 *)
7151
7152cat >>confdefs.h <<\_ACEOF
7153#define _UINT64_T 1
7154_ACEOF
7155
7156
7157cat >>confdefs.h <<_ACEOF
7158#define uint64_t $ac_cv_c_uint64_t
7159_ACEOF
7160;;
7161 esac
7162
7163
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007164 { echo "$as_me:$LINENO: checking for int32_t" >&5
7165echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007166if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007167 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007168else
7169 ac_cv_c_int32_t=no
7170 for ac_type in 'int32_t' 'int' 'long int' \
7171 'long long int' 'short int' 'signed char'; do
7172 cat >conftest.$ac_ext <<_ACEOF
7173/* confdefs.h. */
7174_ACEOF
7175cat confdefs.h >>conftest.$ac_ext
7176cat >>conftest.$ac_ext <<_ACEOF
7177/* end confdefs.h. */
7178$ac_includes_default
7179int
7180main ()
7181{
7182static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7183test_array [0] = 0
7184
7185 ;
7186 return 0;
7187}
7188_ACEOF
7189rm -f conftest.$ac_objext
7190if { (ac_try="$ac_compile"
7191case "(($ac_try" in
7192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7193 *) ac_try_echo=$ac_try;;
7194esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007196 (eval "$ac_compile") 2>conftest.er1
7197 ac_status=$?
7198 grep -v '^ *+' conftest.er1 >conftest.err
7199 rm -f conftest.er1
7200 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007202 (exit $ac_status); } && {
7203 test -z "$ac_c_werror_flag" ||
7204 test ! -s conftest.err
7205 } && test -s conftest.$ac_objext; then
7206 cat >conftest.$ac_ext <<_ACEOF
7207/* confdefs.h. */
7208_ACEOF
7209cat confdefs.h >>conftest.$ac_ext
7210cat >>conftest.$ac_ext <<_ACEOF
7211/* end confdefs.h. */
7212$ac_includes_default
7213int
7214main ()
7215{
7216static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007217 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007218test_array [0] = 0
7219
7220 ;
7221 return 0;
7222}
7223_ACEOF
7224rm -f conftest.$ac_objext
7225if { (ac_try="$ac_compile"
7226case "(($ac_try" in
7227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7228 *) ac_try_echo=$ac_try;;
7229esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007231 (eval "$ac_compile") 2>conftest.er1
7232 ac_status=$?
7233 grep -v '^ *+' conftest.er1 >conftest.err
7234 rm -f conftest.er1
7235 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007237 (exit $ac_status); } && {
7238 test -z "$ac_c_werror_flag" ||
7239 test ! -s conftest.err
7240 } && test -s conftest.$ac_objext; then
7241 :
7242else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007243 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007244sed 's/^/| /' conftest.$ac_ext >&5
7245
7246 case $ac_type in
7247 int32_t) ac_cv_c_int32_t=yes ;;
7248 *) ac_cv_c_int32_t=$ac_type ;;
7249esac
7250
7251fi
7252
7253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7254else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007255 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007256sed 's/^/| /' conftest.$ac_ext >&5
7257
7258
7259fi
7260
7261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7262 test "$ac_cv_c_int32_t" != no && break
7263 done
7264fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007265{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7266echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007267 case $ac_cv_c_int32_t in #(
7268 no|yes) ;; #(
7269 *)
7270
7271cat >>confdefs.h <<_ACEOF
7272#define int32_t $ac_cv_c_int32_t
7273_ACEOF
7274;;
7275 esac
7276
7277
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007278 { echo "$as_me:$LINENO: checking for int64_t" >&5
7279echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007280if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007281 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007282else
7283 ac_cv_c_int64_t=no
7284 for ac_type in 'int64_t' 'int' 'long int' \
7285 'long long int' 'short int' 'signed char'; do
7286 cat >conftest.$ac_ext <<_ACEOF
7287/* confdefs.h. */
7288_ACEOF
7289cat confdefs.h >>conftest.$ac_ext
7290cat >>conftest.$ac_ext <<_ACEOF
7291/* end confdefs.h. */
7292$ac_includes_default
7293int
7294main ()
7295{
7296static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7297test_array [0] = 0
7298
7299 ;
7300 return 0;
7301}
7302_ACEOF
7303rm -f conftest.$ac_objext
7304if { (ac_try="$ac_compile"
7305case "(($ac_try" in
7306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7307 *) ac_try_echo=$ac_try;;
7308esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007310 (eval "$ac_compile") 2>conftest.er1
7311 ac_status=$?
7312 grep -v '^ *+' conftest.er1 >conftest.err
7313 rm -f conftest.er1
7314 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007316 (exit $ac_status); } && {
7317 test -z "$ac_c_werror_flag" ||
7318 test ! -s conftest.err
7319 } && test -s conftest.$ac_objext; then
7320 cat >conftest.$ac_ext <<_ACEOF
7321/* confdefs.h. */
7322_ACEOF
7323cat confdefs.h >>conftest.$ac_ext
7324cat >>conftest.$ac_ext <<_ACEOF
7325/* end confdefs.h. */
7326$ac_includes_default
7327int
7328main ()
7329{
7330static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007331 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (ac_try="$ac_compile"
7340case "(($ac_try" in
7341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7342 *) ac_try_echo=$ac_try;;
7343esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007345 (eval "$ac_compile") 2>conftest.er1
7346 ac_status=$?
7347 grep -v '^ *+' conftest.er1 >conftest.err
7348 rm -f conftest.er1
7349 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007351 (exit $ac_status); } && {
7352 test -z "$ac_c_werror_flag" ||
7353 test ! -s conftest.err
7354 } && test -s conftest.$ac_objext; then
7355 :
7356else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007357 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007358sed 's/^/| /' conftest.$ac_ext >&5
7359
7360 case $ac_type in
7361 int64_t) ac_cv_c_int64_t=yes ;;
7362 *) ac_cv_c_int64_t=$ac_type ;;
7363esac
7364
7365fi
7366
7367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7368else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007369 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007370sed 's/^/| /' conftest.$ac_ext >&5
7371
7372
7373fi
7374
7375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7376 test "$ac_cv_c_int64_t" != no && break
7377 done
7378fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007379{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7380echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007381 case $ac_cv_c_int64_t in #(
7382 no|yes) ;; #(
7383 *)
7384
7385cat >>confdefs.h <<_ACEOF
7386#define int64_t $ac_cv_c_int64_t
7387_ACEOF
7388;;
7389 esac
7390
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007391{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7392echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007393if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007395else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396 cat >conftest.$ac_ext <<_ACEOF
7397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
7402$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007403typedef ssize_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404int
7405main ()
7406{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007407if ((ac__type_new_ *) 0)
7408 return 0;
7409if (sizeof (ac__type_new_))
7410 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 ;
7412 return 0;
7413}
7414_ACEOF
7415rm -f conftest.$ac_objext
7416if { (ac_try="$ac_compile"
7417case "(($ac_try" in
7418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7419 *) ac_try_echo=$ac_try;;
7420esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422 (eval "$ac_compile") 2>conftest.er1
7423 ac_status=$?
7424 grep -v '^ *+' conftest.er1 >conftest.err
7425 rm -f conftest.er1
7426 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428 (exit $ac_status); } && {
7429 test -z "$ac_c_werror_flag" ||
7430 test ! -s conftest.err
7431 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007432 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007433else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007434 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007435sed 's/^/| /' conftest.$ac_ext >&5
7436
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007437 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007439
7440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007441fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007442{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7443echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7444if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007445
7446cat >>confdefs.h <<\_ACEOF
7447#define HAVE_SSIZE_T 1
7448_ACEOF
7449
7450fi
7451
Jack Jansendd19cf82001-12-06 22:36:17 +00007452
Michael W. Hudson54241132001-12-07 15:38:26 +00007453# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007454# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007455{ echo "$as_me:$LINENO: checking for int" >&5
7456echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7457if test "${ac_cv_type_int+set}" = set; then
7458 echo $ECHO_N "(cached) $ECHO_C" >&6
7459else
7460 cat >conftest.$ac_ext <<_ACEOF
7461/* confdefs.h. */
7462_ACEOF
7463cat confdefs.h >>conftest.$ac_ext
7464cat >>conftest.$ac_ext <<_ACEOF
7465/* end confdefs.h. */
7466$ac_includes_default
7467typedef int ac__type_new_;
7468int
7469main ()
7470{
7471if ((ac__type_new_ *) 0)
7472 return 0;
7473if (sizeof (ac__type_new_))
7474 return 0;
7475 ;
7476 return 0;
7477}
7478_ACEOF
7479rm -f conftest.$ac_objext
7480if { (ac_try="$ac_compile"
7481case "(($ac_try" in
7482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7483 *) ac_try_echo=$ac_try;;
7484esac
7485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7486 (eval "$ac_compile") 2>conftest.er1
7487 ac_status=$?
7488 grep -v '^ *+' conftest.er1 >conftest.err
7489 rm -f conftest.er1
7490 cat conftest.err >&5
7491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7492 (exit $ac_status); } && {
7493 test -z "$ac_c_werror_flag" ||
7494 test ! -s conftest.err
7495 } && test -s conftest.$ac_objext; then
7496 ac_cv_type_int=yes
7497else
7498 echo "$as_me: failed program was:" >&5
7499sed 's/^/| /' conftest.$ac_ext >&5
7500
7501 ac_cv_type_int=no
7502fi
7503
7504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7505fi
7506{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7507echo "${ECHO_T}$ac_cv_type_int" >&6; }
7508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007509# The cast to long int works around a bug in the HP C Compiler
7510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7512# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007513{ echo "$as_me:$LINENO: checking size of int" >&5
7514echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007515if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007516 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007517else
Martin v. Löwis11437992002-04-12 09:54:03 +00007518 if test "$cross_compiling" = yes; then
7519 # Depending upon the size, compute the lo and hi bounds.
7520cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007521/* confdefs.h. */
7522_ACEOF
7523cat confdefs.h >>conftest.$ac_ext
7524cat >>conftest.$ac_ext <<_ACEOF
7525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007526$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007527 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007528int
7529main ()
7530{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007531static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007532test_array [0] = 0
7533
7534 ;
7535 return 0;
7536}
7537_ACEOF
7538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539if { (ac_try="$ac_compile"
7540case "(($ac_try" in
7541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7542 *) ac_try_echo=$ac_try;;
7543esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007547 grep -v '^ *+' conftest.er1 >conftest.err
7548 rm -f conftest.er1
7549 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551 (exit $ac_status); } && {
7552 test -z "$ac_c_werror_flag" ||
7553 test ! -s conftest.err
7554 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 ac_lo=0 ac_mid=0
7556 while :; do
7557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007558/* confdefs.h. */
7559_ACEOF
7560cat confdefs.h >>conftest.$ac_ext
7561cat >>conftest.$ac_ext <<_ACEOF
7562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007563$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007564 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007565int
7566main ()
7567{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007568static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007569test_array [0] = 0
7570
7571 ;
7572 return 0;
7573}
7574_ACEOF
7575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576if { (ac_try="$ac_compile"
7577case "(($ac_try" in
7578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7579 *) ac_try_echo=$ac_try;;
7580esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007584 grep -v '^ *+' conftest.er1 >conftest.err
7585 rm -f conftest.er1
7586 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588 (exit $ac_status); } && {
7589 test -z "$ac_c_werror_flag" ||
7590 test ! -s conftest.err
7591 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007592 ac_hi=$ac_mid; break
7593else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007595sed 's/^/| /' conftest.$ac_ext >&5
7596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 ac_lo=`expr $ac_mid + 1`
7598 if test $ac_lo -le $ac_mid; then
7599 ac_lo= ac_hi=
7600 break
7601 fi
7602 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604
7605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007606 done
7607else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007609sed 's/^/| /' conftest.$ac_ext >&5
7610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007612/* confdefs.h. */
7613_ACEOF
7614cat confdefs.h >>conftest.$ac_ext
7615cat >>conftest.$ac_ext <<_ACEOF
7616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007617$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007618 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007619int
7620main ()
7621{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007623test_array [0] = 0
7624
7625 ;
7626 return 0;
7627}
7628_ACEOF
7629rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630if { (ac_try="$ac_compile"
7631case "(($ac_try" in
7632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7633 *) ac_try_echo=$ac_try;;
7634esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007638 grep -v '^ *+' conftest.er1 >conftest.err
7639 rm -f conftest.er1
7640 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642 (exit $ac_status); } && {
7643 test -z "$ac_c_werror_flag" ||
7644 test ! -s conftest.err
7645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 ac_hi=-1 ac_mid=-1
7647 while :; do
7648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007649/* confdefs.h. */
7650_ACEOF
7651cat confdefs.h >>conftest.$ac_ext
7652cat >>conftest.$ac_ext <<_ACEOF
7653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007654$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007655 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007656int
7657main ()
7658{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007660test_array [0] = 0
7661
7662 ;
7663 return 0;
7664}
7665_ACEOF
7666rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667if { (ac_try="$ac_compile"
7668case "(($ac_try" in
7669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7670 *) ac_try_echo=$ac_try;;
7671esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 (exit $ac_status); } && {
7680 test -z "$ac_c_werror_flag" ||
7681 test ! -s conftest.err
7682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 ac_lo=$ac_mid; break
7684else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007686sed 's/^/| /' conftest.$ac_ext >&5
7687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 ac_hi=`expr '(' $ac_mid ')' - 1`
7689 if test $ac_mid -le $ac_hi; then
7690 ac_lo= ac_hi=
7691 break
7692 fi
7693 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695
7696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007697 done
7698else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007700sed 's/^/| /' conftest.$ac_ext >&5
7701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007707
7708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007709# Binary search between lo and hi bounds.
7710while test "x$ac_lo" != "x$ac_hi"; do
7711 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* confdefs.h. */
7714_ACEOF
7715cat confdefs.h >>conftest.$ac_ext
7716cat >>conftest.$ac_ext <<_ACEOF
7717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007719 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720int
7721main ()
7722{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007724test_array [0] = 0
7725
7726 ;
7727 return 0;
7728}
7729_ACEOF
7730rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731if { (ac_try="$ac_compile"
7732case "(($ac_try" in
7733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7734 *) ac_try_echo=$ac_try;;
7735esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007739 grep -v '^ *+' conftest.er1 >conftest.err
7740 rm -f conftest.er1
7741 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743 (exit $ac_status); } && {
7744 test -z "$ac_c_werror_flag" ||
7745 test ! -s conftest.err
7746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_hi=$ac_mid
7748else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007750sed 's/^/| /' conftest.$ac_ext >&5
7751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007754
7755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007756done
7757case $ac_lo in
7758?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007760 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007761See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007762echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007763See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007764 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007765 else
7766 ac_cv_sizeof_int=0
7767 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007768esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007769else
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* confdefs.h. */
7772_ACEOF
7773cat confdefs.h >>conftest.$ac_ext
7774cat >>conftest.$ac_ext <<_ACEOF
7775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007776$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007777 typedef int ac__type_sizeof_;
7778static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7779static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007780#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007781#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007782int
7783main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007784{
Martin v. Löwis11437992002-04-12 09:54:03 +00007785
7786 FILE *f = fopen ("conftest.val", "w");
7787 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007788 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007789 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007792 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007794 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 }
7796 else
7797 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007799 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007801 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007804
7805 ;
7806 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007807}
Martin v. Löwis11437992002-04-12 09:54:03 +00007808_ACEOF
7809rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810if { (ac_try="$ac_link"
7811case "(($ac_try" in
7812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7813 *) ac_try_echo=$ac_try;;
7814esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820 { (case "(($ac_try" in
7821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7822 *) ac_try_echo=$ac_try;;
7823esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 (exit $ac_status); }; }; then
7829 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007830else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007831 echo "$as_me: program exited with status $ac_status" >&5
7832echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007833sed 's/^/| /' conftest.$ac_ext >&5
7834
Martin v. Löwis11437992002-04-12 09:54:03 +00007835( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007837 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007838See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007839echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007840See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007841 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842 else
7843 ac_cv_sizeof_int=0
7844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007846rm -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 +00007847fi
7848rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007849fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007850{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7851echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852
7853
7854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007857_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007858
7859
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007860{ echo "$as_me:$LINENO: checking for long" >&5
7861echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7862if test "${ac_cv_type_long+set}" = set; then
7863 echo $ECHO_N "(cached) $ECHO_C" >&6
7864else
7865 cat >conftest.$ac_ext <<_ACEOF
7866/* confdefs.h. */
7867_ACEOF
7868cat confdefs.h >>conftest.$ac_ext
7869cat >>conftest.$ac_ext <<_ACEOF
7870/* end confdefs.h. */
7871$ac_includes_default
7872typedef long ac__type_new_;
7873int
7874main ()
7875{
7876if ((ac__type_new_ *) 0)
7877 return 0;
7878if (sizeof (ac__type_new_))
7879 return 0;
7880 ;
7881 return 0;
7882}
7883_ACEOF
7884rm -f conftest.$ac_objext
7885if { (ac_try="$ac_compile"
7886case "(($ac_try" in
7887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7888 *) ac_try_echo=$ac_try;;
7889esac
7890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7891 (eval "$ac_compile") 2>conftest.er1
7892 ac_status=$?
7893 grep -v '^ *+' conftest.er1 >conftest.err
7894 rm -f conftest.er1
7895 cat conftest.err >&5
7896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7897 (exit $ac_status); } && {
7898 test -z "$ac_c_werror_flag" ||
7899 test ! -s conftest.err
7900 } && test -s conftest.$ac_objext; then
7901 ac_cv_type_long=yes
7902else
7903 echo "$as_me: failed program was:" >&5
7904sed 's/^/| /' conftest.$ac_ext >&5
7905
7906 ac_cv_type_long=no
7907fi
7908
7909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7910fi
7911{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7912echo "${ECHO_T}$ac_cv_type_long" >&6; }
7913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007914# The cast to long int works around a bug in the HP C Compiler
7915# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7916# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7917# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007918{ echo "$as_me:$LINENO: checking size of long" >&5
7919echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007920if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007922else
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 if test "$cross_compiling" = yes; then
7924 # Depending upon the size, compute the lo and hi bounds.
7925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* confdefs.h. */
7927_ACEOF
7928cat confdefs.h >>conftest.$ac_ext
7929cat >>conftest.$ac_ext <<_ACEOF
7930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007931$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007932 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007936static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007937test_array [0] = 0
7938
7939 ;
7940 return 0;
7941}
7942_ACEOF
7943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944if { (ac_try="$ac_compile"
7945case "(($ac_try" in
7946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7947 *) ac_try_echo=$ac_try;;
7948esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007952 grep -v '^ *+' conftest.er1 >conftest.err
7953 rm -f conftest.er1
7954 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956 (exit $ac_status); } && {
7957 test -z "$ac_c_werror_flag" ||
7958 test ! -s conftest.err
7959 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ac_lo=0 ac_mid=0
7961 while :; do
7962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007963/* confdefs.h. */
7964_ACEOF
7965cat confdefs.h >>conftest.$ac_ext
7966cat >>conftest.$ac_ext <<_ACEOF
7967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007968$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007969 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007973static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007974test_array [0] = 0
7975
7976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981if { (ac_try="$ac_compile"
7982case "(($ac_try" in
7983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7984 *) ac_try_echo=$ac_try;;
7985esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007989 grep -v '^ *+' conftest.er1 >conftest.err
7990 rm -f conftest.er1
7991 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993 (exit $ac_status); } && {
7994 test -z "$ac_c_werror_flag" ||
7995 test ! -s conftest.err
7996 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_hi=$ac_mid; break
7998else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008000sed 's/^/| /' conftest.$ac_ext >&5
8001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 ac_lo=`expr $ac_mid + 1`
8003 if test $ac_lo -le $ac_mid; then
8004 ac_lo= ac_hi=
8005 break
8006 fi
8007 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009
8010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 done
8012else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008014sed 's/^/| /' conftest.$ac_ext >&5
8015
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008017/* confdefs.h. */
8018_ACEOF
8019cat confdefs.h >>conftest.$ac_ext
8020cat >>conftest.$ac_ext <<_ACEOF
8021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008022$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008023 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008024int
8025main ()
8026{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008028test_array [0] = 0
8029
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035if { (ac_try="$ac_compile"
8036case "(($ac_try" in
8037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8038 *) ac_try_echo=$ac_try;;
8039esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008043 grep -v '^ *+' conftest.er1 >conftest.err
8044 rm -f conftest.er1
8045 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047 (exit $ac_status); } && {
8048 test -z "$ac_c_werror_flag" ||
8049 test ! -s conftest.err
8050 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_hi=-1 ac_mid=-1
8052 while :; do
8053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008054/* confdefs.h. */
8055_ACEOF
8056cat confdefs.h >>conftest.$ac_ext
8057cat >>conftest.$ac_ext <<_ACEOF
8058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008059$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008060 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008061int
8062main ()
8063{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008065test_array [0] = 0
8066
8067 ;
8068 return 0;
8069}
8070_ACEOF
8071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072if { (ac_try="$ac_compile"
8073case "(($ac_try" in
8074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8075 *) ac_try_echo=$ac_try;;
8076esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008080 grep -v '^ *+' conftest.er1 >conftest.err
8081 rm -f conftest.er1
8082 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008084 (exit $ac_status); } && {
8085 test -z "$ac_c_werror_flag" ||
8086 test ! -s conftest.err
8087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008088 ac_lo=$ac_mid; break
8089else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008091sed 's/^/| /' conftest.$ac_ext >&5
8092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 ac_hi=`expr '(' $ac_mid ')' - 1`
8094 if test $ac_mid -le $ac_hi; then
8095 ac_lo= ac_hi=
8096 break
8097 fi
8098 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100
8101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 done
8103else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008105sed 's/^/| /' conftest.$ac_ext >&5
8106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008109
8110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008112
8113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008114# Binary search between lo and hi bounds.
8115while test "x$ac_lo" != "x$ac_hi"; do
8116 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008118/* confdefs.h. */
8119_ACEOF
8120cat confdefs.h >>conftest.$ac_ext
8121cat >>conftest.$ac_ext <<_ACEOF
8122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008123$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008124 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008125int
8126main ()
8127{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008128static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008129test_array [0] = 0
8130
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008136if { (ac_try="$ac_compile"
8137case "(($ac_try" in
8138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8139 *) ac_try_echo=$ac_try;;
8140esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008144 grep -v '^ *+' conftest.er1 >conftest.err
8145 rm -f conftest.er1
8146 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148 (exit $ac_status); } && {
8149 test -z "$ac_c_werror_flag" ||
8150 test ! -s conftest.err
8151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_hi=$ac_mid
8153else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008155sed 's/^/| /' conftest.$ac_ext >&5
8156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159
8160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008161done
8162case $ac_lo in
8163?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008165 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008166See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008167echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008168See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008169 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008170 else
8171 ac_cv_sizeof_long=0
8172 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008173esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008174else
Martin v. Löwis11437992002-04-12 09:54:03 +00008175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008181$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008182 typedef long ac__type_sizeof_;
8183static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8184static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008185#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008186#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008187int
8188main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008189{
Martin v. Löwis11437992002-04-12 09:54:03 +00008190
8191 FILE *f = fopen ("conftest.val", "w");
8192 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008193 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008194 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008195 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008197 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008198 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008199 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 }
8201 else
8202 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008203 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008204 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008205 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008206 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008209
8210 ;
8211 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008212}
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
8214rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215if { (ac_try="$ac_link"
8216case "(($ac_try" in
8217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8218 *) ac_try_echo=$ac_try;;
8219esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225 { (case "(($ac_try" in
8226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8227 *) ac_try_echo=$ac_try;;
8228esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 (exit $ac_status); }; }; then
8234 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008235else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008236 echo "$as_me: program exited with status $ac_status" >&5
8237echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008238sed 's/^/| /' conftest.$ac_ext >&5
8239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008242 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008243See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008244echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008245See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008246 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247 else
8248 ac_cv_sizeof_long=0
8249 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251rm -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 +00008252fi
8253rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008254fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008255{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8256echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257
8258
8259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008261#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008262_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008263
8264
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008265{ echo "$as_me:$LINENO: checking for void *" >&5
8266echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8267if test "${ac_cv_type_void_p+set}" = set; then
8268 echo $ECHO_N "(cached) $ECHO_C" >&6
8269else
8270 cat >conftest.$ac_ext <<_ACEOF
8271/* confdefs.h. */
8272_ACEOF
8273cat confdefs.h >>conftest.$ac_ext
8274cat >>conftest.$ac_ext <<_ACEOF
8275/* end confdefs.h. */
8276$ac_includes_default
8277typedef void * ac__type_new_;
8278int
8279main ()
8280{
8281if ((ac__type_new_ *) 0)
8282 return 0;
8283if (sizeof (ac__type_new_))
8284 return 0;
8285 ;
8286 return 0;
8287}
8288_ACEOF
8289rm -f conftest.$ac_objext
8290if { (ac_try="$ac_compile"
8291case "(($ac_try" in
8292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8293 *) ac_try_echo=$ac_try;;
8294esac
8295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8296 (eval "$ac_compile") 2>conftest.er1
8297 ac_status=$?
8298 grep -v '^ *+' conftest.er1 >conftest.err
8299 rm -f conftest.er1
8300 cat conftest.err >&5
8301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8302 (exit $ac_status); } && {
8303 test -z "$ac_c_werror_flag" ||
8304 test ! -s conftest.err
8305 } && test -s conftest.$ac_objext; then
8306 ac_cv_type_void_p=yes
8307else
8308 echo "$as_me: failed program was:" >&5
8309sed 's/^/| /' conftest.$ac_ext >&5
8310
8311 ac_cv_type_void_p=no
8312fi
8313
8314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8315fi
8316{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8317echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319# The cast to long int works around a bug in the HP C Compiler
8320# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8321# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8322# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008323{ echo "$as_me:$LINENO: checking size of void *" >&5
8324echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008325if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008326 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008327else
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 if test "$cross_compiling" = yes; then
8329 # Depending upon the size, compute the lo and hi bounds.
8330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008331/* confdefs.h. */
8332_ACEOF
8333cat confdefs.h >>conftest.$ac_ext
8334cat >>conftest.$ac_ext <<_ACEOF
8335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008336$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008337 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008338int
8339main ()
8340{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008341static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008342test_array [0] = 0
8343
8344 ;
8345 return 0;
8346}
8347_ACEOF
8348rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349if { (ac_try="$ac_compile"
8350case "(($ac_try" in
8351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8352 *) ac_try_echo=$ac_try;;
8353esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008357 grep -v '^ *+' conftest.er1 >conftest.err
8358 rm -f conftest.er1
8359 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361 (exit $ac_status); } && {
8362 test -z "$ac_c_werror_flag" ||
8363 test ! -s conftest.err
8364 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 ac_lo=0 ac_mid=0
8366 while :; do
8367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008368/* confdefs.h. */
8369_ACEOF
8370cat confdefs.h >>conftest.$ac_ext
8371cat >>conftest.$ac_ext <<_ACEOF
8372/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008373$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008374 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008375int
8376main ()
8377{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008378static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008379test_array [0] = 0
8380
8381 ;
8382 return 0;
8383}
8384_ACEOF
8385rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386if { (ac_try="$ac_compile"
8387case "(($ac_try" in
8388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8389 *) ac_try_echo=$ac_try;;
8390esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008394 grep -v '^ *+' conftest.er1 >conftest.err
8395 rm -f conftest.er1
8396 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398 (exit $ac_status); } && {
8399 test -z "$ac_c_werror_flag" ||
8400 test ! -s conftest.err
8401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008402 ac_hi=$ac_mid; break
8403else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008405sed 's/^/| /' conftest.$ac_ext >&5
8406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 ac_lo=`expr $ac_mid + 1`
8408 if test $ac_lo -le $ac_mid; then
8409 ac_lo= ac_hi=
8410 break
8411 fi
8412 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008414
8415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 done
8417else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008419sed 's/^/| /' conftest.$ac_ext >&5
8420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* confdefs.h. */
8423_ACEOF
8424cat confdefs.h >>conftest.$ac_ext
8425cat >>conftest.$ac_ext <<_ACEOF
8426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008427$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008428 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008429int
8430main ()
8431{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008433test_array [0] = 0
8434
8435 ;
8436 return 0;
8437}
8438_ACEOF
8439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440if { (ac_try="$ac_compile"
8441case "(($ac_try" in
8442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8443 *) ac_try_echo=$ac_try;;
8444esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008448 grep -v '^ *+' conftest.er1 >conftest.err
8449 rm -f conftest.er1
8450 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 (exit $ac_status); } && {
8453 test -z "$ac_c_werror_flag" ||
8454 test ! -s conftest.err
8455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 ac_hi=-1 ac_mid=-1
8457 while :; do
8458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008459/* confdefs.h. */
8460_ACEOF
8461cat confdefs.h >>conftest.$ac_ext
8462cat >>conftest.$ac_ext <<_ACEOF
8463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008464$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008465 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008470test_array [0] = 0
8471
8472 ;
8473 return 0;
8474}
8475_ACEOF
8476rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477if { (ac_try="$ac_compile"
8478case "(($ac_try" in
8479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8480 *) ac_try_echo=$ac_try;;
8481esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008485 grep -v '^ *+' conftest.er1 >conftest.err
8486 rm -f conftest.er1
8487 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489 (exit $ac_status); } && {
8490 test -z "$ac_c_werror_flag" ||
8491 test ! -s conftest.err
8492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008493 ac_lo=$ac_mid; break
8494else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008496sed 's/^/| /' conftest.$ac_ext >&5
8497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 ac_hi=`expr '(' $ac_mid ')' - 1`
8499 if test $ac_mid -le $ac_hi; then
8500 ac_lo= ac_hi=
8501 break
8502 fi
8503 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505
8506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 done
8508else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008510sed 's/^/| /' conftest.$ac_ext >&5
8511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517
8518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008519# Binary search between lo and hi bounds.
8520while test "x$ac_lo" != "x$ac_hi"; do
8521 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008523/* confdefs.h. */
8524_ACEOF
8525cat confdefs.h >>conftest.$ac_ext
8526cat >>conftest.$ac_ext <<_ACEOF
8527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008529 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008530int
8531main ()
8532{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008533static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008534test_array [0] = 0
8535
8536 ;
8537 return 0;
8538}
8539_ACEOF
8540rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541if { (ac_try="$ac_compile"
8542case "(($ac_try" in
8543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8544 *) ac_try_echo=$ac_try;;
8545esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008549 grep -v '^ *+' conftest.er1 >conftest.err
8550 rm -f conftest.er1
8551 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553 (exit $ac_status); } && {
8554 test -z "$ac_c_werror_flag" ||
8555 test ! -s conftest.err
8556 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_hi=$ac_mid
8558else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008560sed 's/^/| /' conftest.$ac_ext >&5
8561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564
8565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008566done
8567case $ac_lo in
8568?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008570 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008571See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008572echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008573See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008574 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575 else
8576 ac_cv_sizeof_void_p=0
8577 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008578esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008579else
Martin v. Löwis11437992002-04-12 09:54:03 +00008580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008581/* confdefs.h. */
8582_ACEOF
8583cat confdefs.h >>conftest.$ac_ext
8584cat >>conftest.$ac_ext <<_ACEOF
8585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008587 typedef void * ac__type_sizeof_;
8588static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8589static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008590#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008591#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008592int
8593main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008594{
Martin v. Löwis11437992002-04-12 09:54:03 +00008595
8596 FILE *f = fopen ("conftest.val", "w");
8597 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008598 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008599 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008602 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008604 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 }
8606 else
8607 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008609 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008611 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008614
8615 ;
8616 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008617}
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
8619rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620if { (ac_try="$ac_link"
8621case "(($ac_try" in
8622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8623 *) ac_try_echo=$ac_try;;
8624esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008629 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008630 { (case "(($ac_try" in
8631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8632 *) ac_try_echo=$ac_try;;
8633esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 (exit $ac_status); }; }; then
8639 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008640else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008641 echo "$as_me: program exited with status $ac_status" >&5
8642echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008643sed 's/^/| /' conftest.$ac_ext >&5
8644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008647 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008648See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008649echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008650See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008651 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652 else
8653 ac_cv_sizeof_void_p=0
8654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656rm -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 +00008657fi
8658rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008659fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008660{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8661echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662
8663
8664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008666#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008667_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008668
8669
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008670{ echo "$as_me:$LINENO: checking for short" >&5
8671echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8672if test "${ac_cv_type_short+set}" = set; then
8673 echo $ECHO_N "(cached) $ECHO_C" >&6
8674else
8675 cat >conftest.$ac_ext <<_ACEOF
8676/* confdefs.h. */
8677_ACEOF
8678cat confdefs.h >>conftest.$ac_ext
8679cat >>conftest.$ac_ext <<_ACEOF
8680/* end confdefs.h. */
8681$ac_includes_default
8682typedef short ac__type_new_;
8683int
8684main ()
8685{
8686if ((ac__type_new_ *) 0)
8687 return 0;
8688if (sizeof (ac__type_new_))
8689 return 0;
8690 ;
8691 return 0;
8692}
8693_ACEOF
8694rm -f conftest.$ac_objext
8695if { (ac_try="$ac_compile"
8696case "(($ac_try" in
8697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8698 *) ac_try_echo=$ac_try;;
8699esac
8700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8701 (eval "$ac_compile") 2>conftest.er1
8702 ac_status=$?
8703 grep -v '^ *+' conftest.er1 >conftest.err
8704 rm -f conftest.er1
8705 cat conftest.err >&5
8706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8707 (exit $ac_status); } && {
8708 test -z "$ac_c_werror_flag" ||
8709 test ! -s conftest.err
8710 } && test -s conftest.$ac_objext; then
8711 ac_cv_type_short=yes
8712else
8713 echo "$as_me: failed program was:" >&5
8714sed 's/^/| /' conftest.$ac_ext >&5
8715
8716 ac_cv_type_short=no
8717fi
8718
8719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8720fi
8721{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8722echo "${ECHO_T}$ac_cv_type_short" >&6; }
8723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724# The cast to long int works around a bug in the HP C Compiler
8725# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8726# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8727# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008728{ echo "$as_me:$LINENO: checking size of short" >&5
8729echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008730if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008731 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008732else
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 if test "$cross_compiling" = yes; then
8734 # Depending upon the size, compute the lo and hi bounds.
8735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008736/* confdefs.h. */
8737_ACEOF
8738cat confdefs.h >>conftest.$ac_ext
8739cat >>conftest.$ac_ext <<_ACEOF
8740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008742 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008743int
8744main ()
8745{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008746static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008747test_array [0] = 0
8748
8749 ;
8750 return 0;
8751}
8752_ACEOF
8753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754if { (ac_try="$ac_compile"
8755case "(($ac_try" in
8756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8757 *) ac_try_echo=$ac_try;;
8758esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008762 grep -v '^ *+' conftest.er1 >conftest.err
8763 rm -f conftest.er1
8764 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766 (exit $ac_status); } && {
8767 test -z "$ac_c_werror_flag" ||
8768 test ! -s conftest.err
8769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 ac_lo=0 ac_mid=0
8771 while :; do
8772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008773/* confdefs.h. */
8774_ACEOF
8775cat confdefs.h >>conftest.$ac_ext
8776cat >>conftest.$ac_ext <<_ACEOF
8777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008778$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008779 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008780int
8781main ()
8782{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008784test_array [0] = 0
8785
8786 ;
8787 return 0;
8788}
8789_ACEOF
8790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791if { (ac_try="$ac_compile"
8792case "(($ac_try" in
8793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8794 *) ac_try_echo=$ac_try;;
8795esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008799 grep -v '^ *+' conftest.er1 >conftest.err
8800 rm -f conftest.er1
8801 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803 (exit $ac_status); } && {
8804 test -z "$ac_c_werror_flag" ||
8805 test ! -s conftest.err
8806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_hi=$ac_mid; break
8808else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008810sed 's/^/| /' conftest.$ac_ext >&5
8811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 ac_lo=`expr $ac_mid + 1`
8813 if test $ac_lo -le $ac_mid; then
8814 ac_lo= ac_hi=
8815 break
8816 fi
8817 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819
8820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 done
8822else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008824sed 's/^/| /' conftest.$ac_ext >&5
8825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008827/* confdefs.h. */
8828_ACEOF
8829cat confdefs.h >>conftest.$ac_ext
8830cat >>conftest.$ac_ext <<_ACEOF
8831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008832$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008833 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008834int
8835main ()
8836{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008838test_array [0] = 0
8839
8840 ;
8841 return 0;
8842}
8843_ACEOF
8844rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845if { (ac_try="$ac_compile"
8846case "(($ac_try" in
8847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8848 *) ac_try_echo=$ac_try;;
8849esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008853 grep -v '^ *+' conftest.er1 >conftest.err
8854 rm -f conftest.er1
8855 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 (exit $ac_status); } && {
8858 test -z "$ac_c_werror_flag" ||
8859 test ! -s conftest.err
8860 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_hi=-1 ac_mid=-1
8862 while :; do
8863 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* confdefs.h. */
8865_ACEOF
8866cat confdefs.h >>conftest.$ac_ext
8867cat >>conftest.$ac_ext <<_ACEOF
8868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008870 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882if { (ac_try="$ac_compile"
8883case "(($ac_try" in
8884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8885 *) ac_try_echo=$ac_try;;
8886esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008890 grep -v '^ *+' conftest.er1 >conftest.err
8891 rm -f conftest.er1
8892 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894 (exit $ac_status); } && {
8895 test -z "$ac_c_werror_flag" ||
8896 test ! -s conftest.err
8897 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_lo=$ac_mid; break
8899else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008901sed 's/^/| /' conftest.$ac_ext >&5
8902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 ac_hi=`expr '(' $ac_mid ')' - 1`
8904 if test $ac_mid -le $ac_hi; then
8905 ac_lo= ac_hi=
8906 break
8907 fi
8908 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910
8911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 done
8913else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008915sed 's/^/| /' conftest.$ac_ext >&5
8916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919
8920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008922
8923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008924# Binary search between lo and hi bounds.
8925while test "x$ac_lo" != "x$ac_hi"; do
8926 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* confdefs.h. */
8929_ACEOF
8930cat confdefs.h >>conftest.$ac_ext
8931cat >>conftest.$ac_ext <<_ACEOF
8932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008933$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008934 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008939test_array [0] = 0
8940
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946if { (ac_try="$ac_compile"
8947case "(($ac_try" in
8948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8949 *) ac_try_echo=$ac_try;;
8950esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008954 grep -v '^ *+' conftest.er1 >conftest.err
8955 rm -f conftest.er1
8956 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958 (exit $ac_status); } && {
8959 test -z "$ac_c_werror_flag" ||
8960 test ! -s conftest.err
8961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_hi=$ac_mid
8963else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008965sed 's/^/| /' conftest.$ac_ext >&5
8966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969
8970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008971done
8972case $ac_lo in
8973?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008975 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008976See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008977echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008978See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008979 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980 else
8981 ac_cv_sizeof_short=0
8982 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008983esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* confdefs.h. */
8987_ACEOF
8988cat confdefs.h >>conftest.$ac_ext
8989cat >>conftest.$ac_ext <<_ACEOF
8990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008991$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008992 typedef short ac__type_sizeof_;
8993static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8994static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008995#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008996#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008997int
8998main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008999{
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
9001 FILE *f = fopen ("conftest.val", "w");
9002 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009004 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009005 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009007 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009009 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 }
9011 else
9012 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009014 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009016 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
9020 ;
9021 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009022}
Martin v. Löwis11437992002-04-12 09:54:03 +00009023_ACEOF
9024rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025if { (ac_try="$ac_link"
9026case "(($ac_try" in
9027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9028 *) ac_try_echo=$ac_try;;
9029esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009035 { (case "(($ac_try" in
9036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9037 *) ac_try_echo=$ac_try;;
9038esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 (exit $ac_status); }; }; then
9044 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009045else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009046 echo "$as_me: program exited with status $ac_status" >&5
9047echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009048sed 's/^/| /' conftest.$ac_ext >&5
9049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009052 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009053See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009054echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009055See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009056 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057 else
9058 ac_cv_sizeof_short=0
9059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009061rm -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 +00009062fi
9063rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009064fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009065{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9066echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067
9068
9069
Martin v. Löwis11437992002-04-12 09:54:03 +00009070cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009071#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009073
9074
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009075{ echo "$as_me:$LINENO: checking for float" >&5
9076echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9077if test "${ac_cv_type_float+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
9079else
9080 cat >conftest.$ac_ext <<_ACEOF
9081/* confdefs.h. */
9082_ACEOF
9083cat confdefs.h >>conftest.$ac_ext
9084cat >>conftest.$ac_ext <<_ACEOF
9085/* end confdefs.h. */
9086$ac_includes_default
9087typedef float ac__type_new_;
9088int
9089main ()
9090{
9091if ((ac__type_new_ *) 0)
9092 return 0;
9093if (sizeof (ac__type_new_))
9094 return 0;
9095 ;
9096 return 0;
9097}
9098_ACEOF
9099rm -f conftest.$ac_objext
9100if { (ac_try="$ac_compile"
9101case "(($ac_try" in
9102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9103 *) ac_try_echo=$ac_try;;
9104esac
9105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9106 (eval "$ac_compile") 2>conftest.er1
9107 ac_status=$?
9108 grep -v '^ *+' conftest.er1 >conftest.err
9109 rm -f conftest.er1
9110 cat conftest.err >&5
9111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112 (exit $ac_status); } && {
9113 test -z "$ac_c_werror_flag" ||
9114 test ! -s conftest.err
9115 } && test -s conftest.$ac_objext; then
9116 ac_cv_type_float=yes
9117else
9118 echo "$as_me: failed program was:" >&5
9119sed 's/^/| /' conftest.$ac_ext >&5
9120
9121 ac_cv_type_float=no
9122fi
9123
9124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9125fi
9126{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9127echo "${ECHO_T}$ac_cv_type_float" >&6; }
9128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129# The cast to long int works around a bug in the HP C Compiler
9130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9132# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009133{ echo "$as_me:$LINENO: checking size of float" >&5
9134echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009135if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009136 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009137else
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 if test "$cross_compiling" = yes; then
9139 # Depending upon the size, compute the lo and hi bounds.
9140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* confdefs.h. */
9142_ACEOF
9143cat confdefs.h >>conftest.$ac_ext
9144cat >>conftest.$ac_ext <<_ACEOF
9145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009146$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009147 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009148int
9149main ()
9150{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009151static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009152test_array [0] = 0
9153
9154 ;
9155 return 0;
9156}
9157_ACEOF
9158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159if { (ac_try="$ac_compile"
9160case "(($ac_try" in
9161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9162 *) ac_try_echo=$ac_try;;
9163esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009167 grep -v '^ *+' conftest.er1 >conftest.err
9168 rm -f conftest.er1
9169 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171 (exit $ac_status); } && {
9172 test -z "$ac_c_werror_flag" ||
9173 test ! -s conftest.err
9174 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_lo=0 ac_mid=0
9176 while :; do
9177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009178/* confdefs.h. */
9179_ACEOF
9180cat confdefs.h >>conftest.$ac_ext
9181cat >>conftest.$ac_ext <<_ACEOF
9182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009183$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009184 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009185int
9186main ()
9187{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009188static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009189test_array [0] = 0
9190
9191 ;
9192 return 0;
9193}
9194_ACEOF
9195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196if { (ac_try="$ac_compile"
9197case "(($ac_try" in
9198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9199 *) ac_try_echo=$ac_try;;
9200esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009204 grep -v '^ *+' conftest.er1 >conftest.err
9205 rm -f conftest.er1
9206 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208 (exit $ac_status); } && {
9209 test -z "$ac_c_werror_flag" ||
9210 test ! -s conftest.err
9211 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ac_hi=$ac_mid; break
9213else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009215sed 's/^/| /' conftest.$ac_ext >&5
9216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 ac_lo=`expr $ac_mid + 1`
9218 if test $ac_lo -le $ac_mid; then
9219 ac_lo= ac_hi=
9220 break
9221 fi
9222 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224
9225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 done
9227else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009228 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009229sed 's/^/| /' conftest.$ac_ext >&5
9230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009232/* confdefs.h. */
9233_ACEOF
9234cat confdefs.h >>conftest.$ac_ext
9235cat >>conftest.$ac_ext <<_ACEOF
9236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009237$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009238 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009239int
9240main ()
9241{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009243test_array [0] = 0
9244
9245 ;
9246 return 0;
9247}
9248_ACEOF
9249rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250if { (ac_try="$ac_compile"
9251case "(($ac_try" in
9252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9253 *) ac_try_echo=$ac_try;;
9254esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009258 grep -v '^ *+' conftest.er1 >conftest.err
9259 rm -f conftest.er1
9260 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 (exit $ac_status); } && {
9263 test -z "$ac_c_werror_flag" ||
9264 test ! -s conftest.err
9265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 ac_hi=-1 ac_mid=-1
9267 while :; do
9268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009269/* confdefs.h. */
9270_ACEOF
9271cat confdefs.h >>conftest.$ac_ext
9272cat >>conftest.$ac_ext <<_ACEOF
9273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009274$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009275 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009276int
9277main ()
9278{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009280test_array [0] = 0
9281
9282 ;
9283 return 0;
9284}
9285_ACEOF
9286rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287if { (ac_try="$ac_compile"
9288case "(($ac_try" in
9289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9290 *) ac_try_echo=$ac_try;;
9291esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009295 grep -v '^ *+' conftest.er1 >conftest.err
9296 rm -f conftest.er1
9297 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299 (exit $ac_status); } && {
9300 test -z "$ac_c_werror_flag" ||
9301 test ! -s conftest.err
9302 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_lo=$ac_mid; break
9304else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009306sed 's/^/| /' conftest.$ac_ext >&5
9307
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 ac_hi=`expr '(' $ac_mid ')' - 1`
9309 if test $ac_mid -le $ac_hi; then
9310 ac_lo= ac_hi=
9311 break
9312 fi
9313 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009315
9316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009317 done
9318else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009320sed 's/^/| /' conftest.$ac_ext >&5
9321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324
9325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327
9328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009329# Binary search between lo and hi bounds.
9330while test "x$ac_lo" != "x$ac_hi"; do
9331 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009339 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009340int
9341main ()
9342{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009344test_array [0] = 0
9345
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009351if { (ac_try="$ac_compile"
9352case "(($ac_try" in
9353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9354 *) ac_try_echo=$ac_try;;
9355esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009359 grep -v '^ *+' conftest.er1 >conftest.err
9360 rm -f conftest.er1
9361 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363 (exit $ac_status); } && {
9364 test -z "$ac_c_werror_flag" ||
9365 test ! -s conftest.err
9366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_hi=$ac_mid
9368else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009370sed 's/^/| /' conftest.$ac_ext >&5
9371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009374
9375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009376done
9377case $ac_lo in
9378?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009379'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009380 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009381See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009382echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009383See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009384 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009385 else
9386 ac_cv_sizeof_float=0
9387 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009388esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009389else
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* confdefs.h. */
9392_ACEOF
9393cat confdefs.h >>conftest.$ac_ext
9394cat >>conftest.$ac_ext <<_ACEOF
9395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009396$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009397 typedef float ac__type_sizeof_;
9398static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9399static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009400#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009401#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009402int
9403main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009404{
Martin v. Löwis11437992002-04-12 09:54:03 +00009405
9406 FILE *f = fopen ("conftest.val", "w");
9407 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009409 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009414 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 }
9416 else
9417 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009421 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009424
9425 ;
9426 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009427}
Martin v. Löwis11437992002-04-12 09:54:03 +00009428_ACEOF
9429rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430if { (ac_try="$ac_link"
9431case "(($ac_try" in
9432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9433 *) ac_try_echo=$ac_try;;
9434esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440 { (case "(($ac_try" in
9441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9442 *) ac_try_echo=$ac_try;;
9443esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 (exit $ac_status); }; }; then
9449 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009450else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009451 echo "$as_me: program exited with status $ac_status" >&5
9452echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009453sed 's/^/| /' conftest.$ac_ext >&5
9454
Martin v. Löwis11437992002-04-12 09:54:03 +00009455( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009458See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009459echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009460See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009461 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462 else
9463 ac_cv_sizeof_float=0
9464 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466rm -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 +00009467fi
9468rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009469fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009470{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9471echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472
9473
9474
Martin v. Löwis11437992002-04-12 09:54:03 +00009475cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009476#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009477_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009478
9479
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009480{ echo "$as_me:$LINENO: checking for double" >&5
9481echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9482if test "${ac_cv_type_double+set}" = set; then
9483 echo $ECHO_N "(cached) $ECHO_C" >&6
9484else
9485 cat >conftest.$ac_ext <<_ACEOF
9486/* confdefs.h. */
9487_ACEOF
9488cat confdefs.h >>conftest.$ac_ext
9489cat >>conftest.$ac_ext <<_ACEOF
9490/* end confdefs.h. */
9491$ac_includes_default
9492typedef double ac__type_new_;
9493int
9494main ()
9495{
9496if ((ac__type_new_ *) 0)
9497 return 0;
9498if (sizeof (ac__type_new_))
9499 return 0;
9500 ;
9501 return 0;
9502}
9503_ACEOF
9504rm -f conftest.$ac_objext
9505if { (ac_try="$ac_compile"
9506case "(($ac_try" in
9507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9508 *) ac_try_echo=$ac_try;;
9509esac
9510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9511 (eval "$ac_compile") 2>conftest.er1
9512 ac_status=$?
9513 grep -v '^ *+' conftest.er1 >conftest.err
9514 rm -f conftest.er1
9515 cat conftest.err >&5
9516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9517 (exit $ac_status); } && {
9518 test -z "$ac_c_werror_flag" ||
9519 test ! -s conftest.err
9520 } && test -s conftest.$ac_objext; then
9521 ac_cv_type_double=yes
9522else
9523 echo "$as_me: failed program was:" >&5
9524sed 's/^/| /' conftest.$ac_ext >&5
9525
9526 ac_cv_type_double=no
9527fi
9528
9529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9530fi
9531{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9532echo "${ECHO_T}$ac_cv_type_double" >&6; }
9533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534# The cast to long int works around a bug in the HP C Compiler
9535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9537# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009538{ echo "$as_me:$LINENO: checking size of double" >&5
9539echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009540if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009541 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 if test "$cross_compiling" = yes; then
9544 # Depending upon the size, compute the lo and hi bounds.
9545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* confdefs.h. */
9547_ACEOF
9548cat confdefs.h >>conftest.$ac_ext
9549cat >>conftest.$ac_ext <<_ACEOF
9550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009552 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009556static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009557test_array [0] = 0
9558
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564if { (ac_try="$ac_compile"
9565case "(($ac_try" in
9566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9567 *) ac_try_echo=$ac_try;;
9568esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009572 grep -v '^ *+' conftest.er1 >conftest.err
9573 rm -f conftest.er1
9574 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576 (exit $ac_status); } && {
9577 test -z "$ac_c_werror_flag" ||
9578 test ! -s conftest.err
9579 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_lo=0 ac_mid=0
9581 while :; do
9582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* confdefs.h. */
9584_ACEOF
9585cat confdefs.h >>conftest.$ac_ext
9586cat >>conftest.$ac_ext <<_ACEOF
9587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009589 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009593static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009594test_array [0] = 0
9595
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009601if { (ac_try="$ac_compile"
9602case "(($ac_try" in
9603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9604 *) ac_try_echo=$ac_try;;
9605esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009609 grep -v '^ *+' conftest.er1 >conftest.err
9610 rm -f conftest.er1
9611 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613 (exit $ac_status); } && {
9614 test -z "$ac_c_werror_flag" ||
9615 test ! -s conftest.err
9616 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 ac_hi=$ac_mid; break
9618else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009620sed 's/^/| /' conftest.$ac_ext >&5
9621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 ac_lo=`expr $ac_mid + 1`
9623 if test $ac_lo -le $ac_mid; then
9624 ac_lo= ac_hi=
9625 break
9626 fi
9627 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629
9630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 done
9632else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009634sed 's/^/| /' conftest.$ac_ext >&5
9635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009637/* confdefs.h. */
9638_ACEOF
9639cat confdefs.h >>conftest.$ac_ext
9640cat >>conftest.$ac_ext <<_ACEOF
9641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009642$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009643 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009644int
9645main ()
9646{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009647static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009648test_array [0] = 0
9649
9650 ;
9651 return 0;
9652}
9653_ACEOF
9654rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655if { (ac_try="$ac_compile"
9656case "(($ac_try" in
9657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9658 *) ac_try_echo=$ac_try;;
9659esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009663 grep -v '^ *+' conftest.er1 >conftest.err
9664 rm -f conftest.er1
9665 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667 (exit $ac_status); } && {
9668 test -z "$ac_c_werror_flag" ||
9669 test ! -s conftest.err
9670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_hi=-1 ac_mid=-1
9672 while :; do
9673 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* confdefs.h. */
9675_ACEOF
9676cat confdefs.h >>conftest.$ac_ext
9677cat >>conftest.$ac_ext <<_ACEOF
9678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009680 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009685test_array [0] = 0
9686
9687 ;
9688 return 0;
9689}
9690_ACEOF
9691rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692if { (ac_try="$ac_compile"
9693case "(($ac_try" in
9694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9695 *) ac_try_echo=$ac_try;;
9696esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009700 grep -v '^ *+' conftest.er1 >conftest.err
9701 rm -f conftest.er1
9702 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 (exit $ac_status); } && {
9705 test -z "$ac_c_werror_flag" ||
9706 test ! -s conftest.err
9707 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_lo=$ac_mid; break
9709else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009711sed 's/^/| /' conftest.$ac_ext >&5
9712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 ac_hi=`expr '(' $ac_mid ')' - 1`
9714 if test $ac_mid -le $ac_hi; then
9715 ac_lo= ac_hi=
9716 break
9717 fi
9718 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720
9721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 done
9723else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009725sed 's/^/| /' conftest.$ac_ext >&5
9726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729
9730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732
9733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009734# Binary search between lo and hi bounds.
9735while test "x$ac_lo" != "x$ac_hi"; do
9736 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* confdefs.h. */
9739_ACEOF
9740cat confdefs.h >>conftest.$ac_ext
9741cat >>conftest.$ac_ext <<_ACEOF
9742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009744 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009749test_array [0] = 0
9750
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756if { (ac_try="$ac_compile"
9757case "(($ac_try" in
9758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9759 *) ac_try_echo=$ac_try;;
9760esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009764 grep -v '^ *+' conftest.er1 >conftest.err
9765 rm -f conftest.er1
9766 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768 (exit $ac_status); } && {
9769 test -z "$ac_c_werror_flag" ||
9770 test ! -s conftest.err
9771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_hi=$ac_mid
9773else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009775sed 's/^/| /' conftest.$ac_ext >&5
9776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779
9780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009781done
9782case $ac_lo in
9783?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009785 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009786See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009787echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009788See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009789 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009790 else
9791 ac_cv_sizeof_double=0
9792 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009793esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009802 typedef double ac__type_sizeof_;
9803static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9804static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009805#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009806#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009807int
9808main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009809{
Martin v. Löwis11437992002-04-12 09:54:03 +00009810
9811 FILE *f = fopen ("conftest.val", "w");
9812 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009814 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009816 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009817 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009819 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 }
9821 else
9822 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009824 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009826 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009829
9830 ;
9831 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009832}
Martin v. Löwis11437992002-04-12 09:54:03 +00009833_ACEOF
9834rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835if { (ac_try="$ac_link"
9836case "(($ac_try" in
9837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9838 *) ac_try_echo=$ac_try;;
9839esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845 { (case "(($ac_try" in
9846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9847 *) ac_try_echo=$ac_try;;
9848esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 (exit $ac_status); }; }; then
9854 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009855else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009856 echo "$as_me: program exited with status $ac_status" >&5
9857echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009858sed 's/^/| /' conftest.$ac_ext >&5
9859
Martin v. Löwis11437992002-04-12 09:54:03 +00009860( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009862 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009863See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009864echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009865See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009866 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867 else
9868 ac_cv_sizeof_double=0
9869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871rm -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 +00009872fi
9873rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009874fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009875{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9876echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877
9878
9879
Martin v. Löwis11437992002-04-12 09:54:03 +00009880cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009881#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009882_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009883
9884
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009885{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9886echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9887if test "${ac_cv_type_fpos_t+set}" = set; then
9888 echo $ECHO_N "(cached) $ECHO_C" >&6
9889else
9890 cat >conftest.$ac_ext <<_ACEOF
9891/* confdefs.h. */
9892_ACEOF
9893cat confdefs.h >>conftest.$ac_ext
9894cat >>conftest.$ac_ext <<_ACEOF
9895/* end confdefs.h. */
9896$ac_includes_default
9897typedef fpos_t ac__type_new_;
9898int
9899main ()
9900{
9901if ((ac__type_new_ *) 0)
9902 return 0;
9903if (sizeof (ac__type_new_))
9904 return 0;
9905 ;
9906 return 0;
9907}
9908_ACEOF
9909rm -f conftest.$ac_objext
9910if { (ac_try="$ac_compile"
9911case "(($ac_try" in
9912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9913 *) ac_try_echo=$ac_try;;
9914esac
9915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9916 (eval "$ac_compile") 2>conftest.er1
9917 ac_status=$?
9918 grep -v '^ *+' conftest.er1 >conftest.err
9919 rm -f conftest.er1
9920 cat conftest.err >&5
9921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9922 (exit $ac_status); } && {
9923 test -z "$ac_c_werror_flag" ||
9924 test ! -s conftest.err
9925 } && test -s conftest.$ac_objext; then
9926 ac_cv_type_fpos_t=yes
9927else
9928 echo "$as_me: failed program was:" >&5
9929sed 's/^/| /' conftest.$ac_ext >&5
9930
9931 ac_cv_type_fpos_t=no
9932fi
9933
9934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9935fi
9936{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9937echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9938
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939# The cast to long int works around a bug in the HP C Compiler
9940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9942# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009943{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9944echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009945if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009946 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009947else
Martin v. Löwis11437992002-04-12 09:54:03 +00009948 if test "$cross_compiling" = yes; then
9949 # Depending upon the size, compute the lo and hi bounds.
9950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* confdefs.h. */
9952_ACEOF
9953cat confdefs.h >>conftest.$ac_ext
9954cat >>conftest.$ac_ext <<_ACEOF
9955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009956$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009957 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009958int
9959main ()
9960{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009961static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009962test_array [0] = 0
9963
9964 ;
9965 return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969if { (ac_try="$ac_compile"
9970case "(($ac_try" in
9971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9972 *) ac_try_echo=$ac_try;;
9973esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009977 grep -v '^ *+' conftest.er1 >conftest.err
9978 rm -f conftest.er1
9979 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009981 (exit $ac_status); } && {
9982 test -z "$ac_c_werror_flag" ||
9983 test ! -s conftest.err
9984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009985 ac_lo=0 ac_mid=0
9986 while :; do
9987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009988/* confdefs.h. */
9989_ACEOF
9990cat confdefs.h >>conftest.$ac_ext
9991cat >>conftest.$ac_ext <<_ACEOF
9992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009993$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009994 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009995int
9996main ()
9997{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009998static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009999test_array [0] = 0
10000
10001 ;
10002 return 0;
10003}
10004_ACEOF
10005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006if { (ac_try="$ac_compile"
10007case "(($ac_try" in
10008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10009 *) ac_try_echo=$ac_try;;
10010esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010014 grep -v '^ *+' conftest.er1 >conftest.err
10015 rm -f conftest.er1
10016 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018 (exit $ac_status); } && {
10019 test -z "$ac_c_werror_flag" ||
10020 test ! -s conftest.err
10021 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010022 ac_hi=$ac_mid; break
10023else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010025sed 's/^/| /' conftest.$ac_ext >&5
10026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027 ac_lo=`expr $ac_mid + 1`
10028 if test $ac_lo -le $ac_mid; then
10029 ac_lo= ac_hi=
10030 break
10031 fi
10032 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010034
10035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 done
10037else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010039sed 's/^/| /' conftest.$ac_ext >&5
10040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010042/* confdefs.h. */
10043_ACEOF
10044cat confdefs.h >>conftest.$ac_ext
10045cat >>conftest.$ac_ext <<_ACEOF
10046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010047$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010048 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010049int
10050main ()
10051{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010052static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010053test_array [0] = 0
10054
10055 ;
10056 return 0;
10057}
10058_ACEOF
10059rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060if { (ac_try="$ac_compile"
10061case "(($ac_try" in
10062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10063 *) ac_try_echo=$ac_try;;
10064esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010068 grep -v '^ *+' conftest.er1 >conftest.err
10069 rm -f conftest.er1
10070 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072 (exit $ac_status); } && {
10073 test -z "$ac_c_werror_flag" ||
10074 test ! -s conftest.err
10075 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_hi=-1 ac_mid=-1
10077 while :; do
10078 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010079/* confdefs.h. */
10080_ACEOF
10081cat confdefs.h >>conftest.$ac_ext
10082cat >>conftest.$ac_ext <<_ACEOF
10083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010084$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010085 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010086int
10087main ()
10088{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010090test_array [0] = 0
10091
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097if { (ac_try="$ac_compile"
10098case "(($ac_try" in
10099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10100 *) ac_try_echo=$ac_try;;
10101esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010105 grep -v '^ *+' conftest.er1 >conftest.err
10106 rm -f conftest.er1
10107 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109 (exit $ac_status); } && {
10110 test -z "$ac_c_werror_flag" ||
10111 test ! -s conftest.err
10112 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_lo=$ac_mid; break
10114else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010116sed 's/^/| /' conftest.$ac_ext >&5
10117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 ac_hi=`expr '(' $ac_mid ')' - 1`
10119 if test $ac_mid -le $ac_hi; then
10120 ac_lo= ac_hi=
10121 break
10122 fi
10123 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125
10126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 done
10128else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010130sed 's/^/| /' conftest.$ac_ext >&5
10131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010134
10135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137
10138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010139# Binary search between lo and hi bounds.
10140while test "x$ac_lo" != "x$ac_hi"; do
10141 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010143/* confdefs.h. */
10144_ACEOF
10145cat confdefs.h >>conftest.$ac_ext
10146cat >>conftest.$ac_ext <<_ACEOF
10147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010148$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010149 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010150int
10151main ()
10152{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010154test_array [0] = 0
10155
10156 ;
10157 return 0;
10158}
10159_ACEOF
10160rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161if { (ac_try="$ac_compile"
10162case "(($ac_try" in
10163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10164 *) ac_try_echo=$ac_try;;
10165esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010169 grep -v '^ *+' conftest.er1 >conftest.err
10170 rm -f conftest.er1
10171 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010173 (exit $ac_status); } && {
10174 test -z "$ac_c_werror_flag" ||
10175 test ! -s conftest.err
10176 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_hi=$ac_mid
10178else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010180sed 's/^/| /' conftest.$ac_ext >&5
10181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010184
10185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010186done
10187case $ac_lo in
10188?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010189'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010190 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010191See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010192echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010193See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010194 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195 else
10196 ac_cv_sizeof_fpos_t=0
10197 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010198esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* confdefs.h. */
10202_ACEOF
10203cat confdefs.h >>conftest.$ac_ext
10204cat >>conftest.$ac_ext <<_ACEOF
10205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010206$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010207 typedef fpos_t ac__type_sizeof_;
10208static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10209static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010210#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010211#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010214{
Martin v. Löwis11437992002-04-12 09:54:03 +000010215
10216 FILE *f = fopen ("conftest.val", "w");
10217 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010219 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010220 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010221 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010222 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010224 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010225 }
10226 else
10227 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010229 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010231 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
10235 ;
10236 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010237}
Martin v. Löwis11437992002-04-12 09:54:03 +000010238_ACEOF
10239rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010240if { (ac_try="$ac_link"
10241case "(($ac_try" in
10242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10243 *) ac_try_echo=$ac_try;;
10244esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250 { (case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 (exit $ac_status); }; }; then
10259 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010260else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010261 echo "$as_me: program exited with status $ac_status" >&5
10262echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010263sed 's/^/| /' conftest.$ac_ext >&5
10264
Martin v. Löwis11437992002-04-12 09:54:03 +000010265( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010267 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010268See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010269echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010270See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010271 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272 else
10273 ac_cv_sizeof_fpos_t=0
10274 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276rm -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 +000010277fi
10278rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010279fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010280{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10281echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282
10283
10284
Martin v. Löwis11437992002-04-12 09:54:03 +000010285cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010286#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010287_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010288
Michael W. Hudson54241132001-12-07 15:38:26 +000010289
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010290{ echo "$as_me:$LINENO: checking for size_t" >&5
10291echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10292if test "${ac_cv_type_size_t+set}" = set; then
10293 echo $ECHO_N "(cached) $ECHO_C" >&6
10294else
10295 cat >conftest.$ac_ext <<_ACEOF
10296/* confdefs.h. */
10297_ACEOF
10298cat confdefs.h >>conftest.$ac_ext
10299cat >>conftest.$ac_ext <<_ACEOF
10300/* end confdefs.h. */
10301$ac_includes_default
10302typedef size_t ac__type_new_;
10303int
10304main ()
10305{
10306if ((ac__type_new_ *) 0)
10307 return 0;
10308if (sizeof (ac__type_new_))
10309 return 0;
10310 ;
10311 return 0;
10312}
10313_ACEOF
10314rm -f conftest.$ac_objext
10315if { (ac_try="$ac_compile"
10316case "(($ac_try" in
10317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10318 *) ac_try_echo=$ac_try;;
10319esac
10320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10321 (eval "$ac_compile") 2>conftest.er1
10322 ac_status=$?
10323 grep -v '^ *+' conftest.er1 >conftest.err
10324 rm -f conftest.er1
10325 cat conftest.err >&5
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); } && {
10328 test -z "$ac_c_werror_flag" ||
10329 test ! -s conftest.err
10330 } && test -s conftest.$ac_objext; then
10331 ac_cv_type_size_t=yes
10332else
10333 echo "$as_me: failed program was:" >&5
10334sed 's/^/| /' conftest.$ac_ext >&5
10335
10336 ac_cv_type_size_t=no
10337fi
10338
10339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10340fi
10341{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10342echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344# The cast to long int works around a bug in the HP C Compiler
10345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10347# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010348{ echo "$as_me:$LINENO: checking size of size_t" >&5
10349echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010350if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010351 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010352else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010353 if test "$cross_compiling" = yes; then
10354 # Depending upon the size, compute the lo and hi bounds.
10355cat >conftest.$ac_ext <<_ACEOF
10356/* confdefs.h. */
10357_ACEOF
10358cat confdefs.h >>conftest.$ac_ext
10359cat >>conftest.$ac_ext <<_ACEOF
10360/* end confdefs.h. */
10361$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010362 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010363int
10364main ()
10365{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010367test_array [0] = 0
10368
10369 ;
10370 return 0;
10371}
10372_ACEOF
10373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374if { (ac_try="$ac_compile"
10375case "(($ac_try" in
10376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10377 *) ac_try_echo=$ac_try;;
10378esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010381 ac_status=$?
10382 grep -v '^ *+' conftest.er1 >conftest.err
10383 rm -f conftest.er1
10384 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386 (exit $ac_status); } && {
10387 test -z "$ac_c_werror_flag" ||
10388 test ! -s conftest.err
10389 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390 ac_lo=0 ac_mid=0
10391 while :; do
10392 cat >conftest.$ac_ext <<_ACEOF
10393/* confdefs.h. */
10394_ACEOF
10395cat confdefs.h >>conftest.$ac_ext
10396cat >>conftest.$ac_ext <<_ACEOF
10397/* end confdefs.h. */
10398$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010399 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010400int
10401main ()
10402{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010404test_array [0] = 0
10405
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010411if { (ac_try="$ac_compile"
10412case "(($ac_try" in
10413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10414 *) ac_try_echo=$ac_try;;
10415esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010418 ac_status=$?
10419 grep -v '^ *+' conftest.er1 >conftest.err
10420 rm -f conftest.er1
10421 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423 (exit $ac_status); } && {
10424 test -z "$ac_c_werror_flag" ||
10425 test ! -s conftest.err
10426 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010427 ac_hi=$ac_mid; break
10428else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010429 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010430sed 's/^/| /' conftest.$ac_ext >&5
10431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 ac_lo=`expr $ac_mid + 1`
10433 if test $ac_lo -le $ac_mid; then
10434 ac_lo= ac_hi=
10435 break
10436 fi
10437 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439
10440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010441 done
10442else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010443 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444sed 's/^/| /' conftest.$ac_ext >&5
10445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010447/* confdefs.h. */
10448_ACEOF
10449cat confdefs.h >>conftest.$ac_ext
10450cat >>conftest.$ac_ext <<_ACEOF
10451/* end confdefs.h. */
10452$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010453 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010454int
10455main ()
10456{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010457static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458test_array [0] = 0
10459
10460 ;
10461 return 0;
10462}
10463_ACEOF
10464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465if { (ac_try="$ac_compile"
10466case "(($ac_try" in
10467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10468 *) ac_try_echo=$ac_try;;
10469esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010471 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010472 ac_status=$?
10473 grep -v '^ *+' conftest.er1 >conftest.err
10474 rm -f conftest.er1
10475 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010477 (exit $ac_status); } && {
10478 test -z "$ac_c_werror_flag" ||
10479 test ! -s conftest.err
10480 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481 ac_hi=-1 ac_mid=-1
10482 while :; do
10483 cat >conftest.$ac_ext <<_ACEOF
10484/* confdefs.h. */
10485_ACEOF
10486cat confdefs.h >>conftest.$ac_ext
10487cat >>conftest.$ac_ext <<_ACEOF
10488/* end confdefs.h. */
10489$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010490 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010491int
10492main ()
10493{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010494static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010495test_array [0] = 0
10496
10497 ;
10498 return 0;
10499}
10500_ACEOF
10501rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502if { (ac_try="$ac_compile"
10503case "(($ac_try" in
10504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10505 *) ac_try_echo=$ac_try;;
10506esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010508 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010509 ac_status=$?
10510 grep -v '^ *+' conftest.er1 >conftest.err
10511 rm -f conftest.er1
10512 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514 (exit $ac_status); } && {
10515 test -z "$ac_c_werror_flag" ||
10516 test ! -s conftest.err
10517 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010518 ac_lo=$ac_mid; break
10519else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010520 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521sed 's/^/| /' conftest.$ac_ext >&5
10522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 ac_hi=`expr '(' $ac_mid ')' - 1`
10524 if test $ac_mid -le $ac_hi; then
10525 ac_lo= ac_hi=
10526 break
10527 fi
10528 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530
10531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010532 done
10533else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010534 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535sed 's/^/| /' conftest.$ac_ext >&5
10536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539
10540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010542
10543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544# Binary search between lo and hi bounds.
10545while test "x$ac_lo" != "x$ac_hi"; do
10546 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10547 cat >conftest.$ac_ext <<_ACEOF
10548/* confdefs.h. */
10549_ACEOF
10550cat confdefs.h >>conftest.$ac_ext
10551cat >>conftest.$ac_ext <<_ACEOF
10552/* end confdefs.h. */
10553$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010554 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010555int
10556main ()
10557{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010558static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559test_array [0] = 0
10560
10561 ;
10562 return 0;
10563}
10564_ACEOF
10565rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010566if { (ac_try="$ac_compile"
10567case "(($ac_try" in
10568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10569 *) ac_try_echo=$ac_try;;
10570esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573 ac_status=$?
10574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_hi=$ac_mid
10583else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010584 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585sed 's/^/| /' conftest.$ac_ext >&5
10586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589
10590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010591done
10592case $ac_lo in
10593?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010595 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010597echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010598See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010599 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600 else
10601 ac_cv_sizeof_size_t=0
10602 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603esac
10604else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010605 cat >conftest.$ac_ext <<_ACEOF
10606/* confdefs.h. */
10607_ACEOF
10608cat confdefs.h >>conftest.$ac_ext
10609cat >>conftest.$ac_ext <<_ACEOF
10610/* end confdefs.h. */
10611$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010612 typedef size_t ac__type_sizeof_;
10613static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10614static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010615#include <stdio.h>
10616#include <stdlib.h>
10617int
10618main ()
10619{
10620
10621 FILE *f = fopen ("conftest.val", "w");
10622 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010624 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010627 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010629 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630 }
10631 else
10632 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010634 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010636 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010639
10640 ;
10641 return 0;
10642}
10643_ACEOF
10644rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645if { (ac_try="$ac_link"
10646case "(($ac_try" in
10647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10648 *) ac_try_echo=$ac_try;;
10649esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655 { (case "(($ac_try" in
10656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10657 *) ac_try_echo=$ac_try;;
10658esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 (exit $ac_status); }; }; then
10664 ac_cv_sizeof_size_t=`cat conftest.val`
10665else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010666 echo "$as_me: program exited with status $ac_status" >&5
10667echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010668sed 's/^/| /' conftest.$ac_ext >&5
10669
10670( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010672 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010674echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010675See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010676 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677 else
10678 ac_cv_sizeof_size_t=0
10679 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681rm -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 +000010682fi
10683rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010685{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10686echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687
10688
10689
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690cat >>confdefs.h <<_ACEOF
10691#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10692_ACEOF
10693
10694
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010695{ echo "$as_me:$LINENO: checking for pid_t" >&5
10696echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10697if test "${ac_cv_type_pid_t+set}" = set; then
10698 echo $ECHO_N "(cached) $ECHO_C" >&6
10699else
10700 cat >conftest.$ac_ext <<_ACEOF
10701/* confdefs.h. */
10702_ACEOF
10703cat confdefs.h >>conftest.$ac_ext
10704cat >>conftest.$ac_ext <<_ACEOF
10705/* end confdefs.h. */
10706$ac_includes_default
10707typedef pid_t ac__type_new_;
10708int
10709main ()
10710{
10711if ((ac__type_new_ *) 0)
10712 return 0;
10713if (sizeof (ac__type_new_))
10714 return 0;
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext
10720if { (ac_try="$ac_compile"
10721case "(($ac_try" in
10722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10723 *) ac_try_echo=$ac_try;;
10724esac
10725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10726 (eval "$ac_compile") 2>conftest.er1
10727 ac_status=$?
10728 grep -v '^ *+' conftest.er1 >conftest.err
10729 rm -f conftest.er1
10730 cat conftest.err >&5
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); } && {
10733 test -z "$ac_c_werror_flag" ||
10734 test ! -s conftest.err
10735 } && test -s conftest.$ac_objext; then
10736 ac_cv_type_pid_t=yes
10737else
10738 echo "$as_me: failed program was:" >&5
10739sed 's/^/| /' conftest.$ac_ext >&5
10740
10741 ac_cv_type_pid_t=no
10742fi
10743
10744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10745fi
10746{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10747echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10748
Christian Heimes400adb02008-02-01 08:12:03 +000010749# The cast to long int works around a bug in the HP C Compiler
10750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10752# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010753{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10754echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010755if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010756 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010757else
10758 if test "$cross_compiling" = yes; then
10759 # Depending upon the size, compute the lo and hi bounds.
10760cat >conftest.$ac_ext <<_ACEOF
10761/* confdefs.h. */
10762_ACEOF
10763cat confdefs.h >>conftest.$ac_ext
10764cat >>conftest.$ac_ext <<_ACEOF
10765/* end confdefs.h. */
10766$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010767 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010768int
10769main ()
10770{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010772test_array [0] = 0
10773
10774 ;
10775 return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext
10779if { (ac_try="$ac_compile"
10780case "(($ac_try" in
10781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10782 *) ac_try_echo=$ac_try;;
10783esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010785 (eval "$ac_compile") 2>conftest.er1
10786 ac_status=$?
10787 grep -v '^ *+' conftest.er1 >conftest.err
10788 rm -f conftest.er1
10789 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010791 (exit $ac_status); } && {
10792 test -z "$ac_c_werror_flag" ||
10793 test ! -s conftest.err
10794 } && test -s conftest.$ac_objext; then
10795 ac_lo=0 ac_mid=0
10796 while :; do
10797 cat >conftest.$ac_ext <<_ACEOF
10798/* confdefs.h. */
10799_ACEOF
10800cat confdefs.h >>conftest.$ac_ext
10801cat >>conftest.$ac_ext <<_ACEOF
10802/* end confdefs.h. */
10803$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010804 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010805int
10806main ()
10807{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010809test_array [0] = 0
10810
10811 ;
10812 return 0;
10813}
10814_ACEOF
10815rm -f conftest.$ac_objext
10816if { (ac_try="$ac_compile"
10817case "(($ac_try" in
10818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10819 *) ac_try_echo=$ac_try;;
10820esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010822 (eval "$ac_compile") 2>conftest.er1
10823 ac_status=$?
10824 grep -v '^ *+' conftest.er1 >conftest.err
10825 rm -f conftest.er1
10826 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010828 (exit $ac_status); } && {
10829 test -z "$ac_c_werror_flag" ||
10830 test ! -s conftest.err
10831 } && test -s conftest.$ac_objext; then
10832 ac_hi=$ac_mid; break
10833else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010834 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010835sed 's/^/| /' conftest.$ac_ext >&5
10836
10837 ac_lo=`expr $ac_mid + 1`
10838 if test $ac_lo -le $ac_mid; then
10839 ac_lo= ac_hi=
10840 break
10841 fi
10842 ac_mid=`expr 2 '*' $ac_mid + 1`
10843fi
10844
10845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10846 done
10847else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010848 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010849sed 's/^/| /' conftest.$ac_ext >&5
10850
10851 cat >conftest.$ac_ext <<_ACEOF
10852/* confdefs.h. */
10853_ACEOF
10854cat confdefs.h >>conftest.$ac_ext
10855cat >>conftest.$ac_ext <<_ACEOF
10856/* end confdefs.h. */
10857$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010858 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010859int
10860main ()
10861{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010862static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010863test_array [0] = 0
10864
10865 ;
10866 return 0;
10867}
10868_ACEOF
10869rm -f conftest.$ac_objext
10870if { (ac_try="$ac_compile"
10871case "(($ac_try" in
10872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10873 *) ac_try_echo=$ac_try;;
10874esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010876 (eval "$ac_compile") 2>conftest.er1
10877 ac_status=$?
10878 grep -v '^ *+' conftest.er1 >conftest.err
10879 rm -f conftest.er1
10880 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010882 (exit $ac_status); } && {
10883 test -z "$ac_c_werror_flag" ||
10884 test ! -s conftest.err
10885 } && test -s conftest.$ac_objext; then
10886 ac_hi=-1 ac_mid=-1
10887 while :; do
10888 cat >conftest.$ac_ext <<_ACEOF
10889/* confdefs.h. */
10890_ACEOF
10891cat confdefs.h >>conftest.$ac_ext
10892cat >>conftest.$ac_ext <<_ACEOF
10893/* end confdefs.h. */
10894$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010895 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010896int
10897main ()
10898{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010900test_array [0] = 0
10901
10902 ;
10903 return 0;
10904}
10905_ACEOF
10906rm -f conftest.$ac_objext
10907if { (ac_try="$ac_compile"
10908case "(($ac_try" in
10909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10910 *) ac_try_echo=$ac_try;;
10911esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010913 (eval "$ac_compile") 2>conftest.er1
10914 ac_status=$?
10915 grep -v '^ *+' conftest.er1 >conftest.err
10916 rm -f conftest.er1
10917 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010919 (exit $ac_status); } && {
10920 test -z "$ac_c_werror_flag" ||
10921 test ! -s conftest.err
10922 } && test -s conftest.$ac_objext; then
10923 ac_lo=$ac_mid; break
10924else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010925 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010926sed 's/^/| /' conftest.$ac_ext >&5
10927
10928 ac_hi=`expr '(' $ac_mid ')' - 1`
10929 if test $ac_mid -le $ac_hi; then
10930 ac_lo= ac_hi=
10931 break
10932 fi
10933 ac_mid=`expr 2 '*' $ac_mid`
10934fi
10935
10936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10937 done
10938else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010939 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010940sed 's/^/| /' conftest.$ac_ext >&5
10941
10942 ac_lo= ac_hi=
10943fi
10944
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946fi
10947
10948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10949# Binary search between lo and hi bounds.
10950while test "x$ac_lo" != "x$ac_hi"; do
10951 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10952 cat >conftest.$ac_ext <<_ACEOF
10953/* confdefs.h. */
10954_ACEOF
10955cat confdefs.h >>conftest.$ac_ext
10956cat >>conftest.$ac_ext <<_ACEOF
10957/* end confdefs.h. */
10958$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010959 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010960int
10961main ()
10962{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010963static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010964test_array [0] = 0
10965
10966 ;
10967 return 0;
10968}
10969_ACEOF
10970rm -f conftest.$ac_objext
10971if { (ac_try="$ac_compile"
10972case "(($ac_try" in
10973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10974 *) ac_try_echo=$ac_try;;
10975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010977 (eval "$ac_compile") 2>conftest.er1
10978 ac_status=$?
10979 grep -v '^ *+' conftest.er1 >conftest.err
10980 rm -f conftest.er1
10981 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010983 (exit $ac_status); } && {
10984 test -z "$ac_c_werror_flag" ||
10985 test ! -s conftest.err
10986 } && test -s conftest.$ac_objext; then
10987 ac_hi=$ac_mid
10988else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010989 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010990sed 's/^/| /' conftest.$ac_ext >&5
10991
10992 ac_lo=`expr '(' $ac_mid ')' + 1`
10993fi
10994
10995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996done
10997case $ac_lo in
10998?*) ac_cv_sizeof_pid_t=$ac_lo;;
10999'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011000 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011001See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011002echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011003See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011004 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011005 else
11006 ac_cv_sizeof_pid_t=0
11007 fi ;;
11008esac
11009else
11010 cat >conftest.$ac_ext <<_ACEOF
11011/* confdefs.h. */
11012_ACEOF
11013cat confdefs.h >>conftest.$ac_ext
11014cat >>conftest.$ac_ext <<_ACEOF
11015/* end confdefs.h. */
11016$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011017 typedef pid_t ac__type_sizeof_;
11018static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11019static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011020#include <stdio.h>
11021#include <stdlib.h>
11022int
11023main ()
11024{
11025
11026 FILE *f = fopen ("conftest.val", "w");
11027 if (! f)
11028 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011029 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011030 {
11031 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011032 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011033 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011034 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011035 }
11036 else
11037 {
11038 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011039 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011040 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011041 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011042 }
11043 return ferror (f) || fclose (f) != 0;
11044
11045 ;
11046 return 0;
11047}
11048_ACEOF
11049rm -f conftest$ac_exeext
11050if { (ac_try="$ac_link"
11051case "(($ac_try" in
11052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11053 *) ac_try_echo=$ac_try;;
11054esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011056 (eval "$ac_link") 2>&5
11057 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011059 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11060 { (case "(($ac_try" in
11061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11062 *) ac_try_echo=$ac_try;;
11063esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011065 (eval "$ac_try") 2>&5
11066 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011068 (exit $ac_status); }; }; then
11069 ac_cv_sizeof_pid_t=`cat conftest.val`
11070else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011071 echo "$as_me: program exited with status $ac_status" >&5
11072echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011073sed 's/^/| /' conftest.$ac_ext >&5
11074
11075( exit $ac_status )
11076if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011077 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011078See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011079echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011080See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011081 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011082 else
11083 ac_cv_sizeof_pid_t=0
11084 fi
11085fi
11086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11087fi
11088rm -f conftest.val
11089fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011090{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11091echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011092
11093
11094
11095cat >>confdefs.h <<_ACEOF
11096#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11097_ACEOF
11098
11099
Michael W. Hudson54241132001-12-07 15:38:26 +000011100
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011101{ echo "$as_me:$LINENO: checking for long long support" >&5
11102echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011103have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011104cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011105/* confdefs.h. */
11106_ACEOF
11107cat confdefs.h >>conftest.$ac_ext
11108cat >>conftest.$ac_ext <<_ACEOF
11109/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011110
Martin v. Löwis11437992002-04-12 09:54:03 +000011111int
11112main ()
11113{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011114long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 ;
11116 return 0;
11117}
11118_ACEOF
11119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120if { (ac_try="$ac_compile"
11121case "(($ac_try" in
11122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11123 *) ac_try_echo=$ac_try;;
11124esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011128 grep -v '^ *+' conftest.er1 >conftest.err
11129 rm -f conftest.er1
11130 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132 (exit $ac_status); } && {
11133 test -z "$ac_c_werror_flag" ||
11134 test ! -s conftest.err
11135 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
11137
11138cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011139#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
11141
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011142 have_long_long=yes
11143
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011144else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011145 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011146sed 's/^/| /' conftest.$ac_ext >&5
11147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150
11151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011152{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11153echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011154if test "$have_long_long" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011155{ echo "$as_me:$LINENO: checking for long long" >&5
11156echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11157if test "${ac_cv_type_long_long+set}" = set; then
11158 echo $ECHO_N "(cached) $ECHO_C" >&6
11159else
11160 cat >conftest.$ac_ext <<_ACEOF
11161/* confdefs.h. */
11162_ACEOF
11163cat confdefs.h >>conftest.$ac_ext
11164cat >>conftest.$ac_ext <<_ACEOF
11165/* end confdefs.h. */
11166$ac_includes_default
11167typedef long long ac__type_new_;
11168int
11169main ()
11170{
11171if ((ac__type_new_ *) 0)
11172 return 0;
11173if (sizeof (ac__type_new_))
11174 return 0;
11175 ;
11176 return 0;
11177}
11178_ACEOF
11179rm -f conftest.$ac_objext
11180if { (ac_try="$ac_compile"
11181case "(($ac_try" in
11182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11183 *) ac_try_echo=$ac_try;;
11184esac
11185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11186 (eval "$ac_compile") 2>conftest.er1
11187 ac_status=$?
11188 grep -v '^ *+' conftest.er1 >conftest.err
11189 rm -f conftest.er1
11190 cat conftest.err >&5
11191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11192 (exit $ac_status); } && {
11193 test -z "$ac_c_werror_flag" ||
11194 test ! -s conftest.err
11195 } && test -s conftest.$ac_objext; then
11196 ac_cv_type_long_long=yes
11197else
11198 echo "$as_me: failed program was:" >&5
11199sed 's/^/| /' conftest.$ac_ext >&5
11200
11201 ac_cv_type_long_long=no
11202fi
11203
11204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11205fi
11206{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11207echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209# The cast to long int works around a bug in the HP C Compiler
11210# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11211# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11212# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011213{ echo "$as_me:$LINENO: checking size of long long" >&5
11214echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011215if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011216 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011217else
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 if test "$cross_compiling" = yes; then
11219 # Depending upon the size, compute the lo and hi bounds.
11220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* confdefs.h. */
11222_ACEOF
11223cat confdefs.h >>conftest.$ac_ext
11224cat >>conftest.$ac_ext <<_ACEOF
11225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011226$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011227 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011231static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011232test_array [0] = 0
11233
11234 ;
11235 return 0;
11236}
11237_ACEOF
11238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239if { (ac_try="$ac_compile"
11240case "(($ac_try" in
11241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11242 *) ac_try_echo=$ac_try;;
11243esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011245 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011247 grep -v '^ *+' conftest.er1 >conftest.err
11248 rm -f conftest.er1
11249 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251 (exit $ac_status); } && {
11252 test -z "$ac_c_werror_flag" ||
11253 test ! -s conftest.err
11254 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ac_lo=0 ac_mid=0
11256 while :; do
11257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* confdefs.h. */
11259_ACEOF
11260cat confdefs.h >>conftest.$ac_ext
11261cat >>conftest.$ac_ext <<_ACEOF
11262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011263$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011264 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011265int
11266main ()
11267{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011268static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011269test_array [0] = 0
11270
11271 ;
11272 return 0;
11273}
11274_ACEOF
11275rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011276if { (ac_try="$ac_compile"
11277case "(($ac_try" in
11278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11279 *) ac_try_echo=$ac_try;;
11280esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011282 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011284 grep -v '^ *+' conftest.er1 >conftest.err
11285 rm -f conftest.er1
11286 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288 (exit $ac_status); } && {
11289 test -z "$ac_c_werror_flag" ||
11290 test ! -s conftest.err
11291 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011292 ac_hi=$ac_mid; break
11293else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011295sed 's/^/| /' conftest.$ac_ext >&5
11296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 ac_lo=`expr $ac_mid + 1`
11298 if test $ac_lo -le $ac_mid; then
11299 ac_lo= ac_hi=
11300 break
11301 fi
11302 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011304
11305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 done
11307else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011309sed 's/^/| /' conftest.$ac_ext >&5
11310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011312/* confdefs.h. */
11313_ACEOF
11314cat confdefs.h >>conftest.$ac_ext
11315cat >>conftest.$ac_ext <<_ACEOF
11316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011317$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011318 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011319int
11320main ()
11321{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011322static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011323test_array [0] = 0
11324
11325 ;
11326 return 0;
11327}
11328_ACEOF
11329rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330if { (ac_try="$ac_compile"
11331case "(($ac_try" in
11332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11333 *) ac_try_echo=$ac_try;;
11334esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011338 grep -v '^ *+' conftest.er1 >conftest.err
11339 rm -f conftest.er1
11340 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011342 (exit $ac_status); } && {
11343 test -z "$ac_c_werror_flag" ||
11344 test ! -s conftest.err
11345 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ac_hi=-1 ac_mid=-1
11347 while :; do
11348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* confdefs.h. */
11350_ACEOF
11351cat confdefs.h >>conftest.$ac_ext
11352cat >>conftest.$ac_ext <<_ACEOF
11353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011354$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011355 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011356int
11357main ()
11358{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011359static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011360test_array [0] = 0
11361
11362 ;
11363 return 0;
11364}
11365_ACEOF
11366rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011367if { (ac_try="$ac_compile"
11368case "(($ac_try" in
11369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11370 *) ac_try_echo=$ac_try;;
11371esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011375 grep -v '^ *+' conftest.er1 >conftest.err
11376 rm -f conftest.er1
11377 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011379 (exit $ac_status); } && {
11380 test -z "$ac_c_werror_flag" ||
11381 test ! -s conftest.err
11382 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ac_lo=$ac_mid; break
11384else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011386sed 's/^/| /' conftest.$ac_ext >&5
11387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 ac_hi=`expr '(' $ac_mid ')' - 1`
11389 if test $ac_mid -le $ac_hi; then
11390 ac_lo= ac_hi=
11391 break
11392 fi
11393 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395
11396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 done
11398else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011400sed 's/^/| /' conftest.$ac_ext >&5
11401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011404
11405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407
11408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011409# Binary search between lo and hi bounds.
11410while test "x$ac_lo" != "x$ac_hi"; do
11411 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* confdefs.h. */
11414_ACEOF
11415cat confdefs.h >>conftest.$ac_ext
11416cat >>conftest.$ac_ext <<_ACEOF
11417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011419 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011420int
11421main ()
11422{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011423static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011424test_array [0] = 0
11425
11426 ;
11427 return 0;
11428}
11429_ACEOF
11430rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431if { (ac_try="$ac_compile"
11432case "(($ac_try" in
11433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11434 *) ac_try_echo=$ac_try;;
11435esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011439 grep -v '^ *+' conftest.er1 >conftest.err
11440 rm -f conftest.er1
11441 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443 (exit $ac_status); } && {
11444 test -z "$ac_c_werror_flag" ||
11445 test ! -s conftest.err
11446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_hi=$ac_mid
11448else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011450sed 's/^/| /' conftest.$ac_ext >&5
11451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454
11455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011456done
11457case $ac_lo in
11458?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011460 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011461See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011462echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011463See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011464 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465 else
11466 ac_cv_sizeof_long_long=0
11467 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011468esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011469else
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* confdefs.h. */
11472_ACEOF
11473cat confdefs.h >>conftest.$ac_ext
11474cat >>conftest.$ac_ext <<_ACEOF
11475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011477 typedef long long ac__type_sizeof_;
11478static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11479static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011480#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011481#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011484{
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
11486 FILE *f = fopen ("conftest.val", "w");
11487 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011489 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011491 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011492 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011494 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 }
11496 else
11497 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011498 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011499 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011501 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011504
11505 ;
11506 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011507}
Martin v. Löwis11437992002-04-12 09:54:03 +000011508_ACEOF
11509rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011510if { (ac_try="$ac_link"
11511case "(($ac_try" in
11512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11513 *) ac_try_echo=$ac_try;;
11514esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011520 { (case "(($ac_try" in
11521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11522 *) ac_try_echo=$ac_try;;
11523esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 (exit $ac_status); }; }; then
11529 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011530else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011531 echo "$as_me: program exited with status $ac_status" >&5
11532echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011533sed 's/^/| /' conftest.$ac_ext >&5
11534
Martin v. Löwis11437992002-04-12 09:54:03 +000011535( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011537 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011538See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011539echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011540See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011541 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542 else
11543 ac_cv_sizeof_long_long=0
11544 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546rm -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 +000011547fi
11548rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011550{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11551echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552
11553
11554
Martin v. Löwis11437992002-04-12 09:54:03 +000011555cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011556#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011557_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011558
Michael W. Hudson54241132001-12-07 15:38:26 +000011559
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011560fi
11561
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011562{ echo "$as_me:$LINENO: checking for long double support" >&5
11563echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011564have_long_double=no
11565cat >conftest.$ac_ext <<_ACEOF
11566/* confdefs.h. */
11567_ACEOF
11568cat confdefs.h >>conftest.$ac_ext
11569cat >>conftest.$ac_ext <<_ACEOF
11570/* end confdefs.h. */
11571
11572int
11573main ()
11574{
11575long double x; x = (long double)0;
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
11581if { (ac_try="$ac_compile"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011587 (eval "$ac_compile") 2>conftest.er1
11588 ac_status=$?
11589 grep -v '^ *+' conftest.er1 >conftest.err
11590 rm -f conftest.er1
11591 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011593 (exit $ac_status); } && {
11594 test -z "$ac_c_werror_flag" ||
11595 test ! -s conftest.err
11596 } && test -s conftest.$ac_objext; then
11597
11598
11599cat >>confdefs.h <<\_ACEOF
11600#define HAVE_LONG_DOUBLE 1
11601_ACEOF
11602
11603 have_long_double=yes
11604
11605else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011606 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011607sed 's/^/| /' conftest.$ac_ext >&5
11608
11609
11610fi
11611
11612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011613{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11614echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011615if test "$have_long_double" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011616{ echo "$as_me:$LINENO: checking for long double" >&5
11617echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11618if test "${ac_cv_type_long_double+set}" = set; then
11619 echo $ECHO_N "(cached) $ECHO_C" >&6
11620else
11621 cat >conftest.$ac_ext <<_ACEOF
11622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
11627$ac_includes_default
11628typedef long double ac__type_new_;
11629int
11630main ()
11631{
11632if ((ac__type_new_ *) 0)
11633 return 0;
11634if (sizeof (ac__type_new_))
11635 return 0;
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640rm -f conftest.$ac_objext
11641if { (ac_try="$ac_compile"
11642case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
11646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11647 (eval "$ac_compile") 2>conftest.er1
11648 ac_status=$?
11649 grep -v '^ *+' conftest.er1 >conftest.err
11650 rm -f conftest.er1
11651 cat conftest.err >&5
11652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11653 (exit $ac_status); } && {
11654 test -z "$ac_c_werror_flag" ||
11655 test ! -s conftest.err
11656 } && test -s conftest.$ac_objext; then
11657 ac_cv_type_long_double=yes
11658else
11659 echo "$as_me: failed program was:" >&5
11660sed 's/^/| /' conftest.$ac_ext >&5
11661
11662 ac_cv_type_long_double=no
11663fi
11664
11665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11666fi
11667{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11668echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11669
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011670# The cast to long int works around a bug in the HP C Compiler
11671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11673# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011674{ echo "$as_me:$LINENO: checking size of long double" >&5
11675echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011676if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011677 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011678else
11679 if test "$cross_compiling" = yes; then
11680 # Depending upon the size, compute the lo and hi bounds.
11681cat >conftest.$ac_ext <<_ACEOF
11682/* confdefs.h. */
11683_ACEOF
11684cat confdefs.h >>conftest.$ac_ext
11685cat >>conftest.$ac_ext <<_ACEOF
11686/* end confdefs.h. */
11687$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011688 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011689int
11690main ()
11691{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011693test_array [0] = 0
11694
11695 ;
11696 return 0;
11697}
11698_ACEOF
11699rm -f conftest.$ac_objext
11700if { (ac_try="$ac_compile"
11701case "(($ac_try" in
11702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11703 *) ac_try_echo=$ac_try;;
11704esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011706 (eval "$ac_compile") 2>conftest.er1
11707 ac_status=$?
11708 grep -v '^ *+' conftest.er1 >conftest.err
11709 rm -f conftest.er1
11710 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011712 (exit $ac_status); } && {
11713 test -z "$ac_c_werror_flag" ||
11714 test ! -s conftest.err
11715 } && test -s conftest.$ac_objext; then
11716 ac_lo=0 ac_mid=0
11717 while :; do
11718 cat >conftest.$ac_ext <<_ACEOF
11719/* confdefs.h. */
11720_ACEOF
11721cat confdefs.h >>conftest.$ac_ext
11722cat >>conftest.$ac_ext <<_ACEOF
11723/* end confdefs.h. */
11724$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011725 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011726int
11727main ()
11728{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011730test_array [0] = 0
11731
11732 ;
11733 return 0;
11734}
11735_ACEOF
11736rm -f conftest.$ac_objext
11737if { (ac_try="$ac_compile"
11738case "(($ac_try" in
11739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11740 *) ac_try_echo=$ac_try;;
11741esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011743 (eval "$ac_compile") 2>conftest.er1
11744 ac_status=$?
11745 grep -v '^ *+' conftest.er1 >conftest.err
11746 rm -f conftest.er1
11747 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011749 (exit $ac_status); } && {
11750 test -z "$ac_c_werror_flag" ||
11751 test ! -s conftest.err
11752 } && test -s conftest.$ac_objext; then
11753 ac_hi=$ac_mid; break
11754else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011755 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011756sed 's/^/| /' conftest.$ac_ext >&5
11757
11758 ac_lo=`expr $ac_mid + 1`
11759 if test $ac_lo -le $ac_mid; then
11760 ac_lo= ac_hi=
11761 break
11762 fi
11763 ac_mid=`expr 2 '*' $ac_mid + 1`
11764fi
11765
11766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11767 done
11768else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011769 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011770sed 's/^/| /' conftest.$ac_ext >&5
11771
11772 cat >conftest.$ac_ext <<_ACEOF
11773/* confdefs.h. */
11774_ACEOF
11775cat confdefs.h >>conftest.$ac_ext
11776cat >>conftest.$ac_ext <<_ACEOF
11777/* end confdefs.h. */
11778$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011779 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011780int
11781main ()
11782{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011783static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011784test_array [0] = 0
11785
11786 ;
11787 return 0;
11788}
11789_ACEOF
11790rm -f conftest.$ac_objext
11791if { (ac_try="$ac_compile"
11792case "(($ac_try" in
11793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11794 *) ac_try_echo=$ac_try;;
11795esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011797 (eval "$ac_compile") 2>conftest.er1
11798 ac_status=$?
11799 grep -v '^ *+' conftest.er1 >conftest.err
11800 rm -f conftest.er1
11801 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011803 (exit $ac_status); } && {
11804 test -z "$ac_c_werror_flag" ||
11805 test ! -s conftest.err
11806 } && test -s conftest.$ac_objext; then
11807 ac_hi=-1 ac_mid=-1
11808 while :; do
11809 cat >conftest.$ac_ext <<_ACEOF
11810/* confdefs.h. */
11811_ACEOF
11812cat confdefs.h >>conftest.$ac_ext
11813cat >>conftest.$ac_ext <<_ACEOF
11814/* end confdefs.h. */
11815$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011816 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011817int
11818main ()
11819{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011820static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011821test_array [0] = 0
11822
11823 ;
11824 return 0;
11825}
11826_ACEOF
11827rm -f conftest.$ac_objext
11828if { (ac_try="$ac_compile"
11829case "(($ac_try" in
11830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11831 *) ac_try_echo=$ac_try;;
11832esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011834 (eval "$ac_compile") 2>conftest.er1
11835 ac_status=$?
11836 grep -v '^ *+' conftest.er1 >conftest.err
11837 rm -f conftest.er1
11838 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011840 (exit $ac_status); } && {
11841 test -z "$ac_c_werror_flag" ||
11842 test ! -s conftest.err
11843 } && test -s conftest.$ac_objext; then
11844 ac_lo=$ac_mid; break
11845else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011846 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011847sed 's/^/| /' conftest.$ac_ext >&5
11848
11849 ac_hi=`expr '(' $ac_mid ')' - 1`
11850 if test $ac_mid -le $ac_hi; then
11851 ac_lo= ac_hi=
11852 break
11853 fi
11854 ac_mid=`expr 2 '*' $ac_mid`
11855fi
11856
11857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11858 done
11859else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011860 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861sed 's/^/| /' conftest.$ac_ext >&5
11862
11863 ac_lo= ac_hi=
11864fi
11865
11866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11867fi
11868
11869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11870# Binary search between lo and hi bounds.
11871while test "x$ac_lo" != "x$ac_hi"; do
11872 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11873 cat >conftest.$ac_ext <<_ACEOF
11874/* confdefs.h. */
11875_ACEOF
11876cat confdefs.h >>conftest.$ac_ext
11877cat >>conftest.$ac_ext <<_ACEOF
11878/* end confdefs.h. */
11879$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011880 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011881int
11882main ()
11883{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011884static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011885test_array [0] = 0
11886
11887 ;
11888 return 0;
11889}
11890_ACEOF
11891rm -f conftest.$ac_objext
11892if { (ac_try="$ac_compile"
11893case "(($ac_try" in
11894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11895 *) ac_try_echo=$ac_try;;
11896esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011898 (eval "$ac_compile") 2>conftest.er1
11899 ac_status=$?
11900 grep -v '^ *+' conftest.er1 >conftest.err
11901 rm -f conftest.er1
11902 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011904 (exit $ac_status); } && {
11905 test -z "$ac_c_werror_flag" ||
11906 test ! -s conftest.err
11907 } && test -s conftest.$ac_objext; then
11908 ac_hi=$ac_mid
11909else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011910 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011911sed 's/^/| /' conftest.$ac_ext >&5
11912
11913 ac_lo=`expr '(' $ac_mid ')' + 1`
11914fi
11915
11916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11917done
11918case $ac_lo in
11919?*) ac_cv_sizeof_long_double=$ac_lo;;
11920'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011921 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011922See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011923echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011924See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011925 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011926 else
11927 ac_cv_sizeof_long_double=0
11928 fi ;;
11929esac
11930else
11931 cat >conftest.$ac_ext <<_ACEOF
11932/* confdefs.h. */
11933_ACEOF
11934cat confdefs.h >>conftest.$ac_ext
11935cat >>conftest.$ac_ext <<_ACEOF
11936/* end confdefs.h. */
11937$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011938 typedef long double ac__type_sizeof_;
11939static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11940static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011941#include <stdio.h>
11942#include <stdlib.h>
11943int
11944main ()
11945{
11946
11947 FILE *f = fopen ("conftest.val", "w");
11948 if (! f)
11949 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011950 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951 {
11952 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011953 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011954 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011955 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956 }
11957 else
11958 {
11959 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011960 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011961 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011962 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963 }
11964 return ferror (f) || fclose (f) != 0;
11965
11966 ;
11967 return 0;
11968}
11969_ACEOF
11970rm -f conftest$ac_exeext
11971if { (ac_try="$ac_link"
11972case "(($ac_try" in
11973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11974 *) ac_try_echo=$ac_try;;
11975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011977 (eval "$ac_link") 2>&5
11978 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11981 { (case "(($ac_try" in
11982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11983 *) ac_try_echo=$ac_try;;
11984esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011986 (eval "$ac_try") 2>&5
11987 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011989 (exit $ac_status); }; }; then
11990 ac_cv_sizeof_long_double=`cat conftest.val`
11991else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011992 echo "$as_me: program exited with status $ac_status" >&5
11993echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994sed 's/^/| /' conftest.$ac_ext >&5
11995
11996( exit $ac_status )
11997if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011998 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012000echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012002 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012003 else
12004 ac_cv_sizeof_long_double=0
12005 fi
12006fi
12007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12008fi
12009rm -f conftest.val
12010fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012011{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12012echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012013
12014
12015
12016cat >>confdefs.h <<_ACEOF
12017#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12018_ACEOF
12019
12020
12021fi
12022
12023
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012024{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12025echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012026have_c99_bool=no
12027cat >conftest.$ac_ext <<_ACEOF
12028/* confdefs.h. */
12029_ACEOF
12030cat confdefs.h >>conftest.$ac_ext
12031cat >>conftest.$ac_ext <<_ACEOF
12032/* end confdefs.h. */
12033
12034int
12035main ()
12036{
12037_Bool x; x = (_Bool)0;
12038 ;
12039 return 0;
12040}
12041_ACEOF
12042rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043if { (ac_try="$ac_compile"
12044case "(($ac_try" in
12045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12046 *) ac_try_echo=$ac_try;;
12047esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012050 ac_status=$?
12051 grep -v '^ *+' conftest.er1 >conftest.err
12052 rm -f conftest.er1
12053 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055 (exit $ac_status); } && {
12056 test -z "$ac_c_werror_flag" ||
12057 test ! -s conftest.err
12058 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012059
12060
12061cat >>confdefs.h <<\_ACEOF
12062#define HAVE_C99_BOOL 1
12063_ACEOF
12064
12065 have_c99_bool=yes
12066
12067else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012068 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012069sed 's/^/| /' conftest.$ac_ext >&5
12070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071
Thomas Woutersb2137042007-02-01 18:02:27 +000012072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073
12074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012075{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12076echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012077if test "$have_c99_bool" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012078{ echo "$as_me:$LINENO: checking for _Bool" >&5
12079echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12080if test "${ac_cv_type__Bool+set}" = set; then
12081 echo $ECHO_N "(cached) $ECHO_C" >&6
12082else
12083 cat >conftest.$ac_ext <<_ACEOF
12084/* confdefs.h. */
12085_ACEOF
12086cat confdefs.h >>conftest.$ac_ext
12087cat >>conftest.$ac_ext <<_ACEOF
12088/* end confdefs.h. */
12089$ac_includes_default
12090typedef _Bool ac__type_new_;
12091int
12092main ()
12093{
12094if ((ac__type_new_ *) 0)
12095 return 0;
12096if (sizeof (ac__type_new_))
12097 return 0;
12098 ;
12099 return 0;
12100}
12101_ACEOF
12102rm -f conftest.$ac_objext
12103if { (ac_try="$ac_compile"
12104case "(($ac_try" in
12105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12106 *) ac_try_echo=$ac_try;;
12107esac
12108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12109 (eval "$ac_compile") 2>conftest.er1
12110 ac_status=$?
12111 grep -v '^ *+' conftest.er1 >conftest.err
12112 rm -f conftest.er1
12113 cat conftest.err >&5
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); } && {
12116 test -z "$ac_c_werror_flag" ||
12117 test ! -s conftest.err
12118 } && test -s conftest.$ac_objext; then
12119 ac_cv_type__Bool=yes
12120else
12121 echo "$as_me: failed program was:" >&5
12122sed 's/^/| /' conftest.$ac_ext >&5
12123
12124 ac_cv_type__Bool=no
12125fi
12126
12127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12128fi
12129{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12130echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132# The cast to long int works around a bug in the HP C Compiler
12133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12135# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012136{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12137echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012138if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012139 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012140else
12141 if test "$cross_compiling" = yes; then
12142 # Depending upon the size, compute the lo and hi bounds.
12143cat >conftest.$ac_ext <<_ACEOF
12144/* confdefs.h. */
12145_ACEOF
12146cat confdefs.h >>conftest.$ac_ext
12147cat >>conftest.$ac_ext <<_ACEOF
12148/* end confdefs.h. */
12149$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012150 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012151int
12152main ()
12153{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012154static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012155test_array [0] = 0
12156
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162if { (ac_try="$ac_compile"
12163case "(($ac_try" in
12164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12165 *) ac_try_echo=$ac_try;;
12166esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012169 ac_status=$?
12170 grep -v '^ *+' conftest.er1 >conftest.err
12171 rm -f conftest.er1
12172 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174 (exit $ac_status); } && {
12175 test -z "$ac_c_werror_flag" ||
12176 test ! -s conftest.err
12177 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012178 ac_lo=0 ac_mid=0
12179 while :; do
12180 cat >conftest.$ac_ext <<_ACEOF
12181/* confdefs.h. */
12182_ACEOF
12183cat confdefs.h >>conftest.$ac_ext
12184cat >>conftest.$ac_ext <<_ACEOF
12185/* end confdefs.h. */
12186$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012187 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012188int
12189main ()
12190{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012191static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012192test_array [0] = 0
12193
12194 ;
12195 return 0;
12196}
12197_ACEOF
12198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199if { (ac_try="$ac_compile"
12200case "(($ac_try" in
12201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12202 *) ac_try_echo=$ac_try;;
12203esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012206 ac_status=$?
12207 grep -v '^ *+' conftest.er1 >conftest.err
12208 rm -f conftest.er1
12209 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211 (exit $ac_status); } && {
12212 test -z "$ac_c_werror_flag" ||
12213 test ! -s conftest.err
12214 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012215 ac_hi=$ac_mid; break
12216else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012217 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012218sed 's/^/| /' conftest.$ac_ext >&5
12219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 ac_lo=`expr $ac_mid + 1`
12221 if test $ac_lo -le $ac_mid; then
12222 ac_lo= ac_hi=
12223 break
12224 fi
12225 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227
12228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012229 done
12230else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012231 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012232sed 's/^/| /' conftest.$ac_ext >&5
12233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012235/* confdefs.h. */
12236_ACEOF
12237cat confdefs.h >>conftest.$ac_ext
12238cat >>conftest.$ac_ext <<_ACEOF
12239/* end confdefs.h. */
12240$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012241 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012242int
12243main ()
12244{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012246test_array [0] = 0
12247
12248 ;
12249 return 0;
12250}
12251_ACEOF
12252rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253if { (ac_try="$ac_compile"
12254case "(($ac_try" in
12255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12256 *) ac_try_echo=$ac_try;;
12257esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012260 ac_status=$?
12261 grep -v '^ *+' conftest.er1 >conftest.err
12262 rm -f conftest.er1
12263 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265 (exit $ac_status); } && {
12266 test -z "$ac_c_werror_flag" ||
12267 test ! -s conftest.err
12268 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012269 ac_hi=-1 ac_mid=-1
12270 while :; do
12271 cat >conftest.$ac_ext <<_ACEOF
12272/* confdefs.h. */
12273_ACEOF
12274cat confdefs.h >>conftest.$ac_ext
12275cat >>conftest.$ac_ext <<_ACEOF
12276/* end confdefs.h. */
12277$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012278 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012279int
12280main ()
12281{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012283test_array [0] = 0
12284
12285 ;
12286 return 0;
12287}
12288_ACEOF
12289rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290if { (ac_try="$ac_compile"
12291case "(($ac_try" in
12292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12293 *) ac_try_echo=$ac_try;;
12294esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012297 ac_status=$?
12298 grep -v '^ *+' conftest.er1 >conftest.err
12299 rm -f conftest.er1
12300 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302 (exit $ac_status); } && {
12303 test -z "$ac_c_werror_flag" ||
12304 test ! -s conftest.err
12305 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012306 ac_lo=$ac_mid; break
12307else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012308 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012309sed 's/^/| /' conftest.$ac_ext >&5
12310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 ac_hi=`expr '(' $ac_mid ')' - 1`
12312 if test $ac_mid -le $ac_hi; then
12313 ac_lo= ac_hi=
12314 break
12315 fi
12316 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318
12319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012320 done
12321else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012322 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012323sed 's/^/| /' conftest.$ac_ext >&5
12324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012325 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012327
12328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330
12331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012332# Binary search between lo and hi bounds.
12333while test "x$ac_lo" != "x$ac_hi"; do
12334 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12335 cat >conftest.$ac_ext <<_ACEOF
12336/* confdefs.h. */
12337_ACEOF
12338cat confdefs.h >>conftest.$ac_ext
12339cat >>conftest.$ac_ext <<_ACEOF
12340/* end confdefs.h. */
12341$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012342 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012343int
12344main ()
12345{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012346static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012347test_array [0] = 0
12348
12349 ;
12350 return 0;
12351}
12352_ACEOF
12353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354if { (ac_try="$ac_compile"
12355case "(($ac_try" in
12356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12357 *) ac_try_echo=$ac_try;;
12358esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012361 ac_status=$?
12362 grep -v '^ *+' conftest.er1 >conftest.err
12363 rm -f conftest.er1
12364 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 (exit $ac_status); } && {
12367 test -z "$ac_c_werror_flag" ||
12368 test ! -s conftest.err
12369 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012370 ac_hi=$ac_mid
12371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012372 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012373sed 's/^/| /' conftest.$ac_ext >&5
12374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377
12378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012379done
12380case $ac_lo in
12381?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012383 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012384See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012385echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012386See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012387 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012388 else
12389 ac_cv_sizeof__Bool=0
12390 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012391esac
12392else
12393 cat >conftest.$ac_ext <<_ACEOF
12394/* confdefs.h. */
12395_ACEOF
12396cat confdefs.h >>conftest.$ac_ext
12397cat >>conftest.$ac_ext <<_ACEOF
12398/* end confdefs.h. */
12399$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012400 typedef _Bool ac__type_sizeof_;
12401static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12402static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012403#include <stdio.h>
12404#include <stdlib.h>
12405int
12406main ()
12407{
12408
12409 FILE *f = fopen ("conftest.val", "w");
12410 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012412 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012413 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012415 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012417 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012418 }
12419 else
12420 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012422 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012424 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012425 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012427
12428 ;
12429 return 0;
12430}
12431_ACEOF
12432rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433if { (ac_try="$ac_link"
12434case "(($ac_try" in
12435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12436 *) ac_try_echo=$ac_try;;
12437esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012439 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012440 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443 { (case "(($ac_try" in
12444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12445 *) ac_try_echo=$ac_try;;
12446esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012449 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012451 (exit $ac_status); }; }; then
12452 ac_cv_sizeof__Bool=`cat conftest.val`
12453else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012454 echo "$as_me: program exited with status $ac_status" >&5
12455echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012456sed 's/^/| /' conftest.$ac_ext >&5
12457
12458( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012459if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012460 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012461See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012462echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012463See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012464 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465 else
12466 ac_cv_sizeof__Bool=0
12467 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469rm -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 +000012470fi
12471rm -f conftest.val
12472fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012473{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12474echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475
12476
12477
Thomas Woutersb2137042007-02-01 18:02:27 +000012478cat >>confdefs.h <<_ACEOF
12479#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12480_ACEOF
12481
12482
12483fi
12484
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012485{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12486echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012487if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012488 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012489else
12490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012491/* confdefs.h. */
12492_ACEOF
12493cat confdefs.h >>conftest.$ac_ext
12494cat >>conftest.$ac_ext <<_ACEOF
12495/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012496#ifdef HAVE_STDINT_H
12497 #include <stdint.h>
12498 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012500typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501int
12502main ()
12503{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012504if ((ac__type_new_ *) 0)
12505 return 0;
12506if (sizeof (ac__type_new_))
12507 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 ;
12509 return 0;
12510}
12511_ACEOF
12512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513if { (ac_try="$ac_compile"
12514case "(($ac_try" in
12515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12516 *) ac_try_echo=$ac_try;;
12517esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012521 grep -v '^ *+' conftest.er1 >conftest.err
12522 rm -f conftest.er1
12523 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 (exit $ac_status); } && {
12526 test -z "$ac_c_werror_flag" ||
12527 test ! -s conftest.err
12528 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012529 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012530else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012532sed 's/^/| /' conftest.$ac_ext >&5
12533
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012534 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536
12537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012538fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012539{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12540echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12541if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012542
12543cat >>confdefs.h <<_ACEOF
12544#define HAVE_UINTPTR_T 1
12545_ACEOF
12546
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012547{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12548echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12549if test "${ac_cv_type_uintptr_t+set}" = set; then
12550 echo $ECHO_N "(cached) $ECHO_C" >&6
12551else
12552 cat >conftest.$ac_ext <<_ACEOF
12553/* confdefs.h. */
12554_ACEOF
12555cat confdefs.h >>conftest.$ac_ext
12556cat >>conftest.$ac_ext <<_ACEOF
12557/* end confdefs.h. */
12558$ac_includes_default
12559typedef uintptr_t ac__type_new_;
12560int
12561main ()
12562{
12563if ((ac__type_new_ *) 0)
12564 return 0;
12565if (sizeof (ac__type_new_))
12566 return 0;
12567 ;
12568 return 0;
12569}
12570_ACEOF
12571rm -f conftest.$ac_objext
12572if { (ac_try="$ac_compile"
12573case "(($ac_try" in
12574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12575 *) ac_try_echo=$ac_try;;
12576esac
12577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12578 (eval "$ac_compile") 2>conftest.er1
12579 ac_status=$?
12580 grep -v '^ *+' conftest.er1 >conftest.err
12581 rm -f conftest.er1
12582 cat conftest.err >&5
12583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12584 (exit $ac_status); } && {
12585 test -z "$ac_c_werror_flag" ||
12586 test ! -s conftest.err
12587 } && test -s conftest.$ac_objext; then
12588 ac_cv_type_uintptr_t=yes
12589else
12590 echo "$as_me: failed program was:" >&5
12591sed 's/^/| /' conftest.$ac_ext >&5
12592
12593 ac_cv_type_uintptr_t=no
12594fi
12595
12596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12597fi
12598{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12599echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601# The cast to long int works around a bug in the HP C Compiler
12602# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12603# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12604# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012605{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12606echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012607if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012608 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 if test "$cross_compiling" = yes; then
12611 # Depending upon the size, compute the lo and hi bounds.
12612cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012613/* confdefs.h. */
12614_ACEOF
12615cat confdefs.h >>conftest.$ac_ext
12616cat >>conftest.$ac_ext <<_ACEOF
12617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012618$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012619 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012623static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012624test_array [0] = 0
12625
12626 ;
12627 return 0;
12628}
12629_ACEOF
12630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631if { (ac_try="$ac_compile"
12632case "(($ac_try" in
12633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12634 *) ac_try_echo=$ac_try;;
12635esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012639 grep -v '^ *+' conftest.er1 >conftest.err
12640 rm -f conftest.er1
12641 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 (exit $ac_status); } && {
12644 test -z "$ac_c_werror_flag" ||
12645 test ! -s conftest.err
12646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_lo=0 ac_mid=0
12648 while :; do
12649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* confdefs.h. */
12651_ACEOF
12652cat confdefs.h >>conftest.$ac_ext
12653cat >>conftest.$ac_ext <<_ACEOF
12654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012655$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012656 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012657int
12658main ()
12659{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012660static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012661test_array [0] = 0
12662
12663 ;
12664 return 0;
12665}
12666_ACEOF
12667rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668if { (ac_try="$ac_compile"
12669case "(($ac_try" in
12670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12671 *) ac_try_echo=$ac_try;;
12672esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012676 grep -v '^ *+' conftest.er1 >conftest.err
12677 rm -f conftest.er1
12678 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 (exit $ac_status); } && {
12681 test -z "$ac_c_werror_flag" ||
12682 test ! -s conftest.err
12683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_hi=$ac_mid; break
12685else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012687sed 's/^/| /' conftest.$ac_ext >&5
12688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 ac_lo=`expr $ac_mid + 1`
12690 if test $ac_lo -le $ac_mid; then
12691 ac_lo= ac_hi=
12692 break
12693 fi
12694 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696
12697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 done
12699else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012701sed 's/^/| /' conftest.$ac_ext >&5
12702
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* confdefs.h. */
12705_ACEOF
12706cat confdefs.h >>conftest.$ac_ext
12707cat >>conftest.$ac_ext <<_ACEOF
12708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012709$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012710 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012711int
12712main ()
12713{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012715test_array [0] = 0
12716
12717 ;
12718 return 0;
12719}
12720_ACEOF
12721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722if { (ac_try="$ac_compile"
12723case "(($ac_try" in
12724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12725 *) ac_try_echo=$ac_try;;
12726esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012730 grep -v '^ *+' conftest.er1 >conftest.err
12731 rm -f conftest.er1
12732 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734 (exit $ac_status); } && {
12735 test -z "$ac_c_werror_flag" ||
12736 test ! -s conftest.err
12737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 ac_hi=-1 ac_mid=-1
12739 while :; do
12740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012741/* confdefs.h. */
12742_ACEOF
12743cat confdefs.h >>conftest.$ac_ext
12744cat >>conftest.$ac_ext <<_ACEOF
12745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012746$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012747 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012748int
12749main ()
12750{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012752test_array [0] = 0
12753
12754 ;
12755 return 0;
12756}
12757_ACEOF
12758rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012759if { (ac_try="$ac_compile"
12760case "(($ac_try" in
12761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12762 *) ac_try_echo=$ac_try;;
12763esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012767 grep -v '^ *+' conftest.er1 >conftest.err
12768 rm -f conftest.er1
12769 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771 (exit $ac_status); } && {
12772 test -z "$ac_c_werror_flag" ||
12773 test ! -s conftest.err
12774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012775 ac_lo=$ac_mid; break
12776else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012778sed 's/^/| /' conftest.$ac_ext >&5
12779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 ac_hi=`expr '(' $ac_mid ')' - 1`
12781 if test $ac_mid -le $ac_hi; then
12782 ac_lo= ac_hi=
12783 break
12784 fi
12785 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012787
12788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 done
12790else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012792sed 's/^/| /' conftest.$ac_ext >&5
12793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799
12800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012801# Binary search between lo and hi bounds.
12802while test "x$ac_lo" != "x$ac_hi"; do
12803 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012805/* confdefs.h. */
12806_ACEOF
12807cat confdefs.h >>conftest.$ac_ext
12808cat >>conftest.$ac_ext <<_ACEOF
12809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012810$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012811 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012812int
12813main ()
12814{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012815static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012816test_array [0] = 0
12817
12818 ;
12819 return 0;
12820}
12821_ACEOF
12822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823if { (ac_try="$ac_compile"
12824case "(($ac_try" in
12825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12826 *) ac_try_echo=$ac_try;;
12827esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012831 grep -v '^ *+' conftest.er1 >conftest.err
12832 rm -f conftest.er1
12833 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012835 (exit $ac_status); } && {
12836 test -z "$ac_c_werror_flag" ||
12837 test ! -s conftest.err
12838 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ac_hi=$ac_mid
12840else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012842sed 's/^/| /' conftest.$ac_ext >&5
12843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012846
12847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012848done
12849case $ac_lo in
12850?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012851'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012853See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012854echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012855See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012856 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857 else
12858 ac_cv_sizeof_uintptr_t=0
12859 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012860esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012861else
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* confdefs.h. */
12864_ACEOF
12865cat confdefs.h >>conftest.$ac_ext
12866cat >>conftest.$ac_ext <<_ACEOF
12867/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012868$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012869 typedef uintptr_t ac__type_sizeof_;
12870static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12871static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012872#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012873#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012874int
12875main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012876{
Martin v. Löwis11437992002-04-12 09:54:03 +000012877
12878 FILE *f = fopen ("conftest.val", "w");
12879 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012881 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012884 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012885 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012886 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 }
12888 else
12889 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012891 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012893 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
12897 ;
12898 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012899}
Martin v. Löwis11437992002-04-12 09:54:03 +000012900_ACEOF
12901rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902if { (ac_try="$ac_link"
12903case "(($ac_try" in
12904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12905 *) ac_try_echo=$ac_try;;
12906esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012912 { (case "(($ac_try" in
12913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12914 *) ac_try_echo=$ac_try;;
12915esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012918 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 (exit $ac_status); }; }; then
12921 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012922else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012923 echo "$as_me: program exited with status $ac_status" >&5
12924echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012925sed 's/^/| /' conftest.$ac_ext >&5
12926
Martin v. Löwis11437992002-04-12 09:54:03 +000012927( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012929 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012930See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012931echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012932See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012933 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934 else
12935 ac_cv_sizeof_uintptr_t=0
12936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938rm -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 +000012939fi
12940rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012941fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012942{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12943echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012944
12945
12946
Martin v. Löwis11437992002-04-12 09:54:03 +000012947cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012948#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012949_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012950
Michael W. Hudson54241132001-12-07 15:38:26 +000012951
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012952fi
12953
Thomas Wouters89f507f2006-12-13 04:49:30 +000012954
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012955
12956# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
12957{ echo "$as_me:$LINENO: checking size of off_t" >&5
12958echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012959if test "${ac_cv_sizeof_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012960 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012961else
12962 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012963 ac_cv_sizeof_off_t=4
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 Vassalotti302825b2009-07-17 07:49:53 +000012971#include <stdio.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012972#include <sys/types.h>
12973main()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012974{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012975 FILE *f=fopen("conftestval", "w");
12976 if (!f) exit(1);
12977 fprintf(f, "%d\n", sizeof(off_t));
12978 exit(0);
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012979}
Martin v. Löwis11437992002-04-12 09:54:03 +000012980_ACEOF
12981rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982if { (ac_try="$ac_link"
12983case "(($ac_try" in
12984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12985 *) ac_try_echo=$ac_try;;
12986esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012992 { (case "(($ac_try" in
12993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12994 *) ac_try_echo=$ac_try;;
12995esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012997 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012998 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013001 ac_cv_sizeof_off_t=`cat conftestval`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013002else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013003 echo "$as_me: program exited with status $ac_status" >&5
13004echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013005sed 's/^/| /' conftest.$ac_ext >&5
13006
Martin v. Löwis11437992002-04-12 09:54:03 +000013007( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013008ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010rm -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 +000013011fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013012
13013
13014
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013015fi
13016
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013017{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13018echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013019
13020cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013021#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013022_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013023
Michael W. Hudson54241132001-12-07 15:38:26 +000013024
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013025{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13026echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013027if test "$have_long_long" = yes -a \
13028 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13029 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013030
Martin v. Löwis11437992002-04-12 09:54:03 +000013031cat >>confdefs.h <<\_ACEOF
13032#define HAVE_LARGEFILE_SUPPORT 1
13033_ACEOF
13034
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013035 { echo "$as_me:$LINENO: result: yes" >&5
13036echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013037else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013038 { echo "$as_me:$LINENO: result: no" >&5
13039echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013040fi
13041
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013042# AC_CHECK_SIZEOF() doesn't include <time.h>.
13043{ echo "$as_me:$LINENO: checking size of time_t" >&5
13044echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013045if test "${ac_cv_sizeof_time_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013046 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013047else
13048 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013049 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013050else
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013052/* confdefs.h. */
13053_ACEOF
13054cat confdefs.h >>conftest.$ac_ext
13055cat >>conftest.$ac_ext <<_ACEOF
13056/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013057#include <stdio.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013058#include <time.h>
13059main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013060{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013061 FILE *f=fopen("conftestval", "w");
13062 if (!f) exit(1);
13063 fprintf(f, "%d\n", sizeof(time_t));
13064 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013065}
Martin v. Löwis11437992002-04-12 09:54:03 +000013066_ACEOF
13067rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068if { (ac_try="$ac_link"
13069case "(($ac_try" in
13070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13071 *) ac_try_echo=$ac_try;;
13072esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078 { (case "(($ac_try" in
13079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13080 *) ac_try_echo=$ac_try;;
13081esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013087 ac_cv_sizeof_time_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013088else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013089 echo "$as_me: program exited with status $ac_status" >&5
13090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013091sed 's/^/| /' conftest.$ac_ext >&5
13092
Martin v. Löwis11437992002-04-12 09:54:03 +000013093( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013094ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096rm -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 +000013097fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013098
13099
13100
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013101fi
13102
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013103{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13104echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013105
13106cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013107#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013108_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013109
Michael W. Hudson54241132001-12-07 15:38:26 +000013110
13111
Trent Mick635f6fb2000-08-23 21:33:05 +000013112# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013113ac_save_cc="$CC"
13114if test "$ac_cv_kpthread" = "yes"
13115then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013116elif test "$ac_cv_kthread" = "yes"
13117then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013118elif test "$ac_cv_pthread" = "yes"
13119then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013120fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013121{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13122echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013123have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013124cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013130#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013131int
13132main ()
13133{
Guido van Rossum12580492000-09-24 16:47:19 +000013134pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 ;
13136 return 0;
13137}
13138_ACEOF
13139rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140if { (ac_try="$ac_compile"
13141case "(($ac_try" in
13142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13143 *) ac_try_echo=$ac_try;;
13144esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013148 grep -v '^ *+' conftest.er1 >conftest.err
13149 rm -f conftest.er1
13150 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152 (exit $ac_status); } && {
13153 test -z "$ac_c_werror_flag" ||
13154 test ! -s conftest.err
13155 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013156 have_pthread_t=yes
13157else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013159sed 's/^/| /' conftest.$ac_ext >&5
13160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161
Trent Mick635f6fb2000-08-23 21:33:05 +000013162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163
13164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013165{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13166echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013167if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013168 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
13169 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
13170echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
13171 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
13172 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013173else
13174 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013175 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013176else
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013178/* confdefs.h. */
13179_ACEOF
13180cat confdefs.h >>conftest.$ac_ext
13181cat >>conftest.$ac_ext <<_ACEOF
13182/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013183#include <stdio.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013184#include <pthread.h>
13185 main()
13186 {
13187 FILE *f=fopen("conftestval", "w");
13188 if (!f) exit(1);
13189 fprintf(f, "%d\n", sizeof(pthread_t));
13190 exit(0);
13191 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013192_ACEOF
13193rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013194if { (ac_try="$ac_link"
13195case "(($ac_try" in
13196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13197 *) ac_try_echo=$ac_try;;
13198esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204 { (case "(($ac_try" in
13205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13206 *) ac_try_echo=$ac_try;;
13207esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013212 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013213 ac_cv_sizeof_pthread_t=`cat conftestval`
Trent Mick635f6fb2000-08-23 21:33:05 +000013214else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013215 echo "$as_me: program exited with status $ac_status" >&5
13216echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013217sed 's/^/| /' conftest.$ac_ext >&5
13218
Martin v. Löwis11437992002-04-12 09:54:03 +000013219( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013220ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013222rm -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 +000013223fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013224
13225
13226
Trent Mick635f6fb2000-08-23 21:33:05 +000013227fi
13228
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013229 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13230echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013231
13232cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013233#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013234_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013235
13236fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013237CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013238
Michael W. Hudson54241132001-12-07 15:38:26 +000013239
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013240
13241
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013242case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013243 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013244 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13245 ;;
13246 Darwin/*)
13247 OTHER_LIBTOOL_OPT=""
13248 ;;
13249esac
13250
13251
13252case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013253 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013254 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13255 if test "${enable_universalsdk}"; then
13256 :
13257 else
13258 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13259 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013260 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013261 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013262 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013263 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13264 if test ${gcc_version} '<' 4.0
13265 then
13266 LIBTOOL_CRUFT="-lcc_dynamic"
13267 else
13268 LIBTOOL_CRUFT=""
13269 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013271 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013273esac
13274
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013275{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13276echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013277if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013278then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013279 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013280 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013281 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283cat >>confdefs.h <<\_ACEOF
13284#define WITH_NEXT_FRAMEWORK 1
13285_ACEOF
13286
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013287 { echo "$as_me:$LINENO: result: yes" >&5
13288echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013289 if test $enable_shared = "yes"
13290 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013291 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13292echo "$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 +000013293 { (exit 1); exit 1; }; }
13294 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013295else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013296 { echo "$as_me:$LINENO: result: no" >&5
13297echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013298fi
13299
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013300{ echo "$as_me:$LINENO: checking for dyld" >&5
13301echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013302case $ac_sys_system/$ac_sys_release in
13303 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305cat >>confdefs.h <<\_ACEOF
13306#define WITH_DYLD 1
13307_ACEOF
13308
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013309 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13310echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013311 ;;
13312 *)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013313 { echo "$as_me:$LINENO: result: no" >&5
13314echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013315 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013316esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013317
Guido van Rossum0a516c91994-09-12 10:58:40 +000013318# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013319
Michael W. Hudson54241132001-12-07 15:38:26 +000013320
13321
13322
13323
Guido van Rossum0a516c91994-09-12 10:58:40 +000013324# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013325# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013326{ echo "$as_me:$LINENO: checking SO" >&5
13327echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013328if test -z "$SO"
13329then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013331 hp*|HP*)
13332 case `uname -m` in
13333 ia64) SO=.so;;
13334 *) SO=.sl;;
13335 esac
13336 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013337 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013338 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013339 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013340else
13341 # this might also be a termcap variable, see #610332
13342 echo
13343 echo '====================================================================='
13344 echo '+ +'
13345 echo '+ WARNING: You have set SO in your environment. +'
13346 echo '+ Do you really mean to change the extension for shared libraries? +'
13347 echo '+ Continuing in 10 seconds to let you to ponder. +'
13348 echo '+ +'
13349 echo '====================================================================='
13350 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013351fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013352{ echo "$as_me:$LINENO: result: $SO" >&5
13353echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013354
Georg Brandlb1441c72009-01-03 22:33:39 +000013355
Thomas Wouters477c8d52006-05-27 19:21:47 +000013356cat >>confdefs.h <<_ACEOF
13357#define SHLIB_EXT "$SO"
13358_ACEOF
13359
Guido van Rossum0a516c91994-09-12 10:58:40 +000013360# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013361# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013362# (Shared libraries in this instance are shared modules to be loaded into
13363# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013364{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13365echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013366if test -z "$LDSHARED"
13367then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013369 AIX*)
13370 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013371 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013372 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013373 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013374 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013375 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013376 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013377 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013378 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013379 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013380 hp*|HP*)
13381 if test "$GCC" = "yes"
13382 then LDSHARED='$(CC) -shared'
13383 else LDSHARED='ld -b';
13384 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013385 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013386 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013387 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13388 if test "$enable_framework" ; then
13389 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013390 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13391 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013392 else
13393 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013394 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013395 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013396 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013397 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13398 if test "$enable_framework" ; then
13399 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013400 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13401 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013402 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013403 # No framework, use the Python app as bundle-loader
13404 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013405 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013406 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013407 Darwin/*)
13408 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13409 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013410
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013411 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013412 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013413 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013414 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013415 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013416 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13417 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013418 else
13419 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13420 if test "$enable_framework" ; then
13421 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013422 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13423 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013424 else
13425 # No framework, use the Python app as bundle-loader
13426 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13427 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13428 fi
13429 fi
13430 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013431 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013432 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013433 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013435 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013436 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013437 else
13438 LDSHARED="ld -Bshareable ${LDFLAGS}"
13439 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013440 OpenBSD*)
13441 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13442 then
13443 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13444 else
13445 case `uname -r` in
13446 [01].* | 2.[0-7] | 2.[0-7].*)
13447 LDSHARED="ld -Bshareable ${LDFLAGS}"
13448 ;;
13449 *)
13450 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13451 ;;
13452 esac
13453 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013454 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013455 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013456 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013457 then LDSHARED='$(CC) -shared'
13458 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013459 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013460 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013461 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013462 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013463 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013464 *) LDSHARED="ld";;
13465 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013466fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013467{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13468echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013469BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013470# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013471# library (module) -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013472{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13473echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013474if test -z "$CCSHARED"
13475then
Guido van Rossum07397971997-04-29 21:49:50 +000013476 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013477 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013478 then CCSHARED="-fPIC";
13479 elif test `uname -p` = sparc;
13480 then CCSHARED="-xcode=pic32";
13481 else CCSHARED="-Kpic";
13482 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013483 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013484 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013485 else CCSHARED="+z";
13486 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013487 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013488 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013489 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013490 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013491 if test "$GCC" = "yes"
13492 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013493 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013494 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013495 SCO_SV*)
13496 if test "$GCC" = "yes"
13497 then CCSHARED="-fPIC"
13498 else CCSHARED="-Kpic -belf"
13499 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013500 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013501 IRIX*/6*) case $CC in
13502 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013503 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013504 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013505 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013506 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013507fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013508{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13509echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013510# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013511# the python executable -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013512{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13513echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013514if test -z "$LINKFORSHARED"
13515then
Guido van Rossum07397971997-04-29 21:49:50 +000013516 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013517 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013518 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013519 LINKFORSHARED="-Wl,-E -Wl,+s";;
13520# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013521 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013522 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013523 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013525 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013526 if test "$enable_framework"
13527 then
Jack Jansenda49e192005-01-07 13:08:22 +000013528 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013529 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013530 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013531 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013532 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013533 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013534 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013535 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13536 then
13537 LINKFORSHARED="-Wl,--export-dynamic"
13538 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013539 SunOS/5*) case $CC in
13540 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013541 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013542 then
13543 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013544 fi;;
13545 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013546 CYGWIN*)
13547 if test $enable_shared = "no"
13548 then
13549 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13550 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013551 QNX*)
13552 # -Wl,-E causes the symbols to be added to the dynamic
13553 # symbol table so that they can be found when a module
13554 # is loaded. -N 2048K causes the stack size to be set
13555 # to 2048 kilobytes so that the stack doesn't overflow
13556 # when running test_compile.py.
13557 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013558 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013559fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013560{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13561echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013562
Michael W. Hudson54241132001-12-07 15:38:26 +000013563
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013564
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013565{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13566echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013567if test ! "$LIBRARY" = "$LDLIBRARY"
13568then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013569 case $ac_sys_system in
13570 CYGWIN*)
13571 # Cygwin needs CCSHARED when building extension DLLs
13572 # but not when building the interpreter DLL.
13573 CFLAGSFORSHARED='';;
13574 *)
13575 CFLAGSFORSHARED='$(CCSHARED)'
13576 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013577fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013578{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13579echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013580
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013581# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13582# library (with --enable-shared).
13583# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013584# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13585# if it is not required, since it creates a dependency of the shared library
13586# to LIBS. This, in turn, means that applications linking the shared libpython
13587# don't need to link LIBS explicitly. The default should be only changed
13588# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013589
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013590{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13591echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013592case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013593 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013594 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013595esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013596{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13597echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013598
13599
Guido van Rossum627b2d71993-12-24 10:39:16 +000013600# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013602{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13603echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013604if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013606else
Martin v. Löwis11437992002-04-12 09:54:03 +000013607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013608LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013610/* confdefs.h. */
13611_ACEOF
13612cat confdefs.h >>conftest.$ac_ext
13613cat >>conftest.$ac_ext <<_ACEOF
13614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616/* Override any GCC internal prototype to avoid an error.
13617 Use char because int might match the return type of a GCC
13618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013619#ifdef __cplusplus
13620extern "C"
13621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013622char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013623int
13624main ()
13625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 ;
13628 return 0;
13629}
13630_ACEOF
13631rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013632if { (ac_try="$ac_link"
13633case "(($ac_try" in
13634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13635 *) ac_try_echo=$ac_try;;
13636esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013640 grep -v '^ *+' conftest.er1 >conftest.err
13641 rm -f conftest.er1
13642 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013644 (exit $ac_status); } && {
13645 test -z "$ac_c_werror_flag" ||
13646 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013647 } && test -s conftest$ac_exeext &&
13648 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013649 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013652sed 's/^/| /' conftest.$ac_ext >&5
13653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656
13657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013659LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013660fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013661{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13662echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
13663if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013664 cat >>confdefs.h <<_ACEOF
13665#define HAVE_LIBDL 1
13666_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013667
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013668 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013669
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013670fi
13671 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013673{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13674echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013675if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013676 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013677else
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013679LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013681/* confdefs.h. */
13682_ACEOF
13683cat confdefs.h >>conftest.$ac_ext
13684cat >>conftest.$ac_ext <<_ACEOF
13685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013687/* Override any GCC internal prototype to avoid an error.
13688 Use char because int might match the return type of a GCC
13689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013690#ifdef __cplusplus
13691extern "C"
13692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013693char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013694int
13695main ()
13696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ;
13699 return 0;
13700}
13701_ACEOF
13702rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703if { (ac_try="$ac_link"
13704case "(($ac_try" in
13705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13706 *) ac_try_echo=$ac_try;;
13707esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013711 grep -v '^ *+' conftest.er1 >conftest.err
13712 rm -f conftest.er1
13713 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715 (exit $ac_status); } && {
13716 test -z "$ac_c_werror_flag" ||
13717 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013718 } && test -s conftest$ac_exeext &&
13719 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013723sed 's/^/| /' conftest.$ac_ext >&5
13724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727
13728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013730LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013731fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013732{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13733echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
13734if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 cat >>confdefs.h <<_ACEOF
13736#define HAVE_LIBDLD 1
13737_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013739 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013741fi
13742 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013743
Georg Brandlb1441c72009-01-03 22:33:39 +000013744# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013745if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013746 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13747echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013748if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013749 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013750else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013751 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* confdefs.h. */
13754_ACEOF
13755cat confdefs.h >>conftest.$ac_ext
13756cat >>conftest.$ac_ext <<_ACEOF
13757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759/* Override any GCC internal prototype to avoid an error.
13760 Use char because int might match the return type of a GCC
13761 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013762#ifdef __cplusplus
13763extern "C"
13764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013765char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013766int
13767main ()
13768{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 ;
13771 return 0;
13772}
13773_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013774for ac_lib in '' pthread rt posix4; do
13775 if test -z "$ac_lib"; then
13776 ac_res="none required"
13777 else
13778 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780 fi
13781 rm -f conftest.$ac_objext conftest$ac_exeext
13782if { (ac_try="$ac_link"
13783case "(($ac_try" in
13784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13785 *) ac_try_echo=$ac_try;;
13786esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013788 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013789 ac_status=$?
13790 grep -v '^ *+' conftest.er1 >conftest.err
13791 rm -f conftest.er1
13792 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794 (exit $ac_status); } && {
13795 test -z "$ac_c_werror_flag" ||
13796 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013797 } && test -s conftest$ac_exeext &&
13798 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013800else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013801 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013802sed 's/^/| /' conftest.$ac_ext >&5
13803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
Thomas Wouters477c8d52006-05-27 19:21:47 +000013805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806
13807rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13808 conftest$ac_exeext
13809 if test "${ac_cv_search_sem_init+set}" = set; then
13810 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812done
13813if test "${ac_cv_search_sem_init+set}" = set; then
13814 :
13815else
13816 ac_cv_search_sem_init=no
13817fi
13818rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013819LIBS=$ac_func_search_save_LIBS
13820fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013821{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13822echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823ac_res=$ac_cv_search_sem_init
13824if test "$ac_res" != no; then
13825 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013826
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013827fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013828 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013829 # posix4 on Solaris 2.6
13830 # pthread (first!) on Linux
13831fi
13832
Martin v. Löwis19d17342003-06-14 21:03:05 +000013833# check if we need libintl for locale functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013834{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13835echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013836if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013837 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013838else
13839 ac_check_lib_save_LIBS=$LIBS
13840LIBS="-lintl $LIBS"
13841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013842/* confdefs.h. */
13843_ACEOF
13844cat confdefs.h >>conftest.$ac_ext
13845cat >>conftest.$ac_ext <<_ACEOF
13846/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848/* Override any GCC internal prototype to avoid an error.
13849 Use char because int might match the return type of a GCC
13850 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013851#ifdef __cplusplus
13852extern "C"
13853#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013854char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013855int
13856main ()
13857{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013859 ;
13860 return 0;
13861}
13862_ACEOF
13863rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864if { (ac_try="$ac_link"
13865case "(($ac_try" in
13866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13867 *) ac_try_echo=$ac_try;;
13868esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013872 grep -v '^ *+' conftest.er1 >conftest.err
13873 rm -f conftest.er1
13874 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876 (exit $ac_status); } && {
13877 test -z "$ac_c_werror_flag" ||
13878 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013879 } && test -s conftest$ac_exeext &&
13880 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013881 ac_cv_lib_intl_textdomain=yes
13882else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013884sed 's/^/| /' conftest.$ac_ext >&5
13885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888
13889rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013891LIBS=$ac_check_lib_save_LIBS
13892fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013893{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13894echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
13895if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013896
13897cat >>confdefs.h <<\_ACEOF
13898#define WITH_LIBINTL 1
13899_ACEOF
13900
Brett Cannonc6d936e2009-06-07 20:09:53 +000013901 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000013902fi
13903
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013904
13905# checks for system dependent C++ extensions support
13906case "$ac_sys_system" in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013907 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13908echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013910/* confdefs.h. */
13911_ACEOF
13912cat confdefs.h >>conftest.$ac_ext
13913cat >>conftest.$ac_ext <<_ACEOF
13914/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013915#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013916int
13917main ()
13918{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013919loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 ;
13921 return 0;
13922}
13923_ACEOF
13924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925if { (ac_try="$ac_link"
13926case "(($ac_try" in
13927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13928 *) ac_try_echo=$ac_try;;
13929esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013933 grep -v '^ *+' conftest.er1 >conftest.err
13934 rm -f conftest.er1
13935 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 (exit $ac_status); } && {
13938 test -z "$ac_c_werror_flag" ||
13939 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013940 } && test -s conftest$ac_exeext &&
13941 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013942
Martin v. Löwis11437992002-04-12 09:54:03 +000013943cat >>confdefs.h <<\_ACEOF
13944#define AIX_GENUINE_CPLUSPLUS 1
13945_ACEOF
13946
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013947 { echo "$as_me:$LINENO: result: yes" >&5
13948echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013949else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013951sed 's/^/| /' conftest.$ac_ext >&5
13952
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013953 { echo "$as_me:$LINENO: result: no" >&5
13954echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013956
13957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013959 *) ;;
13960esac
13961
Guido van Rossum70c7f481998-03-26 18:44:10 +000013962# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013963{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13964echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013965if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013967else
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013969LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013977/* Override any GCC internal prototype to avoid an error.
13978 Use char because int might match the return type of a GCC
13979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013980#ifdef __cplusplus
13981extern "C"
13982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013983char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013984int
13985main ()
13986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013988 ;
13989 return 0;
13990}
13991_ACEOF
13992rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013993if { (ac_try="$ac_link"
13994case "(($ac_try" in
13995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13996 *) ac_try_echo=$ac_try;;
13997esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014001 grep -v '^ *+' conftest.er1 >conftest.err
14002 rm -f conftest.er1
14003 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014005 (exit $ac_status); } && {
14006 test -z "$ac_c_werror_flag" ||
14007 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014008 } && test -s conftest$ac_exeext &&
14009 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014011else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014013sed 's/^/| /' conftest.$ac_ext >&5
14014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017
14018rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014020LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014021fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014022{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14023echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
14024if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014025 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014026fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014027 # SVR4
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014028{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14029echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014030if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014031 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014032else
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014034LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014036/* confdefs.h. */
14037_ACEOF
14038cat confdefs.h >>conftest.$ac_ext
14039cat >>conftest.$ac_ext <<_ACEOF
14040/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014042/* Override any GCC internal prototype to avoid an error.
14043 Use char because int might match the return type of a GCC
14044 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014045#ifdef __cplusplus
14046extern "C"
14047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014048char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014049int
14050main ()
14051{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ;
14054 return 0;
14055}
14056_ACEOF
14057rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058if { (ac_try="$ac_link"
14059case "(($ac_try" in
14060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14061 *) ac_try_echo=$ac_try;;
14062esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014066 grep -v '^ *+' conftest.er1 >conftest.err
14067 rm -f conftest.er1
14068 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014070 (exit $ac_status); } && {
14071 test -z "$ac_c_werror_flag" ||
14072 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014073 } && test -s conftest$ac_exeext &&
14074 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014075 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014076else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014078sed 's/^/| /' conftest.$ac_ext >&5
14079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082
14083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014084 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014085LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014086fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014087{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14088echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
14089if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014090 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014091fi
14092 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014093
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014094{ echo "$as_me:$LINENO: checking for --with-libs" >&5
14095echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014097# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014098if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099 withval=$with_libs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014100{ echo "$as_me:$LINENO: result: $withval" >&5
14101echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014102LIBS="$withval $LIBS"
14103
14104else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014105 { echo "$as_me:$LINENO: result: no" >&5
14106echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107fi
14108
Guido van Rossum7f43da71994-08-01 12:15:30 +000014109
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014110# Check for use of the system libffi library
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014111{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14112echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014115if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116 withval=$with_system_ffi;
14117fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014118
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014119
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014120{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14121echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014122
Matthias Klose55708cc2009-04-30 08:06:49 +000014123# Check for --with-dbmliborder
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014124{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14125echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014126
14127# Check whether --with-dbmliborder was given.
14128if test "${with_dbmliborder+set}" = set; then
14129 withval=$with_dbmliborder;
14130if test x$with_dbmliborder = xyes
14131then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014132{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14133echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014134 { (exit 1); exit 1; }; }
14135else
14136 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14137 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14138 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014139 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14140echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014141 { (exit 1); exit 1; }; }
14142 fi
14143 done
14144fi
14145fi
14146
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014147{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14148echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014149
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014150# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014151
14152
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014153{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14154echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014157if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158 withval=$with_signal_module;
14159fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014160
14161
14162if test -z "$with_signal_module"
14163then with_signal_module="yes"
14164fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014165{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14166echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014167
14168if test "${with_signal_module}" = "yes"; then
14169 USE_SIGNAL_MODULE=""
14170 SIGNAL_OBJS=""
14171else
14172 USE_SIGNAL_MODULE="#"
14173 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14174fi
14175
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014176# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014178USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014179
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014180{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14181echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014182
Guido van Rossumec2f0731997-01-22 20:54:01 +000014183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014185if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186 withval=$with_dec_threads;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014187{ echo "$as_me:$LINENO: result: $withval" >&5
14188echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014189LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014190if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014191 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014192fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014193else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014194 { echo "$as_me:$LINENO: result: no" >&5
14195echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196fi
14197
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
14199# Templates for things AC_DEFINEd more than once.
14200# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014201
14202
Martin v. Löwis11437992002-04-12 09:54:03 +000014203
14204
14205
14206
14207
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014208{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14209echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014212if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213 withval=$with_threads;
14214fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014215
14216
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014217# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014220if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221 withval=$with_thread; with_threads=$with_thread
14222fi
14223
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014224
14225if test -z "$with_threads"
14226then with_threads="yes"
14227fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014228{ echo "$as_me:$LINENO: result: $with_threads" >&5
14229echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014230
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014231
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014232if test "$with_threads" = "no"
14233then
14234 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014235elif test "$ac_cv_pthread_is_default" = yes
14236then
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014238#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014239_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014240
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014241 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014243#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014244_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014245
14246 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014247 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014248elif test "$ac_cv_kpthread" = "yes"
14249then
14250 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014251 if test "$ac_cv_cxx_thread" = "yes"; then
14252 CXX="$CXX -Kpthread"
14253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014255#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014256_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014258 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014259 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014260elif test "$ac_cv_kthread" = "yes"
14261then
14262 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014263 if test "$ac_cv_cxx_thread" = "yes"; then
14264 CXX="$CXX -Kthread"
14265 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014266 cat >>confdefs.h <<\_ACEOF
14267#define WITH_THREAD 1
14268_ACEOF
14269
14270 posix_threads=yes
14271 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014272elif test "$ac_cv_pthread" = "yes"
14273then
14274 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014275 if test "$ac_cv_cxx_thread" = "yes"; then
14276 CXX="$CXX -pthread"
14277 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014278 cat >>confdefs.h <<\_ACEOF
14279#define WITH_THREAD 1
14280_ACEOF
14281
14282 posix_threads=yes
14283 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014284else
14285 if test ! -z "$with_threads" -a -d "$with_threads"
14286 then LDFLAGS="$LDFLAGS -L$with_threads"
14287 fi
14288 if test ! -z "$withval" -a -d "$withval"
14289 then LDFLAGS="$LDFLAGS -L$withval"
14290 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014291
14292 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014293 # define _POSIX_THREADS in unistd.h. Some apparently don't
14294 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014295 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14296echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014298/* confdefs.h. */
14299_ACEOF
14300cat confdefs.h >>conftest.$ac_ext
14301cat >>conftest.$ac_ext <<_ACEOF
14302/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014303
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014304#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014305#ifdef _POSIX_THREADS
14306yes
14307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
14309_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014311 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014312 unistd_defines_pthreads=yes
14313else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014314 unistd_defines_pthreads=no
14315fi
14316rm -f conftest*
14317
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014318 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14319echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014320
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014322#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014323_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014324
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014326 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14327echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014328if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014329 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014330fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014331{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14332echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014333else
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014335{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14336echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* confdefs.h. */
14339_ACEOF
14340cat confdefs.h >>conftest.$ac_ext
14341cat >>conftest.$ac_ext <<_ACEOF
14342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014343$ac_includes_default
14344#include <cthreads.h>
14345_ACEOF
14346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347if { (ac_try="$ac_compile"
14348case "(($ac_try" in
14349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14350 *) ac_try_echo=$ac_try;;
14351esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014355 grep -v '^ *+' conftest.er1 >conftest.err
14356 rm -f conftest.er1
14357 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359 (exit $ac_status); } && {
14360 test -z "$ac_c_werror_flag" ||
14361 test ! -s conftest.err
14362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014363 ac_header_compiler=yes
14364else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014366sed 's/^/| /' conftest.$ac_ext >&5
14367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370
14371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014372{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14373echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014376{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14377echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014378cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014379/* confdefs.h. */
14380_ACEOF
14381cat confdefs.h >>conftest.$ac_ext
14382cat >>conftest.$ac_ext <<_ACEOF
14383/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014384#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014385_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014386if { (ac_try="$ac_cpp conftest.$ac_ext"
14387case "(($ac_try" in
14388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14389 *) ac_try_echo=$ac_try;;
14390esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014394 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014395 rm -f conftest.er1
14396 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014398 (exit $ac_status); } >/dev/null && {
14399 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14400 test ! -s conftest.err
14401 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 ac_header_preproc=yes
14403else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014405sed 's/^/| /' conftest.$ac_ext >&5
14406
Martin v. Löwis11437992002-04-12 09:54:03 +000014407 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014411{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14412echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
14414# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014415case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14416 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014417 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14418echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14419 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14420echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014421 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014422 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014423 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014424 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14425echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14426 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14427echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14428 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14429echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14430 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14431echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14432 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14433echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14434 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14435echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014437## -------------------------------------- ##
14438## Report this to http://bugs.python.org/ ##
14439## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014440_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014442 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014443esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014444{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14445echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014446if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014447 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014448else
14449 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014450fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014451{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14452echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014455if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014457#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014458_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014461#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
14465cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014466#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014467_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014468
14469 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014470 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014471else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014472
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014474 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14475echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014476if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014477 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014478fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014479{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14480echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014481else
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014483{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14484echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* confdefs.h. */
14487_ACEOF
14488cat confdefs.h >>conftest.$ac_ext
14489cat >>conftest.$ac_ext <<_ACEOF
14490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014491$ac_includes_default
14492#include <mach/cthreads.h>
14493_ACEOF
14494rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495if { (ac_try="$ac_compile"
14496case "(($ac_try" in
14497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14498 *) ac_try_echo=$ac_try;;
14499esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014503 grep -v '^ *+' conftest.er1 >conftest.err
14504 rm -f conftest.er1
14505 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507 (exit $ac_status); } && {
14508 test -z "$ac_c_werror_flag" ||
14509 test ! -s conftest.err
14510 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ac_header_compiler=yes
14512else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014514sed 's/^/| /' conftest.$ac_ext >&5
14515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518
14519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014520{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14521echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
14523# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014524{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14525echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014527/* confdefs.h. */
14528_ACEOF
14529cat confdefs.h >>conftest.$ac_ext
14530cat >>conftest.$ac_ext <<_ACEOF
14531/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014532#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534if { (ac_try="$ac_cpp conftest.$ac_ext"
14535case "(($ac_try" in
14536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14537 *) ac_try_echo=$ac_try;;
14538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014543 rm -f conftest.er1
14544 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546 (exit $ac_status); } >/dev/null && {
14547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14548 test ! -s conftest.err
14549 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 ac_header_preproc=yes
14551else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014553sed 's/^/| /' conftest.$ac_ext >&5
14554
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014559{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14560echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014561
14562# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14564 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014565 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14566echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14567 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14568echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014569 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014570 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014571 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014572 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14573echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14574 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14575echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14576 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14577echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14578 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14579echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14580 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14581echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14582 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14583echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014585## -------------------------------------- ##
14586## Report this to http://bugs.python.org/ ##
14587## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014588_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014590 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014591esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014592{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14593echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014594if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014596else
14597 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014598fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014599{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14600echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014601
14602fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014603if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014605#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014606_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014607
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014609#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014610_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014611
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
14613cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014614#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014615_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014616
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014617 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014618else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014619
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014620 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14621echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014624if test "${with_pth+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014625 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14626echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014627 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014628#define WITH_THREAD 1
14629_ACEOF
14630
14631
14632cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014633#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014635
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014636 LIBS="-lpth $LIBS"
14637 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014638else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014639 { echo "$as_me:$LINENO: result: no" >&5
14640echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014641
14642 # Just looking for pthread_create in libpthread is not enough:
14643 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14644 # So we really have to include pthread.h, and then link.
14645 _libs=$LIBS
14646 LIBS="$LIBS -lpthread"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014647 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14648echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014650/* confdefs.h. */
14651_ACEOF
14652cat confdefs.h >>conftest.$ac_ext
14653cat >>conftest.$ac_ext <<_ACEOF
14654/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014655#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014656
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014657void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014658int
14659main ()
14660{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014661
14662pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014663 ;
14664 return 0;
14665}
14666_ACEOF
14667rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668if { (ac_try="$ac_link"
14669case "(($ac_try" in
14670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671 *) ac_try_echo=$ac_try;;
14672esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014676 grep -v '^ *+' conftest.er1 >conftest.err
14677 rm -f conftest.er1
14678 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014680 (exit $ac_status); } && {
14681 test -z "$ac_c_werror_flag" ||
14682 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014683 } && test -s conftest$ac_exeext &&
14684 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014685
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014686 { echo "$as_me:$LINENO: result: yes" >&5
14687echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014689#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014690_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014691
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014692 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014693 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014694else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014696sed 's/^/| /' conftest.$ac_ext >&5
14697
Martin v. Löwis11437992002-04-12 09:54:03 +000014698
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014699 LIBS=$_libs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014700 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14701echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014702if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014704else
Martin v. Löwis11437992002-04-12 09:54:03 +000014705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014706/* confdefs.h. */
14707_ACEOF
14708cat confdefs.h >>conftest.$ac_ext
14709cat >>conftest.$ac_ext <<_ACEOF
14710/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014711/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14713#define pthread_detach innocuous_pthread_detach
14714
Guido van Rossumad678af1998-10-02 14:42:15 +000014715/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014716 which can conflict with char pthread_detach (); below.
14717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014718 <limits.h> exists even on freestanding compilers. */
14719
14720#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014721# include <limits.h>
14722#else
14723# include <assert.h>
14724#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014725
14726#undef pthread_detach
14727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014728/* Override any GCC internal prototype to avoid an error.
14729 Use char because int might match the return type of a GCC
14730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014731#ifdef __cplusplus
14732extern "C"
14733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014734char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014735/* The GNU C library defines this for functions which it implements
14736 to always fail with ENOSYS. Some functions are actually named
14737 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014739choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014740#endif
14741
Skip Montanaro6dead952003-09-25 14:50:04 +000014742int
14743main ()
14744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014746 ;
14747 return 0;
14748}
14749_ACEOF
14750rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751if { (ac_try="$ac_link"
14752case "(($ac_try" in
14753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14754 *) ac_try_echo=$ac_try;;
14755esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014759 grep -v '^ *+' conftest.er1 >conftest.err
14760 rm -f conftest.er1
14761 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014763 (exit $ac_status); } && {
14764 test -z "$ac_c_werror_flag" ||
14765 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014766 } && test -s conftest$ac_exeext &&
14767 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014769else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014771sed 's/^/| /' conftest.$ac_ext >&5
14772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775
14776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014777 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014778fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014779{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14780echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
14781if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014783#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014784_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014785
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014786 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014787 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014788else
Guido van Rossumad678af1998-10-02 14:42:15 +000014789
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014790 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014791 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14792echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014793if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014794 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014795fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014796{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14797echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014798else
14799 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014800{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14801echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014803/* confdefs.h. */
14804_ACEOF
14805cat confdefs.h >>conftest.$ac_ext
14806cat >>conftest.$ac_ext <<_ACEOF
14807/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808$ac_includes_default
14809#include <atheos/threads.h>
14810_ACEOF
14811rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812if { (ac_try="$ac_compile"
14813case "(($ac_try" in
14814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14815 *) ac_try_echo=$ac_try;;
14816esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014820 grep -v '^ *+' conftest.er1 >conftest.err
14821 rm -f conftest.er1
14822 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824 (exit $ac_status); } && {
14825 test -z "$ac_c_werror_flag" ||
14826 test ! -s conftest.err
14827 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014828 ac_header_compiler=yes
14829else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014831sed 's/^/| /' conftest.$ac_ext >&5
14832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
14836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014837{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14838echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014839
14840# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014841{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14842echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014843cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014844/* confdefs.h. */
14845_ACEOF
14846cat confdefs.h >>conftest.$ac_ext
14847cat >>conftest.$ac_ext <<_ACEOF
14848/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014849#include <atheos/threads.h>
14850_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851if { (ac_try="$ac_cpp conftest.$ac_ext"
14852case "(($ac_try" in
14853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14854 *) ac_try_echo=$ac_try;;
14855esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014858 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014859 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014860 rm -f conftest.er1
14861 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 (exit $ac_status); } >/dev/null && {
14864 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14865 test ! -s conftest.err
14866 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014867 ac_header_preproc=yes
14868else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014870sed 's/^/| /' conftest.$ac_ext >&5
14871
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014872 ac_header_preproc=no
14873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014875rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014876{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14877echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014878
14879# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14881 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014882 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14883echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14884 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14885echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014886 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014887 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014888 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014889 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14890echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
14891 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14892echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14893 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14894echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14895 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14896echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14897 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14898echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
14899 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14900echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014902## -------------------------------------- ##
14903## Report this to http://bugs.python.org/ ##
14904## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014905_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014906 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014907 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014908esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014909{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14910echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014911if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014912 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014913else
14914 ac_cv_header_atheos_threads_h=$ac_header_preproc
14915fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014916{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14917echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014918
14919fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014920if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014921 cat >>confdefs.h <<\_ACEOF
14922#define WITH_THREAD 1
14923_ACEOF
14924
14925
14926cat >>confdefs.h <<\_ACEOF
14927#define ATHEOS_THREADS 1
14928_ACEOF
14929
14930 THREADOBJ="Python/thread.o"
14931else
14932
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014933 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14934echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014935if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014936 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014937else
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014939LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014941/* confdefs.h. */
14942_ACEOF
14943cat confdefs.h >>conftest.$ac_ext
14944cat >>conftest.$ac_ext <<_ACEOF
14945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947/* Override any GCC internal prototype to avoid an error.
14948 Use char because int might match the return type of a GCC
14949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014950#ifdef __cplusplus
14951extern "C"
14952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014953char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014954int
14955main ()
14956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 ;
14959 return 0;
14960}
14961_ACEOF
14962rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963if { (ac_try="$ac_link"
14964case "(($ac_try" in
14965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14966 *) ac_try_echo=$ac_try;;
14967esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014971 grep -v '^ *+' conftest.er1 >conftest.err
14972 rm -f conftest.er1
14973 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 (exit $ac_status); } && {
14976 test -z "$ac_c_werror_flag" ||
14977 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014978 } && test -s conftest$ac_exeext &&
14979 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014981else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014982 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014983sed 's/^/| /' conftest.$ac_ext >&5
14984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987
14988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014990LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014991fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014992{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14993echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
14994if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014996#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014997_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014998
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014999 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015000 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015001 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015002else
Greg Steinadf63d62000-07-05 10:38:09 +000015003
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015004 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15005echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015006if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015007 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015008else
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015010LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015012/* confdefs.h. */
15013_ACEOF
15014cat confdefs.h >>conftest.$ac_ext
15015cat >>conftest.$ac_ext <<_ACEOF
15016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018/* Override any GCC internal prototype to avoid an error.
15019 Use char because int might match the return type of a GCC
15020 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015021#ifdef __cplusplus
15022extern "C"
15023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015024char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015025int
15026main ()
15027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 ;
15030 return 0;
15031}
15032_ACEOF
15033rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034if { (ac_try="$ac_link"
15035case "(($ac_try" in
15036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15037 *) ac_try_echo=$ac_try;;
15038esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015042 grep -v '^ *+' conftest.er1 >conftest.err
15043 rm -f conftest.er1
15044 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 (exit $ac_status); } && {
15047 test -z "$ac_c_werror_flag" ||
15048 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015049 } && test -s conftest$ac_exeext &&
15050 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015051 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015052else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015054sed 's/^/| /' conftest.$ac_ext >&5
15055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058
15059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015061LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015062fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015063{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15064echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
15065if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015067#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015068_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015069
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015070 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015071 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015072 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015073else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015074
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015075 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15076echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015077if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015078 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015079else
Martin v. Löwis11437992002-04-12 09:54:03 +000015080 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015081LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015083/* confdefs.h. */
15084_ACEOF
15085cat confdefs.h >>conftest.$ac_ext
15086cat >>conftest.$ac_ext <<_ACEOF
15087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089/* Override any GCC internal prototype to avoid an error.
15090 Use char because int might match the return type of a GCC
15091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092#ifdef __cplusplus
15093extern "C"
15094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015095char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015096int
15097main ()
15098{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 ;
15101 return 0;
15102}
15103_ACEOF
15104rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105if { (ac_try="$ac_link"
15106case "(($ac_try" in
15107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15108 *) ac_try_echo=$ac_try;;
15109esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015111 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015113 grep -v '^ *+' conftest.er1 >conftest.err
15114 rm -f conftest.er1
15115 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 (exit $ac_status); } && {
15118 test -z "$ac_c_werror_flag" ||
15119 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015120 } && test -s conftest$ac_exeext &&
15121 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015123else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015125sed 's/^/| /' conftest.$ac_ext >&5
15126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129
15130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015132LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015133fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015134{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15135echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
15136if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015138#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015139_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015140
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015141 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015142 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015143 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015144else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015145
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015146 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15147echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015148if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015149 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015150else
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015152LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015154/* confdefs.h. */
15155_ACEOF
15156cat confdefs.h >>conftest.$ac_ext
15157cat >>conftest.$ac_ext <<_ACEOF
15158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160/* Override any GCC internal prototype to avoid an error.
15161 Use char because int might match the return type of a GCC
15162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015163#ifdef __cplusplus
15164extern "C"
15165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015166char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015167int
15168main ()
15169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015171 ;
15172 return 0;
15173}
15174_ACEOF
15175rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176if { (ac_try="$ac_link"
15177case "(($ac_try" in
15178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15179 *) ac_try_echo=$ac_try;;
15180esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015184 grep -v '^ *+' conftest.er1 >conftest.err
15185 rm -f conftest.er1
15186 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 (exit $ac_status); } && {
15189 test -z "$ac_c_werror_flag" ||
15190 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015191 } && test -s conftest$ac_exeext &&
15192 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015194else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015196sed 's/^/| /' conftest.$ac_ext >&5
15197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200
15201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015202 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015203LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015204fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015205{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15206echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
15207if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015209#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015210_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015212 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015213 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015214 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015215else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015216
Martin v. Löwis130fb172001-07-19 11:00:41 +000015217 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015218fi
15219
Guido van Rossum627b2d71993-12-24 10:39:16 +000015220
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015221fi
15222
Guido van Rossum0be3e491997-05-22 20:33:33 +000015223fi
15224
Guido van Rossum49545951997-12-02 19:28:29 +000015225fi
15226
Guido van Rossumb93a8621998-05-07 13:27:32 +000015227fi
15228
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015229
Michael W. Hudson54241132001-12-07 15:38:26 +000015230fi
15231
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
15234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015235 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236fi
15237
Martin v. Löwis11437992002-04-12 09:54:03 +000015238fi
15239
15240
15241fi
15242
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015243
Michael W. Hudson54241132001-12-07 15:38:26 +000015244
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015245 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15246echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015247if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015249else
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015251LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015253/* confdefs.h. */
15254_ACEOF
15255cat confdefs.h >>conftest.$ac_ext
15256cat >>conftest.$ac_ext <<_ACEOF
15257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259/* Override any GCC internal prototype to avoid an error.
15260 Use char because int might match the return type of a GCC
15261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015262#ifdef __cplusplus
15263extern "C"
15264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015265char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015266int
15267main ()
15268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ;
15271 return 0;
15272}
15273_ACEOF
15274rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275if { (ac_try="$ac_link"
15276case "(($ac_try" in
15277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15278 *) ac_try_echo=$ac_try;;
15279esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015283 grep -v '^ *+' conftest.er1 >conftest.err
15284 rm -f conftest.er1
15285 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 (exit $ac_status); } && {
15288 test -z "$ac_c_werror_flag" ||
15289 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015290 } && test -s conftest$ac_exeext &&
15291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015292 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015295sed 's/^/| /' conftest.$ac_ext >&5
15296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299
15300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015302LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015303fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015304{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15305echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
15306if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015307 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015308#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015309_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015310
Martin v. Löwis130fb172001-07-19 11:00:41 +000015311 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015312 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015313 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015314fi
15315
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015316
Neal Norwitza978ab02002-11-02 16:58:05 +000015317 if test "$posix_threads" != "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015318 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15319echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015320if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015322else
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015324LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015325cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* confdefs.h. */
15327_ACEOF
15328cat confdefs.h >>conftest.$ac_ext
15329cat >>conftest.$ac_ext <<_ACEOF
15330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332/* Override any GCC internal prototype to avoid an error.
15333 Use char because int might match the return type of a GCC
15334 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015335#ifdef __cplusplus
15336extern "C"
15337#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015338char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015339int
15340main ()
15341{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015342return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 ;
15344 return 0;
15345}
15346_ACEOF
15347rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348if { (ac_try="$ac_link"
15349case "(($ac_try" in
15350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15351 *) ac_try_echo=$ac_try;;
15352esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015356 grep -v '^ *+' conftest.er1 >conftest.err
15357 rm -f conftest.er1
15358 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360 (exit $ac_status); } && {
15361 test -z "$ac_c_werror_flag" ||
15362 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015363 } && test -s conftest$ac_exeext &&
15364 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015365 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015366else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015368sed 's/^/| /' conftest.$ac_ext >&5
15369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372
15373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015376fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015377{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15378echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
15379if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015380 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015381#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015382_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015383
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015384 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015385 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015386 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015387fi
15388
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015389 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015390
Martin v. Löwis130fb172001-07-19 11:00:41 +000015391 if test "$USE_THREAD_MODULE" != "#"
15392 then
15393 # If the above checks didn't disable threads, (at least) OSF1
15394 # needs this '-threads' argument during linking.
15395 case $ac_sys_system in
15396 OSF1) LDLAST=-threads;;
15397 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015398 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015399fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015400
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015401if test "$posix_threads" = "yes"; then
15402 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015403
15404cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015405#define _POSIX_THREADS 1
15406_ACEOF
15407
15408 fi
15409
15410 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15411 case $ac_sys_system/$ac_sys_release in
15412 SunOS/5.6)
15413cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015414#define HAVE_PTHREAD_DESTRUCTOR 1
15415_ACEOF
15416
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015417 ;;
15418 SunOS/5.8)
15419cat >>confdefs.h <<\_ACEOF
15420#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15421_ACEOF
15422
15423 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015424 AIX/5)
15425cat >>confdefs.h <<\_ACEOF
15426#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15427_ACEOF
15428
15429 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015430 esac
15431
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015432 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15433echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015434 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015435 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015436else
15437 if test "$cross_compiling" = yes; then
15438 ac_cv_pthread_system_supported=no
15439else
15440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015441/* confdefs.h. */
15442_ACEOF
15443cat confdefs.h >>conftest.$ac_ext
15444cat >>conftest.$ac_ext <<_ACEOF
15445/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015446#include <pthread.h>
15447 void *foo(void *parm) {
15448 return NULL;
15449 }
15450 main() {
15451 pthread_attr_t attr;
15452 pthread_t id;
15453 if (pthread_attr_init(&attr)) exit(-1);
15454 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15455 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15456 exit(0);
15457 }
15458_ACEOF
15459rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460if { (ac_try="$ac_link"
15461case "(($ac_try" in
15462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15463 *) ac_try_echo=$ac_try;;
15464esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015467 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470 { (case "(($ac_try" in
15471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15472 *) ac_try_echo=$ac_try;;
15473esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015475 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015476 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015478 (exit $ac_status); }; }; then
15479 ac_cv_pthread_system_supported=yes
15480else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015481 echo "$as_me: program exited with status $ac_status" >&5
15482echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015483sed 's/^/| /' conftest.$ac_ext >&5
15484
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015485( exit $ac_status )
15486ac_cv_pthread_system_supported=no
15487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488rm -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 +000015489fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491
15492
Guido van Rossum627b2d71993-12-24 10:39:16 +000015493fi
15494
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015495 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15496echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015497 if test "$ac_cv_pthread_system_supported" = "yes"; then
15498
15499cat >>confdefs.h <<\_ACEOF
15500#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15501_ACEOF
15502
15503 fi
15504
15505for ac_func in pthread_sigmask
15506do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015507as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15508{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15509echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015511 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015512else
15513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015514/* confdefs.h. */
15515_ACEOF
15516cat confdefs.h >>conftest.$ac_ext
15517cat >>conftest.$ac_ext <<_ACEOF
15518/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015519/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15520 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15521#define $ac_func innocuous_$ac_func
15522
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015523/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015524 which can conflict with char $ac_func (); below.
15525 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015526 <limits.h> exists even on freestanding compilers. */
15527
15528#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015529# include <limits.h>
15530#else
15531# include <assert.h>
15532#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015533
15534#undef $ac_func
15535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536/* Override any GCC internal prototype to avoid an error.
15537 Use char because int might match the return type of a GCC
15538 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015539#ifdef __cplusplus
15540extern "C"
15541#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015542char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015543/* The GNU C library defines this for functions which it implements
15544 to always fail with ENOSYS. Some functions are actually named
15545 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015547choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015548#endif
15549
Skip Montanaro6dead952003-09-25 14:50:04 +000015550int
15551main ()
15552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015554 ;
15555 return 0;
15556}
15557_ACEOF
15558rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559if { (ac_try="$ac_link"
15560case "(($ac_try" in
15561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15562 *) ac_try_echo=$ac_try;;
15563esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567 grep -v '^ *+' conftest.er1 >conftest.err
15568 rm -f conftest.er1
15569 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 (exit $ac_status); } && {
15572 test -z "$ac_c_werror_flag" ||
15573 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015574 } && test -s conftest$ac_exeext &&
15575 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015576 eval "$as_ac_var=yes"
15577else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015579sed 's/^/| /' conftest.$ac_ext >&5
15580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015581 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583
15584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015586fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015587ac_res=`eval echo '${'$as_ac_var'}'`
15588 { echo "$as_me:$LINENO: result: $ac_res" >&5
15589echo "${ECHO_T}$ac_res" >&6; }
15590if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015591 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015592#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015593_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015594 case $ac_sys_system in
15595 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015596
Jason Tishlerfac083d2003-07-22 15:20:49 +000015597cat >>confdefs.h <<\_ACEOF
15598#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15599_ACEOF
15600
15601 ;;
15602 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015603fi
15604done
15605
15606fi
15607
15608
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015609# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015610
15611
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015612{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15613echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015615if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015617 no)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015618 { echo "$as_me:$LINENO: result: no" >&5
15619echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015620 ipv6=no
15621 ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015622 *) { echo "$as_me:$LINENO: result: yes" >&5
15623echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015625#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015626_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015627
15628 ipv6=yes
15629 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015631else
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015633 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015634 { echo "$as_me:$LINENO: result: no" >&5
15635echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015636 ipv6=no
15637
15638else
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015640/* confdefs.h. */
15641_ACEOF
15642cat confdefs.h >>conftest.$ac_ext
15643cat >>conftest.$ac_ext <<_ACEOF
15644/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015645 /* AF_INET6 available check */
15646#include <sys/types.h>
15647#include <sys/socket.h>
15648main()
15649{
15650 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15651 exit(1);
15652 else
15653 exit(0);
15654}
15655
Martin v. Löwis11437992002-04-12 09:54:03 +000015656_ACEOF
15657rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658if { (ac_try="$ac_link"
15659case "(($ac_try" in
15660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15661 *) ac_try_echo=$ac_try;;
15662esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668 { (case "(($ac_try" in
15669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15670 *) ac_try_echo=$ac_try;;
15671esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015677 { echo "$as_me:$LINENO: result: yes" >&5
15678echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015679 ipv6=yes
15680else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015681 echo "$as_me: program exited with status $ac_status" >&5
15682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015683sed 's/^/| /' conftest.$ac_ext >&5
15684
Martin v. Löwis11437992002-04-12 09:54:03 +000015685( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015686{ echo "$as_me:$LINENO: result: no" >&5
15687echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015688 ipv6=no
15689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690rm -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 +000015691fi
15692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693
15694
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015695if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015696 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15697echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015699/* confdefs.h. */
15700_ACEOF
15701cat confdefs.h >>conftest.$ac_ext
15702cat >>conftest.$ac_ext <<_ACEOF
15703/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015704#include <sys/types.h>
15705#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015706int
15707main ()
15708{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015709struct sockaddr_in6 x;
15710x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 ;
15712 return 0;
15713}
15714_ACEOF
15715rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716if { (ac_try="$ac_compile"
15717case "(($ac_try" in
15718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15719 *) ac_try_echo=$ac_try;;
15720esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015724 grep -v '^ *+' conftest.er1 >conftest.err
15725 rm -f conftest.er1
15726 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728 (exit $ac_status); } && {
15729 test -z "$ac_c_werror_flag" ||
15730 test ! -s conftest.err
15731 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015732 { echo "$as_me:$LINENO: result: yes" >&5
15733echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015734 ipv6=yes
15735else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015737sed 's/^/| /' conftest.$ac_ext >&5
15738
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015739 { echo "$as_me:$LINENO: result: no" >&5
15740echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015741 ipv6=no
15742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743
15744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015745fi
15746
15747if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015749#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015751
15752fi
15753
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754fi
15755
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015756
15757ipv6type=unknown
15758ipv6lib=none
15759ipv6trylibc=no
15760
15761if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015762 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15763echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015764 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15765 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015766 case $i in
15767 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015769/* confdefs.h. */
15770_ACEOF
15771cat confdefs.h >>conftest.$ac_ext
15772cat >>conftest.$ac_ext <<_ACEOF
15773/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015775#include <netinet/in.h>
15776#ifdef IPV6_INRIA_VERSION
15777yes
15778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015779_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015781 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015782 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015783fi
15784rm -f conftest*
15785
15786 ;;
15787 kame)
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öwisa5f73f92001-10-15 08:06:29 +000015794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015795#include <netinet/in.h>
15796#ifdef __KAME__
15797yes
15798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015799_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015801 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015802 ipv6type=$i;
15803 ipv6lib=inet6
15804 ipv6libdir=/usr/local/v6/lib
15805 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015806fi
15807rm -f conftest*
15808
15809 ;;
15810 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015812/* confdefs.h. */
15813_ACEOF
15814cat confdefs.h >>conftest.$ac_ext
15815cat >>conftest.$ac_ext <<_ACEOF
15816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015818#include <features.h>
15819#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15820yes
15821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015824 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015825 ipv6type=$i;
15826 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015827fi
15828rm -f conftest*
15829
15830 ;;
15831 linux-inet6)
15832 if test -d /usr/inet6; then
15833 ipv6type=$i
15834 ipv6lib=inet6
15835 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015836 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015837 fi
15838 ;;
15839 solaris)
15840 if test -f /etc/netconfig; then
15841 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15842 ipv6type=$i
15843 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015844 fi
15845 fi
15846 ;;
15847 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015849/* confdefs.h. */
15850_ACEOF
15851cat confdefs.h >>conftest.$ac_ext
15852cat >>conftest.$ac_ext <<_ACEOF
15853/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015855#include <sys/param.h>
15856#ifdef _TOSHIBA_INET6
15857yes
15858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015859_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015861 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015862 ipv6type=$i;
15863 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015864 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015865fi
15866rm -f conftest*
15867
15868 ;;
15869 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015871/* confdefs.h. */
15872_ACEOF
15873cat confdefs.h >>conftest.$ac_ext
15874cat >>conftest.$ac_ext <<_ACEOF
15875/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015876
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015877#include </usr/local/v6/include/sys/v6config.h>
15878#ifdef __V6D__
15879yes
15880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015881_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015883 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015884 ipv6type=$i;
15885 ipv6lib=v6;
15886 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015887 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015888fi
15889rm -f conftest*
15890
15891 ;;
15892 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015894/* confdefs.h. */
15895_ACEOF
15896cat confdefs.h >>conftest.$ac_ext
15897cat >>conftest.$ac_ext <<_ACEOF
15898/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015900#include <sys/param.h>
15901#ifdef _ZETA_MINAMI_INET6
15902yes
15903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015906 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015907 ipv6type=$i;
15908 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015909 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015910fi
15911rm -f conftest*
15912
15913 ;;
15914 esac
15915 if test "$ipv6type" != "unknown"; then
15916 break
15917 fi
15918 done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015919 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15920echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015921fi
15922
15923if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15924 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15925 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15926 echo "using lib$ipv6lib"
15927 else
15928 if test $ipv6trylibc = "yes"; then
15929 echo "using libc"
15930 else
15931 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15932 echo "You need to fetch lib$ipv6lib.a from appropriate"
15933 echo 'ipv6 kit and compile beforehand.'
15934 exit 1
15935 fi
15936 fi
15937fi
15938
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015939{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15940echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015941cat >conftest.$ac_ext <<_ACEOF
15942/* confdefs.h. */
15943_ACEOF
15944cat confdefs.h >>conftest.$ac_ext
15945cat >>conftest.$ac_ext <<_ACEOF
15946/* end confdefs.h. */
15947#include <Carbon/Carbon.h>
15948int
15949main ()
15950{
15951FSIORefNum fRef = 0
15952 ;
15953 return 0;
15954}
15955_ACEOF
15956rm -f conftest.$ac_objext
15957if { (ac_try="$ac_compile"
15958case "(($ac_try" in
15959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15960 *) ac_try_echo=$ac_try;;
15961esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015963 (eval "$ac_compile") 2>conftest.er1
15964 ac_status=$?
15965 grep -v '^ *+' conftest.er1 >conftest.err
15966 rm -f conftest.er1
15967 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015969 (exit $ac_status); } && {
15970 test -z "$ac_c_werror_flag" ||
15971 test ! -s conftest.err
15972 } && test -s conftest.$ac_objext; then
15973
15974cat >>confdefs.h <<\_ACEOF
15975#define HAVE_OSX105_SDK 1
15976_ACEOF
15977
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015978 { echo "$as_me:$LINENO: result: yes" >&5
15979echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015980else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015981 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015982sed 's/^/| /' conftest.$ac_ext >&5
15983
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015984 { echo "$as_me:$LINENO: result: no" >&5
15985echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015986
15987fi
15988
15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015991# Check for --with-doc-strings
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015992{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15993echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015995# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015996if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997 withval=$with_doc_strings;
15998fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015999
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016000
16001if test -z "$with_doc_strings"
16002then with_doc_strings="yes"
16003fi
16004if test "$with_doc_strings" != "no"
16005then
16006
16007cat >>confdefs.h <<\_ACEOF
16008#define WITH_DOC_STRINGS 1
16009_ACEOF
16010
16011fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016012{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16013echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016014
Neil Schemenauera35c6882001-02-27 04:45:05 +000016015# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016016{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
16017echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016020if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016022if test "$withval" != no
16023then
16024
16025cat >>confdefs.h <<\_ACEOF
16026#define WITH_TSC 1
16027_ACEOF
16028
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016029 { echo "$as_me:$LINENO: result: yes" >&5
16030echo "${ECHO_T}yes" >&6; }
16031else { echo "$as_me:$LINENO: result: no" >&5
16032echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016033fi
16034else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016035 { echo "$as_me:$LINENO: result: no" >&5
16036echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037fi
16038
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016039
16040# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016041{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16042echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016045if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046 withval=$with_pymalloc;
16047fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016048
Neil Schemenauera35c6882001-02-27 04:45:05 +000016049
Neil Schemenauer16c22972002-03-22 15:34:49 +000016050if test -z "$with_pymalloc"
16051then with_pymalloc="yes"
16052fi
16053if test "$with_pymalloc" != "no"
16054then
Martin v. Löwis11437992002-04-12 09:54:03 +000016055
16056cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016057#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016059
16060fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016061{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16062echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016063
Barry Warsawef82cd72000-06-30 16:21:01 +000016064# Check for --with-wctype-functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016065{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16066echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016069if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016071if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016072then
16073
16074cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016075#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016076_ACEOF
16077
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016078 { echo "$as_me:$LINENO: result: yes" >&5
16079echo "${ECHO_T}yes" >&6; }
16080else { echo "$as_me:$LINENO: result: no" >&5
16081echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016082fi
16083else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016084 { echo "$as_me:$LINENO: result: no" >&5
16085echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086fi
16087
Barry Warsawef82cd72000-06-30 16:21:01 +000016088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016089# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016090
Guido van Rossum98935bf2001-09-05 19:13:16 +000016091DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016092
Guido van Rossume97ee181999-12-20 21:27:22 +000016093# the dlopen() function means we might want to use dynload_shlib.o. some
16094# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016095
Thomas Wouters3a584202000-08-05 23:28:51 +000016096for ac_func in dlopen
16097do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016098as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16099{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16100echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016103else
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016105/* confdefs.h. */
16106_ACEOF
16107cat confdefs.h >>conftest.$ac_ext
16108cat >>conftest.$ac_ext <<_ACEOF
16109/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016110/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16111 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16112#define $ac_func innocuous_$ac_func
16113
Guido van Rossume97ee181999-12-20 21:27:22 +000016114/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016115 which can conflict with char $ac_func (); below.
16116 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016117 <limits.h> exists even on freestanding compilers. */
16118
16119#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016120# include <limits.h>
16121#else
16122# include <assert.h>
16123#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016124
16125#undef $ac_func
16126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127/* Override any GCC internal prototype to avoid an error.
16128 Use char because int might match the return type of a GCC
16129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016130#ifdef __cplusplus
16131extern "C"
16132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016133char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016134/* The GNU C library defines this for functions which it implements
16135 to always fail with ENOSYS. Some functions are actually named
16136 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016138choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016139#endif
16140
Skip Montanaro6dead952003-09-25 14:50:04 +000016141int
16142main ()
16143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 ;
16146 return 0;
16147}
16148_ACEOF
16149rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150if { (ac_try="$ac_link"
16151case "(($ac_try" in
16152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16153 *) ac_try_echo=$ac_try;;
16154esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016158 grep -v '^ *+' conftest.er1 >conftest.err
16159 rm -f conftest.er1
16160 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 (exit $ac_status); } && {
16163 test -z "$ac_c_werror_flag" ||
16164 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016165 } && test -s conftest$ac_exeext &&
16166 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016167 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016168else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016170sed 's/^/| /' conftest.$ac_ext >&5
16171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174
16175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016176 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016177fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016178ac_res=`eval echo '${'$as_ac_var'}'`
16179 { echo "$as_me:$LINENO: result: $ac_res" >&5
16180echo "${ECHO_T}$ac_res" >&6; }
16181if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016183#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016184_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016185
Guido van Rossume97ee181999-12-20 21:27:22 +000016186fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016187done
Guido van Rossume97ee181999-12-20 21:27:22 +000016188
Michael W. Hudson54241132001-12-07 15:38:26 +000016189
Guido van Rossume97ee181999-12-20 21:27:22 +000016190# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16191# loading of modules.
16192
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016193{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16194echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016195if test -z "$DYNLOADFILE"
16196then
16197 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016198 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16199 if test "$ac_cv_func_dlopen" = yes
16200 then DYNLOADFILE="dynload_shlib.o"
16201 else DYNLOADFILE="dynload_aix.o"
16202 fi
16203 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016204 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016205 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16206 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016207 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016208 *)
16209 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16210 # out any dynamic loading
16211 if test "$ac_cv_func_dlopen" = yes
16212 then DYNLOADFILE="dynload_shlib.o"
16213 else DYNLOADFILE="dynload_stub.o"
16214 fi
16215 ;;
16216 esac
16217fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016218{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16219echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016220if test "$DYNLOADFILE" != "dynload_stub.o"
16221then
Martin v. Löwis11437992002-04-12 09:54:03 +000016222
16223cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016224#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016225_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016226
16227fi
16228
Neil Schemenauer4e425612001-06-19 15:44:15 +000016229# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16230
Michael W. Hudson54241132001-12-07 15:38:26 +000016231
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016232{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16233echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016234if test -z "$MACHDEP_OBJS"
16235then
Jack Jansene578a632001-08-15 01:27:14 +000016236 MACHDEP_OBJS=$extra_machdep_objs
16237else
16238 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016239fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016240{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16241echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016242
Guido van Rossum627b2d71993-12-24 10:39:16 +000016243# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
Martin v. Löwisd6320502004-08-12 13:45:08 +000016315
Martin v. Löwisc3001752005-01-23 09:27:24 +000016316
16317
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016318
16319
Thomas Wouterscf297e42007-02-23 15:07:44 +000016320
16321
Gregory P. Smith25523d22007-09-03 16:44:55 +000016322
Christian Heimes4e30a842007-11-30 22:12:06 +000016323
Martin v. Löwis92fab752008-03-08 10:40:41 +000016324
Martin v. Löwis823725e2008-03-24 13:39:54 +000016325
16326
Benjamin Peterson965ce872009-04-05 21:24:58 +000016327
16328
16329
16330
Martin v. Löwis011e8422009-05-05 04:43:17 +000016331
Martin v. Löwis113a0852009-05-29 17:25:39 +000016332
Martin v. Löwis823725e2008-03-24 13:39:54 +000016333for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16334 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016335 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016336 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016337 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016338 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016339 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016340 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16341 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016342 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016343 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016344 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016345 truncate uname unsetenv utimes waitpid wait3 wait4 \
16346 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016347do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016348as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16349{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16350echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016352 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016353else
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016355/* confdefs.h. */
16356_ACEOF
16357cat confdefs.h >>conftest.$ac_ext
16358cat >>conftest.$ac_ext <<_ACEOF
16359/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016360/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16361 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16362#define $ac_func innocuous_$ac_func
16363
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016364/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016365 which can conflict with char $ac_func (); below.
16366 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016367 <limits.h> exists even on freestanding compilers. */
16368
16369#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016370# include <limits.h>
16371#else
16372# include <assert.h>
16373#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016374
16375#undef $ac_func
16376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377/* Override any GCC internal prototype to avoid an error.
16378 Use char because int might match the return type of a GCC
16379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016380#ifdef __cplusplus
16381extern "C"
16382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016383char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016384/* The GNU C library defines this for functions which it implements
16385 to always fail with ENOSYS. Some functions are actually named
16386 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016387#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016388choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016389#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016390
Skip Montanaro6dead952003-09-25 14:50:04 +000016391int
16392main ()
16393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016395 ;
16396 return 0;
16397}
16398_ACEOF
16399rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400if { (ac_try="$ac_link"
16401case "(($ac_try" in
16402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16403 *) ac_try_echo=$ac_try;;
16404esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016408 grep -v '^ *+' conftest.er1 >conftest.err
16409 rm -f conftest.er1
16410 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 (exit $ac_status); } && {
16413 test -z "$ac_c_werror_flag" ||
16414 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016415 } && test -s conftest$ac_exeext &&
16416 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016418else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016420sed 's/^/| /' conftest.$ac_ext >&5
16421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016422 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016424
16425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016426 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016427fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016428ac_res=`eval echo '${'$as_ac_var'}'`
16429 { echo "$as_me:$LINENO: result: $ac_res" >&5
16430echo "${ECHO_T}$ac_res" >&6; }
16431if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016432 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016433#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016434_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016435
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016436fi
16437done
16438
Michael W. Hudson54241132001-12-07 15:38:26 +000016439
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016440# For some functions, having a definition is not sufficient, since
16441# we want to take their address.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016442{ echo "$as_me:$LINENO: checking for chroot" >&5
16443echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016444cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016445/* confdefs.h. */
16446_ACEOF
16447cat confdefs.h >>conftest.$ac_ext
16448cat >>conftest.$ac_ext <<_ACEOF
16449/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016450#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016451int
16452main ()
16453{
16454void *x=chroot
16455 ;
16456 return 0;
16457}
16458_ACEOF
16459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016460if { (ac_try="$ac_compile"
16461case "(($ac_try" in
16462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16463 *) ac_try_echo=$ac_try;;
16464esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016465eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016466 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016468 grep -v '^ *+' conftest.er1 >conftest.err
16469 rm -f conftest.er1
16470 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472 (exit $ac_status); } && {
16473 test -z "$ac_c_werror_flag" ||
16474 test ! -s conftest.err
16475 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016476
16477cat >>confdefs.h <<\_ACEOF
16478#define HAVE_CHROOT 1
16479_ACEOF
16480
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016481 { echo "$as_me:$LINENO: result: yes" >&5
16482echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016483else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016485sed 's/^/| /' conftest.$ac_ext >&5
16486
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016487 { echo "$as_me:$LINENO: result: no" >&5
16488echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016489
16490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016491
16492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016493{ echo "$as_me:$LINENO: checking for link" >&5
16494echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016496/* confdefs.h. */
16497_ACEOF
16498cat confdefs.h >>conftest.$ac_ext
16499cat >>conftest.$ac_ext <<_ACEOF
16500/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016501#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016502int
16503main ()
16504{
16505void *x=link
16506 ;
16507 return 0;
16508}
16509_ACEOF
16510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511if { (ac_try="$ac_compile"
16512case "(($ac_try" in
16513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16514 *) ac_try_echo=$ac_try;;
16515esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016519 grep -v '^ *+' conftest.er1 >conftest.err
16520 rm -f conftest.er1
16521 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523 (exit $ac_status); } && {
16524 test -z "$ac_c_werror_flag" ||
16525 test ! -s conftest.err
16526 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016527
16528cat >>confdefs.h <<\_ACEOF
16529#define HAVE_LINK 1
16530_ACEOF
16531
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016532 { echo "$as_me:$LINENO: result: yes" >&5
16533echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016534else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016536sed 's/^/| /' conftest.$ac_ext >&5
16537
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016538 { echo "$as_me:$LINENO: result: no" >&5
16539echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016540
16541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542
16543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016544{ echo "$as_me:$LINENO: checking for symlink" >&5
16545echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016546cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016547/* confdefs.h. */
16548_ACEOF
16549cat confdefs.h >>conftest.$ac_ext
16550cat >>conftest.$ac_ext <<_ACEOF
16551/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016552#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016553int
16554main ()
16555{
16556void *x=symlink
16557 ;
16558 return 0;
16559}
16560_ACEOF
16561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562if { (ac_try="$ac_compile"
16563case "(($ac_try" in
16564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16565 *) ac_try_echo=$ac_try;;
16566esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016570 grep -v '^ *+' conftest.er1 >conftest.err
16571 rm -f conftest.er1
16572 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574 (exit $ac_status); } && {
16575 test -z "$ac_c_werror_flag" ||
16576 test ! -s conftest.err
16577 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016578
16579cat >>confdefs.h <<\_ACEOF
16580#define HAVE_SYMLINK 1
16581_ACEOF
16582
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016583 { echo "$as_me:$LINENO: result: yes" >&5
16584echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016585else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016589 { echo "$as_me:$LINENO: result: no" >&5
16590echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016591
16592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016593
16594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016595{ echo "$as_me:$LINENO: checking for fchdir" >&5
16596echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016597cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016598/* confdefs.h. */
16599_ACEOF
16600cat confdefs.h >>conftest.$ac_ext
16601cat >>conftest.$ac_ext <<_ACEOF
16602/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016603#include <unistd.h>
16604int
16605main ()
16606{
16607void *x=fchdir
16608 ;
16609 return 0;
16610}
16611_ACEOF
16612rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016613if { (ac_try="$ac_compile"
16614case "(($ac_try" in
16615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16616 *) ac_try_echo=$ac_try;;
16617esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016621 grep -v '^ *+' conftest.er1 >conftest.err
16622 rm -f conftest.er1
16623 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016625 (exit $ac_status); } && {
16626 test -z "$ac_c_werror_flag" ||
16627 test ! -s conftest.err
16628 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016629
16630cat >>confdefs.h <<\_ACEOF
16631#define HAVE_FCHDIR 1
16632_ACEOF
16633
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016634 { echo "$as_me:$LINENO: result: yes" >&5
16635echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016636else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016637 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016638sed 's/^/| /' conftest.$ac_ext >&5
16639
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016640 { echo "$as_me:$LINENO: result: no" >&5
16641echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016642
16643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644
16645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016646{ echo "$as_me:$LINENO: checking for fsync" >&5
16647echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016649/* confdefs.h. */
16650_ACEOF
16651cat confdefs.h >>conftest.$ac_ext
16652cat >>conftest.$ac_ext <<_ACEOF
16653/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016654#include <unistd.h>
16655int
16656main ()
16657{
16658void *x=fsync
16659 ;
16660 return 0;
16661}
16662_ACEOF
16663rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664if { (ac_try="$ac_compile"
16665case "(($ac_try" in
16666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16667 *) ac_try_echo=$ac_try;;
16668esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016672 grep -v '^ *+' conftest.er1 >conftest.err
16673 rm -f conftest.er1
16674 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676 (exit $ac_status); } && {
16677 test -z "$ac_c_werror_flag" ||
16678 test ! -s conftest.err
16679 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016680
16681cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016682#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016683_ACEOF
16684
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016685 { echo "$as_me:$LINENO: result: yes" >&5
16686echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016687else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016689sed 's/^/| /' conftest.$ac_ext >&5
16690
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016691 { echo "$as_me:$LINENO: result: no" >&5
16692echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016693
16694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695
16696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016697{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16698echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016700/* confdefs.h. */
16701_ACEOF
16702cat confdefs.h >>conftest.$ac_ext
16703cat >>conftest.$ac_ext <<_ACEOF
16704/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016705#include <unistd.h>
16706int
16707main ()
16708{
16709void *x=fdatasync
16710 ;
16711 return 0;
16712}
16713_ACEOF
16714rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016715if { (ac_try="$ac_compile"
16716case "(($ac_try" in
16717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16718 *) ac_try_echo=$ac_try;;
16719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016723 grep -v '^ *+' conftest.er1 >conftest.err
16724 rm -f conftest.er1
16725 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727 (exit $ac_status); } && {
16728 test -z "$ac_c_werror_flag" ||
16729 test ! -s conftest.err
16730 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016731
16732cat >>confdefs.h <<\_ACEOF
16733#define HAVE_FDATASYNC 1
16734_ACEOF
16735
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016736 { echo "$as_me:$LINENO: result: yes" >&5
16737echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016738else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016740sed 's/^/| /' conftest.$ac_ext >&5
16741
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016742 { echo "$as_me:$LINENO: result: no" >&5
16743echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016744
16745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
16747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016748{ echo "$as_me:$LINENO: checking for epoll" >&5
16749echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016750cat >conftest.$ac_ext <<_ACEOF
16751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
16756#include <sys/epoll.h>
16757int
16758main ()
16759{
16760void *x=epoll_create
16761 ;
16762 return 0;
16763}
16764_ACEOF
16765rm -f conftest.$ac_objext
16766if { (ac_try="$ac_compile"
16767case "(($ac_try" in
16768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16769 *) ac_try_echo=$ac_try;;
16770esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016772 (eval "$ac_compile") 2>conftest.er1
16773 ac_status=$?
16774 grep -v '^ *+' conftest.er1 >conftest.err
16775 rm -f conftest.er1
16776 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016778 (exit $ac_status); } && {
16779 test -z "$ac_c_werror_flag" ||
16780 test ! -s conftest.err
16781 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016782
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016783cat >>confdefs.h <<\_ACEOF
16784#define HAVE_EPOLL 1
16785_ACEOF
16786
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016787 { echo "$as_me:$LINENO: result: yes" >&5
16788echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016789else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016790 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016791sed 's/^/| /' conftest.$ac_ext >&5
16792
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016793 { echo "$as_me:$LINENO: result: no" >&5
16794echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016795
16796fi
16797
16798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016799{ echo "$as_me:$LINENO: checking for kqueue" >&5
16800echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016801cat >conftest.$ac_ext <<_ACEOF
16802/* confdefs.h. */
16803_ACEOF
16804cat confdefs.h >>conftest.$ac_ext
16805cat >>conftest.$ac_ext <<_ACEOF
16806/* end confdefs.h. */
16807
16808#include <sys/types.h>
16809#include <sys/event.h>
16810
16811int
16812main ()
16813{
16814int x=kqueue()
16815 ;
16816 return 0;
16817}
16818_ACEOF
16819rm -f conftest.$ac_objext
16820if { (ac_try="$ac_compile"
16821case "(($ac_try" in
16822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16823 *) ac_try_echo=$ac_try;;
16824esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016826 (eval "$ac_compile") 2>conftest.er1
16827 ac_status=$?
16828 grep -v '^ *+' conftest.er1 >conftest.err
16829 rm -f conftest.er1
16830 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016832 (exit $ac_status); } && {
16833 test -z "$ac_c_werror_flag" ||
16834 test ! -s conftest.err
16835 } && test -s conftest.$ac_objext; then
16836
16837cat >>confdefs.h <<\_ACEOF
16838#define HAVE_KQUEUE 1
16839_ACEOF
16840
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016841 { echo "$as_me:$LINENO: result: yes" >&5
16842echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016843else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016844 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016845sed 's/^/| /' conftest.$ac_ext >&5
16846
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016847 { echo "$as_me:$LINENO: result: no" >&5
16848echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016849
16850fi
16851
16852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016853# On some systems (eg. FreeBSD 5), we would find a definition of the
16854# functions ctermid_r, setgroups in the library, but no prototype
16855# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16856# address to avoid compiler warnings and potential miscompilations
16857# because of the missing prototypes.
16858
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016859{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16860echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016862/* confdefs.h. */
16863_ACEOF
16864cat confdefs.h >>conftest.$ac_ext
16865cat >>conftest.$ac_ext <<_ACEOF
16866/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016867
16868#include "confdefs.h"
16869#include <stdio.h>
16870
Martin v. Löwisd5843682002-11-21 20:41:28 +000016871int
16872main ()
16873{
16874void* p = ctermid_r
16875 ;
16876 return 0;
16877}
16878_ACEOF
16879rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880if { (ac_try="$ac_compile"
16881case "(($ac_try" in
16882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16883 *) ac_try_echo=$ac_try;;
16884esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016888 grep -v '^ *+' conftest.er1 >conftest.err
16889 rm -f conftest.er1
16890 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892 (exit $ac_status); } && {
16893 test -z "$ac_c_werror_flag" ||
16894 test ! -s conftest.err
16895 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016896
16897cat >>confdefs.h <<\_ACEOF
16898#define HAVE_CTERMID_R 1
16899_ACEOF
16900
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016901 { echo "$as_me:$LINENO: result: yes" >&5
16902echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016903else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016904 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016905sed 's/^/| /' conftest.$ac_ext >&5
16906
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016907 { echo "$as_me:$LINENO: result: no" >&5
16908echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016909
16910fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016911
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16913
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016914{ echo "$as_me:$LINENO: checking for flock" >&5
16915echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016916cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016917/* confdefs.h. */
16918_ACEOF
16919cat confdefs.h >>conftest.$ac_ext
16920cat >>conftest.$ac_ext <<_ACEOF
16921/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016922
16923#include "confdefs.h"
16924#include <sys/file.h>
16925
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016926int
16927main ()
16928{
16929void* p = flock
16930 ;
16931 return 0;
16932}
16933_ACEOF
16934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935if { (ac_try="$ac_compile"
16936case "(($ac_try" in
16937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16938 *) ac_try_echo=$ac_try;;
16939esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016943 grep -v '^ *+' conftest.er1 >conftest.err
16944 rm -f conftest.er1
16945 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947 (exit $ac_status); } && {
16948 test -z "$ac_c_werror_flag" ||
16949 test ! -s conftest.err
16950 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016951
16952cat >>confdefs.h <<\_ACEOF
16953#define HAVE_FLOCK 1
16954_ACEOF
16955
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016956 { echo "$as_me:$LINENO: result: yes" >&5
16957echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016958else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016960sed 's/^/| /' conftest.$ac_ext >&5
16961
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016962 { echo "$as_me:$LINENO: result: no" >&5
16963echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016964
16965fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16968
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016969{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16970echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016971cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016972/* confdefs.h. */
16973_ACEOF
16974cat confdefs.h >>conftest.$ac_ext
16975cat >>conftest.$ac_ext <<_ACEOF
16976/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016977
16978#include "confdefs.h"
16979#include <unistd.h>
16980
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016981int
16982main ()
16983{
16984void* p = getpagesize
16985 ;
16986 return 0;
16987}
16988_ACEOF
16989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990if { (ac_try="$ac_compile"
16991case "(($ac_try" in
16992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16993 *) ac_try_echo=$ac_try;;
16994esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016998 grep -v '^ *+' conftest.er1 >conftest.err
16999 rm -f conftest.er1
17000 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 (exit $ac_status); } && {
17003 test -z "$ac_c_werror_flag" ||
17004 test ! -s conftest.err
17005 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017006
17007cat >>confdefs.h <<\_ACEOF
17008#define HAVE_GETPAGESIZE 1
17009_ACEOF
17010
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017011 { echo "$as_me:$LINENO: result: yes" >&5
17012echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017013else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017015sed 's/^/| /' conftest.$ac_ext >&5
17016
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017017 { echo "$as_me:$LINENO: result: no" >&5
17018echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017019
17020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021
17022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017023
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017024for ac_prog in true
17025do
17026 # Extract the first word of "$ac_prog", so it can be a program name with args.
17027set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017028{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17029echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017030if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017032else
17033 if test -n "$TRUE"; then
17034 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17035else
17036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17037for as_dir in $PATH
17038do
17039 IFS=$as_save_IFS
17040 test -z "$as_dir" && as_dir=.
17041 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 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 +000017043 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017044 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017045 break 2
17046 fi
17047done
17048done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017050
17051fi
17052fi
17053TRUE=$ac_cv_prog_TRUE
17054if test -n "$TRUE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017055 { echo "$as_me:$LINENO: result: $TRUE" >&5
17056echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017057else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017058 { echo "$as_me:$LINENO: result: no" >&5
17059echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017060fi
17061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017062
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017063 test -n "$TRUE" && break
17064done
17065test -n "$TRUE" || TRUE="/bin/true"
17066
17067
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017068{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17069echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017070if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017071 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017072else
17073 ac_check_lib_save_LIBS=$LIBS
17074LIBS="-lc $LIBS"
17075cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017076/* confdefs.h. */
17077_ACEOF
17078cat confdefs.h >>conftest.$ac_ext
17079cat >>conftest.$ac_ext <<_ACEOF
17080/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082/* Override any GCC internal prototype to avoid an error.
17083 Use char because int might match the return type of a GCC
17084 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017085#ifdef __cplusplus
17086extern "C"
17087#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017088char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017089int
17090main ()
17091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017092return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017093 ;
17094 return 0;
17095}
17096_ACEOF
17097rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098if { (ac_try="$ac_link"
17099case "(($ac_try" in
17100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17101 *) ac_try_echo=$ac_try;;
17102esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017106 grep -v '^ *+' conftest.er1 >conftest.err
17107 rm -f conftest.er1
17108 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 (exit $ac_status); } && {
17111 test -z "$ac_c_werror_flag" ||
17112 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017113 } && test -s conftest$ac_exeext &&
17114 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017115 ac_cv_lib_c_inet_aton=yes
17116else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017118sed 's/^/| /' conftest.$ac_ext >&5
17119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017122
17123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017125LIBS=$ac_check_lib_save_LIBS
17126fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017127{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17128echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
17129if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017130 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017131else
17132
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017133{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17134echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017135if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017136 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017137else
17138 ac_check_lib_save_LIBS=$LIBS
17139LIBS="-lresolv $LIBS"
17140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017141/* confdefs.h. */
17142_ACEOF
17143cat confdefs.h >>conftest.$ac_ext
17144cat >>conftest.$ac_ext <<_ACEOF
17145/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147/* Override any GCC internal prototype to avoid an error.
17148 Use char because int might match the return type of a GCC
17149 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017150#ifdef __cplusplus
17151extern "C"
17152#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017153char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017154int
17155main ()
17156{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017157return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017158 ;
17159 return 0;
17160}
17161_ACEOF
17162rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017163if { (ac_try="$ac_link"
17164case "(($ac_try" in
17165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17166 *) ac_try_echo=$ac_try;;
17167esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017169 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017171 grep -v '^ *+' conftest.er1 >conftest.err
17172 rm -f conftest.er1
17173 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175 (exit $ac_status); } && {
17176 test -z "$ac_c_werror_flag" ||
17177 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017178 } && test -s conftest$ac_exeext &&
17179 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017180 ac_cv_lib_resolv_inet_aton=yes
17181else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017183sed 's/^/| /' conftest.$ac_ext >&5
17184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187
17188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017190LIBS=$ac_check_lib_save_LIBS
17191fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017192{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17193echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
17194if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017195 cat >>confdefs.h <<_ACEOF
17196#define HAVE_LIBRESOLV 1
17197_ACEOF
17198
17199 LIBS="-lresolv $LIBS"
17200
17201fi
17202
17203
17204fi
17205
17206
Christian Heimesd0764e22007-12-04 15:00:33 +000017207# On Tru64, chflags seems to be present, but calling it will
17208# exit Python
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017209{ echo "$as_me:$LINENO: checking for chflags" >&5
17210echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17211if test "$cross_compiling" = yes; then
17212 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17213See \`config.log' for more details." >&5
17214echo "$as_me: error: cannot run test program while cross compiling
17215See \`config.log' for more details." >&2;}
17216 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017217else
17218 cat >conftest.$ac_ext <<_ACEOF
17219/* confdefs.h. */
17220_ACEOF
17221cat confdefs.h >>conftest.$ac_ext
17222cat >>conftest.$ac_ext <<_ACEOF
17223/* end confdefs.h. */
17224
17225#include <sys/stat.h>
17226#include <unistd.h>
17227int main(int argc, char*argv[])
17228{
17229 if(chflags(argv[0], 0) != 0)
17230 return 1;
17231 return 0;
17232}
17233
17234_ACEOF
17235rm -f conftest$ac_exeext
17236if { (ac_try="$ac_link"
17237case "(($ac_try" in
17238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17239 *) ac_try_echo=$ac_try;;
17240esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017242 (eval "$ac_link") 2>&5
17243 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17246 { (case "(($ac_try" in
17247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17248 *) ac_try_echo=$ac_try;;
17249esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017251 (eval "$ac_try") 2>&5
17252 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017254 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017255
17256cat >>confdefs.h <<\_ACEOF
17257#define HAVE_CHFLAGS 1
17258_ACEOF
17259
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017260 { echo "$as_me:$LINENO: result: yes" >&5
17261echo "${ECHO_T}yes" >&6; }
17262else
17263 echo "$as_me: program exited with status $ac_status" >&5
17264echo "$as_me: failed program was:" >&5
17265sed 's/^/| /' conftest.$ac_ext >&5
17266
17267( exit $ac_status )
17268{ echo "$as_me:$LINENO: result: no" >&5
17269echo "${ECHO_T}no" >&6; }
17270
17271fi
17272rm -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 +000017273fi
17274
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017275
17276
17277{ echo "$as_me:$LINENO: checking for lchflags" >&5
17278echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17279if test "$cross_compiling" = yes; then
17280 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17281See \`config.log' for more details." >&5
17282echo "$as_me: error: cannot run test program while cross compiling
17283See \`config.log' for more details." >&2;}
17284 { (exit 1); exit 1; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017285else
17286 cat >conftest.$ac_ext <<_ACEOF
17287/* confdefs.h. */
17288_ACEOF
17289cat confdefs.h >>conftest.$ac_ext
17290cat >>conftest.$ac_ext <<_ACEOF
17291/* end confdefs.h. */
17292
17293#include <sys/stat.h>
17294#include <unistd.h>
17295int main(int argc, char*argv[])
17296{
17297 if(lchflags(argv[0], 0) != 0)
17298 return 1;
17299 return 0;
17300}
17301
17302_ACEOF
17303rm -f conftest$ac_exeext
17304if { (ac_try="$ac_link"
17305case "(($ac_try" in
17306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17307 *) ac_try_echo=$ac_try;;
17308esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017310 (eval "$ac_link") 2>&5
17311 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17314 { (case "(($ac_try" in
17315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316 *) ac_try_echo=$ac_try;;
17317esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017319 (eval "$ac_try") 2>&5
17320 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017322 (exit $ac_status); }; }; then
17323
17324cat >>confdefs.h <<\_ACEOF
17325#define HAVE_LCHFLAGS 1
17326_ACEOF
17327
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017328 { echo "$as_me:$LINENO: result: yes" >&5
17329echo "${ECHO_T}yes" >&6; }
17330else
17331 echo "$as_me: program exited with status $ac_status" >&5
17332echo "$as_me: failed program was:" >&5
17333sed 's/^/| /' conftest.$ac_ext >&5
17334
17335( exit $ac_status )
17336{ echo "$as_me:$LINENO: result: no" >&5
17337echo "${ECHO_T}no" >&6; }
17338
Christian Heimesd0764e22007-12-04 15:00:33 +000017339fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17341fi
17342
17343
Christian Heimesd0764e22007-12-04 15:00:33 +000017344
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017345case $ac_sys_system/$ac_sys_release in
17346Darwin/*)
17347 _CUR_CFLAGS="${CFLAGS}"
17348 _CUR_LDFLAGS="${LDFLAGS}"
17349 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17350 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17351 ;;
17352esac
17353
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017354{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17355echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017356if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017357 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017358else
17359 ac_check_lib_save_LIBS=$LIBS
17360LIBS="-lz $LIBS"
17361cat >conftest.$ac_ext <<_ACEOF
17362/* confdefs.h. */
17363_ACEOF
17364cat confdefs.h >>conftest.$ac_ext
17365cat >>conftest.$ac_ext <<_ACEOF
17366/* end confdefs.h. */
17367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368/* Override any GCC internal prototype to avoid an error.
17369 Use char because int might match the return type of a GCC
17370 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017371#ifdef __cplusplus
17372extern "C"
17373#endif
17374char inflateCopy ();
17375int
17376main ()
17377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017379 ;
17380 return 0;
17381}
17382_ACEOF
17383rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384if { (ac_try="$ac_link"
17385case "(($ac_try" in
17386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17387 *) ac_try_echo=$ac_try;;
17388esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017391 ac_status=$?
17392 grep -v '^ *+' conftest.er1 >conftest.err
17393 rm -f conftest.er1
17394 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 (exit $ac_status); } && {
17397 test -z "$ac_c_werror_flag" ||
17398 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017399 } && test -s conftest$ac_exeext &&
17400 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017401 ac_cv_lib_z_inflateCopy=yes
17402else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017403 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017404sed 's/^/| /' conftest.$ac_ext >&5
17405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017408
17409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017410 conftest$ac_exeext conftest.$ac_ext
17411LIBS=$ac_check_lib_save_LIBS
17412fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017413{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17414echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
17415if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017416
17417cat >>confdefs.h <<\_ACEOF
17418#define HAVE_ZLIB_COPY 1
17419_ACEOF
17420
17421fi
17422
17423
17424case $ac_sys_system/$ac_sys_release in
17425Darwin/*)
17426 CFLAGS="${_CUR_CFLAGS}"
17427 LDFLAGS="${_CUR_LDFLAGS}"
17428 ;;
17429esac
17430
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017431{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17432echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017434/* confdefs.h. */
17435_ACEOF
17436cat confdefs.h >>conftest.$ac_ext
17437cat >>conftest.$ac_ext <<_ACEOF
17438/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017439
17440#include "confdefs.h"
17441#include <netdb.h>
17442
Martin v. Löwise9416172003-05-03 10:12:45 +000017443int
17444main ()
17445{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017446void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017447 ;
17448 return 0;
17449}
17450_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017451rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452if { (ac_try="$ac_link"
17453case "(($ac_try" in
17454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17455 *) ac_try_echo=$ac_try;;
17456esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017460 grep -v '^ *+' conftest.er1 >conftest.err
17461 rm -f conftest.er1
17462 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464 (exit $ac_status); } && {
17465 test -z "$ac_c_werror_flag" ||
17466 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017467 } && test -s conftest$ac_exeext &&
17468 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017469
17470cat >>confdefs.h <<\_ACEOF
17471#define HAVE_HSTRERROR 1
17472_ACEOF
17473
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017474 { echo "$as_me:$LINENO: result: yes" >&5
17475echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017476else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017478sed 's/^/| /' conftest.$ac_ext >&5
17479
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017480 { echo "$as_me:$LINENO: result: no" >&5
17481echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017482
17483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484
17485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017487
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017488{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17489echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017491/* confdefs.h. */
17492_ACEOF
17493cat confdefs.h >>conftest.$ac_ext
17494cat >>conftest.$ac_ext <<_ACEOF
17495/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017496
17497#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017498#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017499#include <sys/socket.h>
17500#include <netinet/in.h>
17501#include <arpa/inet.h>
17502
Martin v. Löwise9416172003-05-03 10:12:45 +000017503int
17504main ()
17505{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017506void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017507 ;
17508 return 0;
17509}
17510_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017511rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017512if { (ac_try="$ac_link"
17513case "(($ac_try" in
17514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17515 *) ac_try_echo=$ac_try;;
17516esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017520 grep -v '^ *+' conftest.er1 >conftest.err
17521 rm -f conftest.er1
17522 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524 (exit $ac_status); } && {
17525 test -z "$ac_c_werror_flag" ||
17526 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017527 } && test -s conftest$ac_exeext &&
17528 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017529
17530cat >>confdefs.h <<\_ACEOF
17531#define HAVE_INET_ATON 1
17532_ACEOF
17533
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017534 { echo "$as_me:$LINENO: result: yes" >&5
17535echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017536else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017538sed 's/^/| /' conftest.$ac_ext >&5
17539
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017540 { echo "$as_me:$LINENO: result: no" >&5
17541echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017542
17543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544
17545rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017546 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017547
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017548{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17549echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017551/* confdefs.h. */
17552_ACEOF
17553cat confdefs.h >>conftest.$ac_ext
17554cat >>conftest.$ac_ext <<_ACEOF
17555/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017556
17557#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017558#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017559#include <sys/socket.h>
17560#include <netinet/in.h>
17561#include <arpa/inet.h>
17562
Martin v. Löwise9416172003-05-03 10:12:45 +000017563int
17564main ()
17565{
17566void* p = inet_pton
17567 ;
17568 return 0;
17569}
17570_ACEOF
17571rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572if { (ac_try="$ac_compile"
17573case "(($ac_try" in
17574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17575 *) ac_try_echo=$ac_try;;
17576esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017578 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017580 grep -v '^ *+' conftest.er1 >conftest.err
17581 rm -f conftest.er1
17582 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584 (exit $ac_status); } && {
17585 test -z "$ac_c_werror_flag" ||
17586 test ! -s conftest.err
17587 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017588
17589cat >>confdefs.h <<\_ACEOF
17590#define HAVE_INET_PTON 1
17591_ACEOF
17592
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017593 { echo "$as_me:$LINENO: result: yes" >&5
17594echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017595else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017597sed 's/^/| /' conftest.$ac_ext >&5
17598
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017599 { echo "$as_me:$LINENO: result: no" >&5
17600echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017601
17602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017603
17604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017605
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017606# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017607{ echo "$as_me:$LINENO: checking for setgroups" >&5
17608echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017615
17616#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017617#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017618#ifdef HAVE_GRP_H
17619#include <grp.h>
17620#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017621
Martin v. Löwisd5843682002-11-21 20:41:28 +000017622int
17623main ()
17624{
17625void* p = setgroups
17626 ;
17627 return 0;
17628}
17629_ACEOF
17630rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631if { (ac_try="$ac_compile"
17632case "(($ac_try" in
17633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17634 *) ac_try_echo=$ac_try;;
17635esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017639 grep -v '^ *+' conftest.er1 >conftest.err
17640 rm -f conftest.er1
17641 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 (exit $ac_status); } && {
17644 test -z "$ac_c_werror_flag" ||
17645 test ! -s conftest.err
17646 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017647
17648cat >>confdefs.h <<\_ACEOF
17649#define HAVE_SETGROUPS 1
17650_ACEOF
17651
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017652 { echo "$as_me:$LINENO: result: yes" >&5
17653echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017654else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017656sed 's/^/| /' conftest.$ac_ext >&5
17657
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017658 { echo "$as_me:$LINENO: result: no" >&5
17659echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017660
17661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662
17663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017664
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017665# check for openpty and forkpty
17666
Martin v. Löwis11437992002-04-12 09:54:03 +000017667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017668for ac_func in openpty
17669do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17671{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017675else
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017682/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17683 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17684#define $ac_func innocuous_$ac_func
17685
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017686/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017687 which can conflict with char $ac_func (); below.
17688 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017689 <limits.h> exists even on freestanding compilers. */
17690
17691#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017692# include <limits.h>
17693#else
17694# include <assert.h>
17695#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017696
17697#undef $ac_func
17698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699/* Override any GCC internal prototype to avoid an error.
17700 Use char because int might match the return type of a GCC
17701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017702#ifdef __cplusplus
17703extern "C"
17704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017705char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017706/* The GNU C library defines this for functions which it implements
17707 to always fail with ENOSYS. Some functions are actually named
17708 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017710choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017711#endif
17712
Skip Montanaro6dead952003-09-25 14:50:04 +000017713int
17714main ()
17715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 ;
17718 return 0;
17719}
17720_ACEOF
17721rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722if { (ac_try="$ac_link"
17723case "(($ac_try" in
17724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17725 *) ac_try_echo=$ac_try;;
17726esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017730 grep -v '^ *+' conftest.er1 >conftest.err
17731 rm -f conftest.er1
17732 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734 (exit $ac_status); } && {
17735 test -z "$ac_c_werror_flag" ||
17736 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017737 } && test -s conftest$ac_exeext &&
17738 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017739 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017740else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017741 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017742sed 's/^/| /' conftest.$ac_ext >&5
17743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746
17747rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017748 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017749fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017750ac_res=`eval echo '${'$as_ac_var'}'`
17751 { echo "$as_me:$LINENO: result: $ac_res" >&5
17752echo "${ECHO_T}$ac_res" >&6; }
17753if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017755#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017756_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017758else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017759 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17760echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017761if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017762 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017763else
Martin v. Löwis11437992002-04-12 09:54:03 +000017764 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017765LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017767/* confdefs.h. */
17768_ACEOF
17769cat confdefs.h >>conftest.$ac_ext
17770cat >>conftest.$ac_ext <<_ACEOF
17771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017773/* Override any GCC internal prototype to avoid an error.
17774 Use char because int might match the return type of a GCC
17775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017776#ifdef __cplusplus
17777extern "C"
17778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017779char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017780int
17781main ()
17782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017783return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 ;
17785 return 0;
17786}
17787_ACEOF
17788rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789if { (ac_try="$ac_link"
17790case "(($ac_try" in
17791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17792 *) ac_try_echo=$ac_try;;
17793esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017797 grep -v '^ *+' conftest.er1 >conftest.err
17798 rm -f conftest.er1
17799 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801 (exit $ac_status); } && {
17802 test -z "$ac_c_werror_flag" ||
17803 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017804 } && test -s conftest$ac_exeext &&
17805 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017807else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017809sed 's/^/| /' conftest.$ac_ext >&5
17810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813
17814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017816LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017817fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017818{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17819echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
17820if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017821 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017822#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017823_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017824 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017825else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017826 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17827echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017828if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017829 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017830else
17831 ac_check_lib_save_LIBS=$LIBS
17832LIBS="-lbsd $LIBS"
17833cat >conftest.$ac_ext <<_ACEOF
17834/* confdefs.h. */
17835_ACEOF
17836cat confdefs.h >>conftest.$ac_ext
17837cat >>conftest.$ac_ext <<_ACEOF
17838/* end confdefs.h. */
17839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017840/* Override any GCC internal prototype to avoid an error.
17841 Use char because int might match the return type of a GCC
17842 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017843#ifdef __cplusplus
17844extern "C"
17845#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017846char openpty ();
17847int
17848main ()
17849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017851 ;
17852 return 0;
17853}
17854_ACEOF
17855rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856if { (ac_try="$ac_link"
17857case "(($ac_try" in
17858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17859 *) ac_try_echo=$ac_try;;
17860esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017863 ac_status=$?
17864 grep -v '^ *+' conftest.er1 >conftest.err
17865 rm -f conftest.er1
17866 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868 (exit $ac_status); } && {
17869 test -z "$ac_c_werror_flag" ||
17870 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017871 } && test -s conftest$ac_exeext &&
17872 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017873 ac_cv_lib_bsd_openpty=yes
17874else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017875 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017876sed 's/^/| /' conftest.$ac_ext >&5
17877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880
17881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017882 conftest$ac_exeext conftest.$ac_ext
17883LIBS=$ac_check_lib_save_LIBS
17884fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017885{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17886echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
17887if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017888 cat >>confdefs.h <<\_ACEOF
17889#define HAVE_OPENPTY 1
17890_ACEOF
17891 LIBS="$LIBS -lbsd"
17892fi
17893
17894
17895fi
17896
Fred Drake8cef4cf2000-06-28 16:40:38 +000017897
17898fi
17899done
17900
Martin v. Löwis11437992002-04-12 09:54:03 +000017901
Fred Drake8cef4cf2000-06-28 16:40:38 +000017902for ac_func in forkpty
17903do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017904as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17905{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17906echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017908 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017909else
Martin v. Löwis11437992002-04-12 09:54:03 +000017910 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017911/* confdefs.h. */
17912_ACEOF
17913cat confdefs.h >>conftest.$ac_ext
17914cat >>conftest.$ac_ext <<_ACEOF
17915/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017916/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17917 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17918#define $ac_func innocuous_$ac_func
17919
Fred Drake8cef4cf2000-06-28 16:40:38 +000017920/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017921 which can conflict with char $ac_func (); below.
17922 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017923 <limits.h> exists even on freestanding compilers. */
17924
17925#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017926# include <limits.h>
17927#else
17928# include <assert.h>
17929#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017930
17931#undef $ac_func
17932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933/* Override any GCC internal prototype to avoid an error.
17934 Use char because int might match the return type of a GCC
17935 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017936#ifdef __cplusplus
17937extern "C"
17938#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017939char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017940/* The GNU C library defines this for functions which it implements
17941 to always fail with ENOSYS. Some functions are actually named
17942 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017944choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017945#endif
17946
Skip Montanaro6dead952003-09-25 14:50:04 +000017947int
17948main ()
17949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017950return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017951 ;
17952 return 0;
17953}
17954_ACEOF
17955rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017956if { (ac_try="$ac_link"
17957case "(($ac_try" in
17958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17959 *) ac_try_echo=$ac_try;;
17960esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017964 grep -v '^ *+' conftest.er1 >conftest.err
17965 rm -f conftest.er1
17966 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968 (exit $ac_status); } && {
17969 test -z "$ac_c_werror_flag" ||
17970 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017971 } && test -s conftest$ac_exeext &&
17972 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017973 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017974else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017976sed 's/^/| /' conftest.$ac_ext >&5
17977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980
17981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017982 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017983fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017984ac_res=`eval echo '${'$as_ac_var'}'`
17985 { echo "$as_me:$LINENO: result: $ac_res" >&5
17986echo "${ECHO_T}$ac_res" >&6; }
17987if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017988 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017989#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017990_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017991
Fred Drake8cef4cf2000-06-28 16:40:38 +000017992else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017993 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17994echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017995if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017996 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017997else
Martin v. Löwis11437992002-04-12 09:54:03 +000017998 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017999LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000018006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018007/* Override any GCC internal prototype to avoid an error.
18008 Use char because int might match the return type of a GCC
18009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018010#ifdef __cplusplus
18011extern "C"
18012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018013char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018014int
18015main ()
18016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 ;
18019 return 0;
18020}
18021_ACEOF
18022rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023if { (ac_try="$ac_link"
18024case "(($ac_try" in
18025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18026 *) ac_try_echo=$ac_try;;
18027esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018031 grep -v '^ *+' conftest.er1 >conftest.err
18032 rm -f conftest.er1
18033 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 (exit $ac_status); } && {
18036 test -z "$ac_c_werror_flag" ||
18037 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018038 } && test -s conftest$ac_exeext &&
18039 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018040 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018041else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018042 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018043sed 's/^/| /' conftest.$ac_ext >&5
18044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047
18048rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018050LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018051fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018052{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18053echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
18054if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018055 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018056#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018057_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018058 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018059else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018060 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18061echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018062if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018064else
18065 ac_check_lib_save_LIBS=$LIBS
18066LIBS="-lbsd $LIBS"
18067cat >conftest.$ac_ext <<_ACEOF
18068/* confdefs.h. */
18069_ACEOF
18070cat confdefs.h >>conftest.$ac_ext
18071cat >>conftest.$ac_ext <<_ACEOF
18072/* end confdefs.h. */
18073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074/* Override any GCC internal prototype to avoid an error.
18075 Use char because int might match the return type of a GCC
18076 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018077#ifdef __cplusplus
18078extern "C"
18079#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018080char forkpty ();
18081int
18082main ()
18083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018085 ;
18086 return 0;
18087}
18088_ACEOF
18089rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018090if { (ac_try="$ac_link"
18091case "(($ac_try" in
18092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18093 *) ac_try_echo=$ac_try;;
18094esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018097 ac_status=$?
18098 grep -v '^ *+' conftest.er1 >conftest.err
18099 rm -f conftest.er1
18100 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102 (exit $ac_status); } && {
18103 test -z "$ac_c_werror_flag" ||
18104 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018105 } && test -s conftest$ac_exeext &&
18106 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018107 ac_cv_lib_bsd_forkpty=yes
18108else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018109 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018110sed 's/^/| /' conftest.$ac_ext >&5
18111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114
18115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018116 conftest$ac_exeext conftest.$ac_ext
18117LIBS=$ac_check_lib_save_LIBS
18118fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018119{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18120echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
18121if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018122 cat >>confdefs.h <<\_ACEOF
18123#define HAVE_FORKPTY 1
18124_ACEOF
18125 LIBS="$LIBS -lbsd"
18126fi
18127
18128
18129fi
18130
Fred Drake8cef4cf2000-06-28 16:40:38 +000018131
18132fi
18133done
18134
Jack Jansendd19cf82001-12-06 22:36:17 +000018135
Christian Heimesb186d002008-03-18 15:15:01 +000018136# Stuff for expat.
18137
18138for ac_func in memmove
18139do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018140as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18141{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18142echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018143if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018144 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018145else
18146 cat >conftest.$ac_ext <<_ACEOF
18147/* confdefs.h. */
18148_ACEOF
18149cat confdefs.h >>conftest.$ac_ext
18150cat >>conftest.$ac_ext <<_ACEOF
18151/* end confdefs.h. */
18152/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18153 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18154#define $ac_func innocuous_$ac_func
18155
18156/* System header to define __stub macros and hopefully few prototypes,
18157 which can conflict with char $ac_func (); below.
18158 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18159 <limits.h> exists even on freestanding compilers. */
18160
18161#ifdef __STDC__
18162# include <limits.h>
18163#else
18164# include <assert.h>
18165#endif
18166
18167#undef $ac_func
18168
18169/* Override any GCC internal prototype to avoid an error.
18170 Use char because int might match the return type of a GCC
18171 builtin and then its argument prototype would still apply. */
18172#ifdef __cplusplus
18173extern "C"
18174#endif
18175char $ac_func ();
18176/* The GNU C library defines this for functions which it implements
18177 to always fail with ENOSYS. Some functions are actually named
18178 something starting with __ and the normal name is an alias. */
18179#if defined __stub_$ac_func || defined __stub___$ac_func
18180choke me
18181#endif
18182
18183int
18184main ()
18185{
18186return $ac_func ();
18187 ;
18188 return 0;
18189}
18190_ACEOF
18191rm -f conftest.$ac_objext conftest$ac_exeext
18192if { (ac_try="$ac_link"
18193case "(($ac_try" in
18194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18195 *) ac_try_echo=$ac_try;;
18196esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018198 (eval "$ac_link") 2>conftest.er1
18199 ac_status=$?
18200 grep -v '^ *+' conftest.er1 >conftest.err
18201 rm -f conftest.er1
18202 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018204 (exit $ac_status); } && {
18205 test -z "$ac_c_werror_flag" ||
18206 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018207 } && test -s conftest$ac_exeext &&
18208 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000018209 eval "$as_ac_var=yes"
18210else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018211 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018212sed 's/^/| /' conftest.$ac_ext >&5
18213
18214 eval "$as_ac_var=no"
18215fi
18216
18217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18218 conftest$ac_exeext conftest.$ac_ext
18219fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018220ac_res=`eval echo '${'$as_ac_var'}'`
18221 { echo "$as_me:$LINENO: result: $ac_res" >&5
18222echo "${ECHO_T}$ac_res" >&6; }
18223if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018224 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018225#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018226_ACEOF
18227
18228fi
18229done
18230
18231
Michael W. Hudson54241132001-12-07 15:38:26 +000018232# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018233
18234
18235
18236
18237
18238
Fred Drake8cef4cf2000-06-28 16:40:38 +000018239for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18240do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018241as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18242{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18243echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018246else
Martin v. Löwis11437992002-04-12 09:54:03 +000018247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018253/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18254 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18255#define $ac_func innocuous_$ac_func
18256
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018257/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018258 which can conflict with char $ac_func (); below.
18259 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018260 <limits.h> exists even on freestanding compilers. */
18261
18262#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018263# include <limits.h>
18264#else
18265# include <assert.h>
18266#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018267
18268#undef $ac_func
18269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018270/* Override any GCC internal prototype to avoid an error.
18271 Use char because int might match the return type of a GCC
18272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018273#ifdef __cplusplus
18274extern "C"
18275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018276char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018277/* The GNU C library defines this for functions which it implements
18278 to always fail with ENOSYS. Some functions are actually named
18279 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018281choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018282#endif
18283
Skip Montanaro6dead952003-09-25 14:50:04 +000018284int
18285main ()
18286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018287return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018288 ;
18289 return 0;
18290}
18291_ACEOF
18292rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293if { (ac_try="$ac_link"
18294case "(($ac_try" in
18295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18296 *) ac_try_echo=$ac_try;;
18297esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018301 grep -v '^ *+' conftest.er1 >conftest.err
18302 rm -f conftest.er1
18303 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018305 (exit $ac_status); } && {
18306 test -z "$ac_c_werror_flag" ||
18307 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018308 } && test -s conftest$ac_exeext &&
18309 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018311else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018313sed 's/^/| /' conftest.$ac_ext >&5
18314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018315 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317
18318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018319 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018320fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018321ac_res=`eval echo '${'$as_ac_var'}'`
18322 { echo "$as_me:$LINENO: result: $ac_res" >&5
18323echo "${ECHO_T}$ac_res" >&6; }
18324if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018325 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018326#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018327_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018329fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018330done
18331
Michael W. Hudson54241132001-12-07 15:38:26 +000018332
Martin v. Löwis11437992002-04-12 09:54:03 +000018333
18334
18335
Christian Heimesb186d002008-03-18 15:15:01 +000018336for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018337do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18339{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018342 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018343else
Martin v. Löwis11437992002-04-12 09:54:03 +000018344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018345/* confdefs.h. */
18346_ACEOF
18347cat confdefs.h >>conftest.$ac_ext
18348cat >>conftest.$ac_ext <<_ACEOF
18349/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018350/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18351 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18352#define $ac_func innocuous_$ac_func
18353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018354/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018355 which can conflict with char $ac_func (); below.
18356 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018357 <limits.h> exists even on freestanding compilers. */
18358
18359#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018360# include <limits.h>
18361#else
18362# include <assert.h>
18363#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018364
18365#undef $ac_func
18366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367/* Override any GCC internal prototype to avoid an error.
18368 Use char because int might match the return type of a GCC
18369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018370#ifdef __cplusplus
18371extern "C"
18372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018373char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018374/* The GNU C library defines this for functions which it implements
18375 to always fail with ENOSYS. Some functions are actually named
18376 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018378choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018379#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018380
Skip Montanaro6dead952003-09-25 14:50:04 +000018381int
18382main ()
18383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 ;
18386 return 0;
18387}
18388_ACEOF
18389rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390if { (ac_try="$ac_link"
18391case "(($ac_try" in
18392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18393 *) ac_try_echo=$ac_try;;
18394esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018398 grep -v '^ *+' conftest.er1 >conftest.err
18399 rm -f conftest.er1
18400 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 (exit $ac_status); } && {
18403 test -z "$ac_c_werror_flag" ||
18404 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018405 } && test -s conftest$ac_exeext &&
18406 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018408else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018410sed 's/^/| /' conftest.$ac_ext >&5
18411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018414
18415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018417fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018418ac_res=`eval echo '${'$as_ac_var'}'`
18419 { echo "$as_me:$LINENO: result: $ac_res" >&5
18420echo "${ECHO_T}$ac_res" >&6; }
18421if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018423#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018424_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018425
Martin v. Löwis1142de32002-03-29 16:28:31 +000018426else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018428 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018429 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18430 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018431esac
18432
Martin v. Löwis1142de32002-03-29 16:28:31 +000018433fi
18434done
18435
18436
Martin v. Löwis11437992002-04-12 09:54:03 +000018437
Martin v. Löwis1142de32002-03-29 16:28:31 +000018438for ac_func in getpgrp
18439do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018440as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18441{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18442echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018444 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018445else
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018447/* confdefs.h. */
18448_ACEOF
18449cat confdefs.h >>conftest.$ac_ext
18450cat >>conftest.$ac_ext <<_ACEOF
18451/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018452/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18453 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18454#define $ac_func innocuous_$ac_func
18455
Martin v. Löwis1142de32002-03-29 16:28:31 +000018456/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018457 which can conflict with char $ac_func (); below.
18458 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018459 <limits.h> exists even on freestanding compilers. */
18460
18461#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018462# include <limits.h>
18463#else
18464# include <assert.h>
18465#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018466
18467#undef $ac_func
18468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469/* Override any GCC internal prototype to avoid an error.
18470 Use char because int might match the return type of a GCC
18471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018472#ifdef __cplusplus
18473extern "C"
18474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018475char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018476/* The GNU C library defines this for functions which it implements
18477 to always fail with ENOSYS. Some functions are actually named
18478 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018480choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018481#endif
18482
Skip Montanaro6dead952003-09-25 14:50:04 +000018483int
18484main ()
18485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018486return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018487 ;
18488 return 0;
18489}
18490_ACEOF
18491rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492if { (ac_try="$ac_link"
18493case "(($ac_try" in
18494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18495 *) ac_try_echo=$ac_try;;
18496esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018500 grep -v '^ *+' conftest.er1 >conftest.err
18501 rm -f conftest.er1
18502 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504 (exit $ac_status); } && {
18505 test -z "$ac_c_werror_flag" ||
18506 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018507 } && test -s conftest$ac_exeext &&
18508 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018509 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018510else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018512sed 's/^/| /' conftest.$ac_ext >&5
18513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018516
18517rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018518 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018519fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018520ac_res=`eval echo '${'$as_ac_var'}'`
18521 { echo "$as_me:$LINENO: result: $ac_res" >&5
18522echo "${ECHO_T}$ac_res" >&6; }
18523if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018525#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018526_ACEOF
18527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018528/* confdefs.h. */
18529_ACEOF
18530cat confdefs.h >>conftest.$ac_ext
18531cat >>conftest.$ac_ext <<_ACEOF
18532/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018533#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018534int
18535main ()
18536{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018537getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018538 ;
18539 return 0;
18540}
18541_ACEOF
18542rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543if { (ac_try="$ac_compile"
18544case "(($ac_try" in
18545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18546 *) ac_try_echo=$ac_try;;
18547esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018551 grep -v '^ *+' conftest.er1 >conftest.err
18552 rm -f conftest.er1
18553 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555 (exit $ac_status); } && {
18556 test -z "$ac_c_werror_flag" ||
18557 test ! -s conftest.err
18558 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018559
18560cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018561#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018562_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018563
Martin v. Löwis11437992002-04-12 09:54:03 +000018564
Guido van Rossumf78abae1997-01-21 22:02:36 +000018565else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018567sed 's/^/| /' conftest.$ac_ext >&5
18568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018569
Guido van Rossum627b2d71993-12-24 10:39:16 +000018570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018571
18572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018573
Guido van Rossum627b2d71993-12-24 10:39:16 +000018574fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018575done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018576
Jack Jansen150753c2003-03-29 22:07:47 +000018577
18578for ac_func in setpgrp
18579do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018580as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18581{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18582echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018584 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018585else
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018587/* confdefs.h. */
18588_ACEOF
18589cat confdefs.h >>conftest.$ac_ext
18590cat >>conftest.$ac_ext <<_ACEOF
18591/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018592/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18593 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18594#define $ac_func innocuous_$ac_func
18595
Jack Jansen150753c2003-03-29 22:07:47 +000018596/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018597 which can conflict with char $ac_func (); below.
18598 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018599 <limits.h> exists even on freestanding compilers. */
18600
18601#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018602# include <limits.h>
18603#else
18604# include <assert.h>
18605#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018606
18607#undef $ac_func
18608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018609/* Override any GCC internal prototype to avoid an error.
18610 Use char because int might match the return type of a GCC
18611 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018612#ifdef __cplusplus
18613extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018614#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018615char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018616/* The GNU C library defines this for functions which it implements
18617 to always fail with ENOSYS. Some functions are actually named
18618 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018619#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018620choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018621#endif
18622
Skip Montanaro6dead952003-09-25 14:50:04 +000018623int
18624main ()
18625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 ;
18628 return 0;
18629}
18630_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018631rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018632if { (ac_try="$ac_link"
18633case "(($ac_try" in
18634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18635 *) ac_try_echo=$ac_try;;
18636esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018638 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018640 grep -v '^ *+' conftest.er1 >conftest.err
18641 rm -f conftest.er1
18642 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644 (exit $ac_status); } && {
18645 test -z "$ac_c_werror_flag" ||
18646 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018647 } && test -s conftest$ac_exeext &&
18648 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018649 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018650else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018652sed 's/^/| /' conftest.$ac_ext >&5
18653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018654 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018656
18657rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018658 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018659fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018660ac_res=`eval echo '${'$as_ac_var'}'`
18661 { echo "$as_me:$LINENO: result: $ac_res" >&5
18662echo "${ECHO_T}$ac_res" >&6; }
18663if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018664 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018665#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018666_ACEOF
18667 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018668/* confdefs.h. */
18669_ACEOF
18670cat confdefs.h >>conftest.$ac_ext
18671cat >>conftest.$ac_ext <<_ACEOF
18672/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018673#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018674int
18675main ()
18676{
18677setpgrp(0,0);
18678 ;
18679 return 0;
18680}
18681_ACEOF
18682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018683if { (ac_try="$ac_compile"
18684case "(($ac_try" in
18685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18686 *) ac_try_echo=$ac_try;;
18687esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018689 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018691 grep -v '^ *+' conftest.er1 >conftest.err
18692 rm -f conftest.er1
18693 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018695 (exit $ac_status); } && {
18696 test -z "$ac_c_werror_flag" ||
18697 test ! -s conftest.err
18698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018699
18700cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018701#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018702_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018703
Jack Jansen150753c2003-03-29 22:07:47 +000018704
18705else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018707sed 's/^/| /' conftest.$ac_ext >&5
18708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018711
18712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018713
18714fi
18715done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018716
Martin v. Löwis11437992002-04-12 09:54:03 +000018717
Thomas Wouters3a584202000-08-05 23:28:51 +000018718for ac_func in gettimeofday
18719do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018720as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18721{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18722echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018723if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018725else
Martin v. Löwis11437992002-04-12 09:54:03 +000018726 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018727/* confdefs.h. */
18728_ACEOF
18729cat confdefs.h >>conftest.$ac_ext
18730cat >>conftest.$ac_ext <<_ACEOF
18731/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018732/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18733 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18734#define $ac_func innocuous_$ac_func
18735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018736/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018737 which can conflict with char $ac_func (); below.
18738 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018739 <limits.h> exists even on freestanding compilers. */
18740
18741#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018742# include <limits.h>
18743#else
18744# include <assert.h>
18745#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018746
18747#undef $ac_func
18748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018749/* Override any GCC internal prototype to avoid an error.
18750 Use char because int might match the return type of a GCC
18751 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018752#ifdef __cplusplus
18753extern "C"
18754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018755char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018756/* The GNU C library defines this for functions which it implements
18757 to always fail with ENOSYS. Some functions are actually named
18758 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018760choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018761#endif
18762
Skip Montanaro6dead952003-09-25 14:50:04 +000018763int
18764main ()
18765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018767 ;
18768 return 0;
18769}
18770_ACEOF
18771rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018772if { (ac_try="$ac_link"
18773case "(($ac_try" in
18774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18775 *) ac_try_echo=$ac_try;;
18776esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018780 grep -v '^ *+' conftest.er1 >conftest.err
18781 rm -f conftest.er1
18782 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018784 (exit $ac_status); } && {
18785 test -z "$ac_c_werror_flag" ||
18786 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018787 } && test -s conftest$ac_exeext &&
18788 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018789 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018790else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018792sed 's/^/| /' conftest.$ac_ext >&5
18793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018794 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018796
18797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018798 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018799fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018800ac_res=`eval echo '${'$as_ac_var'}'`
18801 { echo "$as_me:$LINENO: result: $ac_res" >&5
18802echo "${ECHO_T}$ac_res" >&6; }
18803if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018805#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018806_ACEOF
18807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018808/* confdefs.h. */
18809_ACEOF
18810cat confdefs.h >>conftest.$ac_ext
18811cat >>conftest.$ac_ext <<_ACEOF
18812/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018813#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018814int
18815main ()
18816{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018817gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 ;
18819 return 0;
18820}
18821_ACEOF
18822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823if { (ac_try="$ac_compile"
18824case "(($ac_try" in
18825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18826 *) ac_try_echo=$ac_try;;
18827esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018829 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018831 grep -v '^ *+' conftest.er1 >conftest.err
18832 rm -f conftest.er1
18833 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018835 (exit $ac_status); } && {
18836 test -z "$ac_c_werror_flag" ||
18837 test ! -s conftest.err
18838 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018839 :
18840else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Martin v. Löwis11437992002-04-12 09:54:03 +000018844
18845cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018846#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018847_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018848
Martin v. Löwis11437992002-04-12 09:54:03 +000018849
Guido van Rossum627b2d71993-12-24 10:39:16 +000018850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018851
18852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018854fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018855done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018856
Michael W. Hudson54241132001-12-07 15:38:26 +000018857
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018858{ echo "$as_me:$LINENO: checking for major" >&5
18859echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018861/* confdefs.h. */
18862_ACEOF
18863cat confdefs.h >>conftest.$ac_ext
18864cat >>conftest.$ac_ext <<_ACEOF
18865/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018866
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018867#if defined(MAJOR_IN_MKDEV)
18868#include <sys/mkdev.h>
18869#elif defined(MAJOR_IN_SYSMACROS)
18870#include <sys/sysmacros.h>
18871#else
18872#include <sys/types.h>
18873#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018874
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018875int
18876main ()
18877{
18878
18879 makedev(major(0),minor(0));
18880
18881 ;
18882 return 0;
18883}
18884_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018885rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018886if { (ac_try="$ac_link"
18887case "(($ac_try" in
18888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18889 *) ac_try_echo=$ac_try;;
18890esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018892 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018894 grep -v '^ *+' conftest.er1 >conftest.err
18895 rm -f conftest.er1
18896 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898 (exit $ac_status); } && {
18899 test -z "$ac_c_werror_flag" ||
18900 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018901 } && test -s conftest$ac_exeext &&
18902 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018903
18904
18905cat >>confdefs.h <<\_ACEOF
18906#define HAVE_DEVICE_MACROS 1
18907_ACEOF
18908
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018909 { echo "$as_me:$LINENO: result: yes" >&5
18910echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018911
18912else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018913 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018914sed 's/^/| /' conftest.$ac_ext >&5
18915
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018916
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018917 { echo "$as_me:$LINENO: result: no" >&5
18918echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018919
18920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018921
18922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018923 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018924
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018925# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018926# for [no]getaddrinfo in netdb.h.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018927{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18928echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018930/* confdefs.h. */
18931_ACEOF
18932cat confdefs.h >>conftest.$ac_ext
18933cat >>conftest.$ac_ext <<_ACEOF
18934/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018935
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018936#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018937#include <sys/socket.h>
18938#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018939#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018940
Martin v. Löwis11437992002-04-12 09:54:03 +000018941int
18942main ()
18943{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018944
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018945getaddrinfo(NULL, NULL, NULL, NULL);
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018946
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 ;
18948 return 0;
18949}
18950_ACEOF
18951rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952if { (ac_try="$ac_link"
18953case "(($ac_try" in
18954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18955 *) ac_try_echo=$ac_try;;
18956esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018958 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018960 grep -v '^ *+' conftest.er1 >conftest.err
18961 rm -f conftest.er1
18962 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964 (exit $ac_status); } && {
18965 test -z "$ac_c_werror_flag" ||
18966 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018967 } && test -s conftest$ac_exeext &&
18968 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018969
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018970{ echo "$as_me:$LINENO: result: yes" >&5
18971echo "${ECHO_T}yes" >&6; }
18972{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18973echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
18974if test "$cross_compiling" = yes; then
18975 { echo "$as_me:$LINENO: result: buggy" >&5
18976echo "${ECHO_T}buggy" >&6; }
18977buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018978else
Martin v. Löwis11437992002-04-12 09:54:03 +000018979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018980/* confdefs.h. */
18981_ACEOF
18982cat confdefs.h >>conftest.$ac_ext
18983cat >>conftest.$ac_ext <<_ACEOF
18984/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018985
18986#include <sys/types.h>
18987#include <netdb.h>
18988#include <string.h>
18989#include <sys/socket.h>
18990#include <netinet/in.h>
18991
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018992main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018993{
18994 int passive, gaierr, inet4 = 0, inet6 = 0;
18995 struct addrinfo hints, *ai, *aitop;
18996 char straddr[INET6_ADDRSTRLEN], strport[16];
18997
18998 for (passive = 0; passive <= 1; passive++) {
18999 memset(&hints, 0, sizeof(hints));
19000 hints.ai_family = AF_UNSPEC;
19001 hints.ai_flags = passive ? AI_PASSIVE : 0;
19002 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019003 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019004 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19005 (void)gai_strerror(gaierr);
19006 goto bad;
19007 }
19008 for (ai = aitop; ai; ai = ai->ai_next) {
19009 if (ai->ai_addr == NULL ||
19010 ai->ai_addrlen == 0 ||
19011 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19012 straddr, sizeof(straddr), strport, sizeof(strport),
19013 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19014 goto bad;
19015 }
19016 switch (ai->ai_family) {
19017 case AF_INET:
19018 if (strcmp(strport, "54321") != 0) {
19019 goto bad;
19020 }
19021 if (passive) {
19022 if (strcmp(straddr, "0.0.0.0") != 0) {
19023 goto bad;
19024 }
19025 } else {
19026 if (strcmp(straddr, "127.0.0.1") != 0) {
19027 goto bad;
19028 }
19029 }
19030 inet4++;
19031 break;
19032 case AF_INET6:
19033 if (strcmp(strport, "54321") != 0) {
19034 goto bad;
19035 }
19036 if (passive) {
19037 if (strcmp(straddr, "::") != 0) {
19038 goto bad;
19039 }
19040 } else {
19041 if (strcmp(straddr, "::1") != 0) {
19042 goto bad;
19043 }
19044 }
19045 inet6++;
19046 break;
19047 case AF_UNSPEC:
19048 goto bad;
19049 break;
19050 default:
19051 /* another family support? */
19052 break;
19053 }
19054 }
19055 }
19056
19057 if (!(inet4 == 0 || inet4 == 2))
19058 goto bad;
19059 if (!(inet6 == 0 || inet6 == 2))
19060 goto bad;
19061
19062 if (aitop)
19063 freeaddrinfo(aitop);
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019064 exit(0);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019065
19066 bad:
19067 if (aitop)
19068 freeaddrinfo(aitop);
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019069 exit(1);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019070}
19071
Martin v. Löwis11437992002-04-12 09:54:03 +000019072_ACEOF
19073rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019074if { (ac_try="$ac_link"
19075case "(($ac_try" in
19076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19077 *) ac_try_echo=$ac_try;;
19078esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019083 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019084 { (case "(($ac_try" in
19085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19086 *) ac_try_echo=$ac_try;;
19087esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019089 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019090 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019093 { echo "$as_me:$LINENO: result: good" >&5
19094echo "${ECHO_T}good" >&6; }
19095buggygetaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019096else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019097 echo "$as_me: program exited with status $ac_status" >&5
19098echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019099sed 's/^/| /' conftest.$ac_ext >&5
19100
Martin v. Löwis11437992002-04-12 09:54:03 +000019101( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019102{ echo "$as_me:$LINENO: result: buggy" >&5
19103echo "${ECHO_T}buggy" >&6; }
19104buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019106rm -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 +000019107fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108
19109
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019110else
19111 echo "$as_me: failed program was:" >&5
19112sed 's/^/| /' conftest.$ac_ext >&5
19113
19114
19115{ echo "$as_me:$LINENO: result: no" >&5
19116echo "${ECHO_T}no" >&6; }
19117buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019118
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019120
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19122 conftest$ac_exeext conftest.$ac_ext
19123
19124if test "$buggygetaddrinfo" = "yes"; then
19125 if test "$ipv6" = "yes"; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019126 echo 'Fatal: You must get working getaddrinfo() function.'
19127 echo ' or you can specify "--disable-ipv6"'.
19128 exit 1
19129 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019130else
Martin v. Löwis11437992002-04-12 09:54:03 +000019131
19132cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019133#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019134_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019135
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019136fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019137
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019138for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019139do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019140as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19141{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19142echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019143if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019144 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019145else
Martin v. Löwis11437992002-04-12 09:54:03 +000019146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019147/* confdefs.h. */
19148_ACEOF
19149cat confdefs.h >>conftest.$ac_ext
19150cat >>conftest.$ac_ext <<_ACEOF
19151/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019152/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19153 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19154#define $ac_func innocuous_$ac_func
19155
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019156/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019157 which can conflict with char $ac_func (); below.
19158 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019159 <limits.h> exists even on freestanding compilers. */
19160
19161#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019162# include <limits.h>
19163#else
19164# include <assert.h>
19165#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019166
19167#undef $ac_func
19168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019169/* Override any GCC internal prototype to avoid an error.
19170 Use char because int might match the return type of a GCC
19171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019172#ifdef __cplusplus
19173extern "C"
19174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019175char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019176/* The GNU C library defines this for functions which it implements
19177 to always fail with ENOSYS. Some functions are actually named
19178 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019179#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019180choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019181#endif
19182
Skip Montanaro6dead952003-09-25 14:50:04 +000019183int
19184main ()
19185{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019186return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019187 ;
19188 return 0;
19189}
19190_ACEOF
19191rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019192if { (ac_try="$ac_link"
19193case "(($ac_try" in
19194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19195 *) ac_try_echo=$ac_try;;
19196esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019198 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019200 grep -v '^ *+' conftest.er1 >conftest.err
19201 rm -f conftest.er1
19202 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019204 (exit $ac_status); } && {
19205 test -z "$ac_c_werror_flag" ||
19206 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019207 } && test -s conftest$ac_exeext &&
19208 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019209 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019210else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019212sed 's/^/| /' conftest.$ac_ext >&5
19213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019214 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216
19217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019218 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019219fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019220ac_res=`eval echo '${'$as_ac_var'}'`
19221 { echo "$as_me:$LINENO: result: $ac_res" >&5
19222echo "${ECHO_T}$ac_res" >&6; }
19223if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019224 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019225#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019226_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019227
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019228fi
19229done
19230
Michael W. Hudson54241132001-12-07 15:38:26 +000019231
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019232# checks for structures
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019233{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19234echo $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 +000019235if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019236 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019237else
Martin v. Löwis11437992002-04-12 09:54:03 +000019238 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019239/* confdefs.h. */
19240_ACEOF
19241cat confdefs.h >>conftest.$ac_ext
19242cat >>conftest.$ac_ext <<_ACEOF
19243/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019244#include <sys/types.h>
19245#include <sys/time.h>
19246#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019247
Martin v. Löwis11437992002-04-12 09:54:03 +000019248int
19249main ()
19250{
19251if ((struct tm *) 0)
19252return 0;
19253 ;
19254 return 0;
19255}
19256_ACEOF
19257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019258if { (ac_try="$ac_compile"
19259case "(($ac_try" in
19260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19261 *) ac_try_echo=$ac_try;;
19262esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019264 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019265 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019266 grep -v '^ *+' conftest.er1 >conftest.err
19267 rm -f conftest.er1
19268 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019270 (exit $ac_status); } && {
19271 test -z "$ac_c_werror_flag" ||
19272 test ! -s conftest.err
19273 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019274 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019275else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019277sed 's/^/| /' conftest.$ac_ext >&5
19278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019279 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019281
19282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019283fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019284{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19285echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019286if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019287
19288cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019289#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019290_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019291
19292fi
19293
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019294{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19295echo $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 +000019296if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019298else
Martin v. Löwis11437992002-04-12 09:54:03 +000019299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019300/* confdefs.h. */
19301_ACEOF
19302cat confdefs.h >>conftest.$ac_ext
19303cat >>conftest.$ac_ext <<_ACEOF
19304/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019305#include <sys/types.h>
19306#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019307
Martin v. Löwis11437992002-04-12 09:54:03 +000019308int
19309main ()
19310{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019311struct tm tm;
19312 int *p = &tm.tm_sec;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019313 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019314 ;
19315 return 0;
19316}
19317_ACEOF
19318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319if { (ac_try="$ac_compile"
19320case "(($ac_try" in
19321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19322 *) ac_try_echo=$ac_try;;
19323esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019327 grep -v '^ *+' conftest.er1 >conftest.err
19328 rm -f conftest.er1
19329 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331 (exit $ac_status); } && {
19332 test -z "$ac_c_werror_flag" ||
19333 test ! -s conftest.err
19334 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019335 ac_cv_struct_tm=time.h
19336else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019338sed 's/^/| /' conftest.$ac_ext >&5
19339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019340 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342
19343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019344fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019345{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19346echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019347if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019348
19349cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019350#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019352
19353fi
19354
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019355{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19356echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019357if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019359else
Martin v. Löwis11437992002-04-12 09:54:03 +000019360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019361/* confdefs.h. */
19362_ACEOF
19363cat confdefs.h >>conftest.$ac_ext
19364cat >>conftest.$ac_ext <<_ACEOF
19365/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019366#include <sys/types.h>
19367#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019368
19369
Martin v. Löwis11437992002-04-12 09:54:03 +000019370int
19371main ()
19372{
19373static struct tm ac_aggr;
19374if (ac_aggr.tm_zone)
19375return 0;
19376 ;
19377 return 0;
19378}
19379_ACEOF
19380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381if { (ac_try="$ac_compile"
19382case "(($ac_try" in
19383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19384 *) ac_try_echo=$ac_try;;
19385esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019389 grep -v '^ *+' conftest.er1 >conftest.err
19390 rm -f conftest.er1
19391 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019393 (exit $ac_status); } && {
19394 test -z "$ac_c_werror_flag" ||
19395 test ! -s conftest.err
19396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019397 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019398else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019400sed 's/^/| /' conftest.$ac_ext >&5
19401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019403/* confdefs.h. */
19404_ACEOF
19405cat confdefs.h >>conftest.$ac_ext
19406cat >>conftest.$ac_ext <<_ACEOF
19407/* end confdefs.h. */
19408#include <sys/types.h>
19409#include <$ac_cv_struct_tm>
19410
19411
19412int
19413main ()
19414{
19415static struct tm ac_aggr;
19416if (sizeof ac_aggr.tm_zone)
19417return 0;
19418 ;
19419 return 0;
19420}
19421_ACEOF
19422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019423if { (ac_try="$ac_compile"
19424case "(($ac_try" in
19425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19426 *) ac_try_echo=$ac_try;;
19427esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019429 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019431 grep -v '^ *+' conftest.er1 >conftest.err
19432 rm -f conftest.er1
19433 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019435 (exit $ac_status); } && {
19436 test -z "$ac_c_werror_flag" ||
19437 test ! -s conftest.err
19438 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019439 ac_cv_member_struct_tm_tm_zone=yes
19440else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019441 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019442sed 's/^/| /' conftest.$ac_ext >&5
19443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019444 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019446
19447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019449
19450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019451fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019452{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19453echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
19454if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019455
19456cat >>confdefs.h <<_ACEOF
19457#define HAVE_STRUCT_TM_TM_ZONE 1
19458_ACEOF
19459
19460
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019461fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019462
Martin v. Löwis11437992002-04-12 09:54:03 +000019463if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19464
19465cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019466#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019467_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019468
19469else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019470 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19471echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019472if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019473 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019474else
19475 cat >conftest.$ac_ext <<_ACEOF
19476/* confdefs.h. */
19477_ACEOF
19478cat confdefs.h >>conftest.$ac_ext
19479cat >>conftest.$ac_ext <<_ACEOF
19480/* end confdefs.h. */
19481#include <time.h>
19482
19483int
19484main ()
19485{
19486#ifndef tzname
19487 (void) tzname;
19488#endif
19489
19490 ;
19491 return 0;
19492}
19493_ACEOF
19494rm -f conftest.$ac_objext
19495if { (ac_try="$ac_compile"
19496case "(($ac_try" in
19497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19498 *) ac_try_echo=$ac_try;;
19499esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019501 (eval "$ac_compile") 2>conftest.er1
19502 ac_status=$?
19503 grep -v '^ *+' conftest.er1 >conftest.err
19504 rm -f conftest.er1
19505 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019507 (exit $ac_status); } && {
19508 test -z "$ac_c_werror_flag" ||
19509 test ! -s conftest.err
19510 } && test -s conftest.$ac_objext; then
19511 ac_cv_have_decl_tzname=yes
19512else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019513 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514sed 's/^/| /' conftest.$ac_ext >&5
19515
19516 ac_cv_have_decl_tzname=no
19517fi
19518
19519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19520fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019521{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19522echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19523if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019524
19525cat >>confdefs.h <<_ACEOF
19526#define HAVE_DECL_TZNAME 1
19527_ACEOF
19528
19529
19530else
19531 cat >>confdefs.h <<_ACEOF
19532#define HAVE_DECL_TZNAME 0
19533_ACEOF
19534
19535
19536fi
19537
19538
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019539 { echo "$as_me:$LINENO: checking for tzname" >&5
19540echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019541if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019542 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019543else
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019545/* confdefs.h. */
19546_ACEOF
19547cat confdefs.h >>conftest.$ac_ext
19548cat >>conftest.$ac_ext <<_ACEOF
19549/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019550#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019551#if !HAVE_DECL_TZNAME
19552extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019554
Martin v. Löwis11437992002-04-12 09:54:03 +000019555int
19556main ()
19557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019558return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019559 ;
19560 return 0;
19561}
19562_ACEOF
19563rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019564if { (ac_try="$ac_link"
19565case "(($ac_try" in
19566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19567 *) ac_try_echo=$ac_try;;
19568esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019570 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019572 grep -v '^ *+' conftest.er1 >conftest.err
19573 rm -f conftest.er1
19574 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019576 (exit $ac_status); } && {
19577 test -z "$ac_c_werror_flag" ||
19578 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019579 } && test -s conftest$ac_exeext &&
19580 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019581 ac_cv_var_tzname=yes
19582else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019584sed 's/^/| /' conftest.$ac_ext >&5
19585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588
19589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019590 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019591fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019592{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19593echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019594 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019595
19596cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019597#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019600 fi
19601fi
19602
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019603{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19604echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019605if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019607else
19608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019609/* confdefs.h. */
19610_ACEOF
19611cat confdefs.h >>conftest.$ac_ext
19612cat >>conftest.$ac_ext <<_ACEOF
19613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019615int
19616main ()
19617{
19618static struct stat ac_aggr;
19619if (ac_aggr.st_rdev)
19620return 0;
19621 ;
19622 return 0;
19623}
19624_ACEOF
19625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019626if { (ac_try="$ac_compile"
19627case "(($ac_try" in
19628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19629 *) ac_try_echo=$ac_try;;
19630esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019632 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019634 grep -v '^ *+' conftest.er1 >conftest.err
19635 rm -f conftest.er1
19636 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019638 (exit $ac_status); } && {
19639 test -z "$ac_c_werror_flag" ||
19640 test ! -s conftest.err
19641 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 ac_cv_member_struct_stat_st_rdev=yes
19643else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019645sed 's/^/| /' conftest.$ac_ext >&5
19646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019648/* confdefs.h. */
19649_ACEOF
19650cat confdefs.h >>conftest.$ac_ext
19651cat >>conftest.$ac_ext <<_ACEOF
19652/* end confdefs.h. */
19653$ac_includes_default
19654int
19655main ()
19656{
19657static struct stat ac_aggr;
19658if (sizeof ac_aggr.st_rdev)
19659return 0;
19660 ;
19661 return 0;
19662}
19663_ACEOF
19664rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019665if { (ac_try="$ac_compile"
19666case "(($ac_try" in
19667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19668 *) ac_try_echo=$ac_try;;
19669esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019671 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019673 grep -v '^ *+' conftest.er1 >conftest.err
19674 rm -f conftest.er1
19675 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019677 (exit $ac_status); } && {
19678 test -z "$ac_c_werror_flag" ||
19679 test ! -s conftest.err
19680 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019681 ac_cv_member_struct_stat_st_rdev=yes
19682else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019684sed 's/^/| /' conftest.$ac_ext >&5
19685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019686 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688
19689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019691
19692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019693fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019694{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19695echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
19696if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019697
19698cat >>confdefs.h <<_ACEOF
19699#define HAVE_STRUCT_STAT_ST_RDEV 1
19700_ACEOF
19701
19702
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019703fi
19704
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019705{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19706echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019707if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019708 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019709else
Martin v. Löwis11437992002-04-12 09:54:03 +000019710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019711/* confdefs.h. */
19712_ACEOF
19713cat confdefs.h >>conftest.$ac_ext
19714cat >>conftest.$ac_ext <<_ACEOF
19715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019717int
19718main ()
19719{
19720static struct stat ac_aggr;
19721if (ac_aggr.st_blksize)
19722return 0;
19723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019728if { (ac_try="$ac_compile"
19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019736 grep -v '^ *+' conftest.er1 >conftest.err
19737 rm -f conftest.er1
19738 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019740 (exit $ac_status); } && {
19741 test -z "$ac_c_werror_flag" ||
19742 test ! -s conftest.err
19743 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019745else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019747sed 's/^/| /' conftest.$ac_ext >&5
19748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019750/* confdefs.h. */
19751_ACEOF
19752cat confdefs.h >>conftest.$ac_ext
19753cat >>conftest.$ac_ext <<_ACEOF
19754/* end confdefs.h. */
19755$ac_includes_default
19756int
19757main ()
19758{
19759static struct stat ac_aggr;
19760if (sizeof ac_aggr.st_blksize)
19761return 0;
19762 ;
19763 return 0;
19764}
19765_ACEOF
19766rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019767if { (ac_try="$ac_compile"
19768case "(($ac_try" in
19769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19770 *) ac_try_echo=$ac_try;;
19771esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019773 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019775 grep -v '^ *+' conftest.er1 >conftest.err
19776 rm -f conftest.er1
19777 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019779 (exit $ac_status); } && {
19780 test -z "$ac_c_werror_flag" ||
19781 test ! -s conftest.err
19782 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019783 ac_cv_member_struct_stat_st_blksize=yes
19784else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019786sed 's/^/| /' conftest.$ac_ext >&5
19787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019788 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790
19791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019793
19794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019795fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019796{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19797echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
19798if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019799
Martin v. Löwis11437992002-04-12 09:54:03 +000019800cat >>confdefs.h <<_ACEOF
19801#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19802_ACEOF
19803
19804
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019805fi
19806
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019807{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19808echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019809if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019810 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019811else
19812 cat >conftest.$ac_ext <<_ACEOF
19813/* confdefs.h. */
19814_ACEOF
19815cat confdefs.h >>conftest.$ac_ext
19816cat >>conftest.$ac_ext <<_ACEOF
19817/* end confdefs.h. */
19818$ac_includes_default
19819int
19820main ()
19821{
19822static struct stat ac_aggr;
19823if (ac_aggr.st_flags)
19824return 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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019837 ac_status=$?
19838 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
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019846 ac_cv_member_struct_stat_st_flags=yes
19847else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019848 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019849sed 's/^/| /' conftest.$ac_ext >&5
19850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019851 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019852/* confdefs.h. */
19853_ACEOF
19854cat confdefs.h >>conftest.$ac_ext
19855cat >>conftest.$ac_ext <<_ACEOF
19856/* end confdefs.h. */
19857$ac_includes_default
19858int
19859main ()
19860{
19861static struct stat ac_aggr;
19862if (sizeof ac_aggr.st_flags)
19863return 0;
19864 ;
19865 return 0;
19866}
19867_ACEOF
19868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869if { (ac_try="$ac_compile"
19870case "(($ac_try" in
19871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19872 *) ac_try_echo=$ac_try;;
19873esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019875 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019876 ac_status=$?
19877 grep -v '^ *+' conftest.er1 >conftest.err
19878 rm -f conftest.er1
19879 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019881 (exit $ac_status); } && {
19882 test -z "$ac_c_werror_flag" ||
19883 test ! -s conftest.err
19884 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019885 ac_cv_member_struct_stat_st_flags=yes
19886else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019887 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019888sed 's/^/| /' conftest.$ac_ext >&5
19889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019890 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019892
19893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019895
19896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019897fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019898{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19899echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
19900if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019901
19902cat >>confdefs.h <<_ACEOF
19903#define HAVE_STRUCT_STAT_ST_FLAGS 1
19904_ACEOF
19905
19906
19907fi
19908
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019909{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19910echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019911if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019912 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019913else
19914 cat >conftest.$ac_ext <<_ACEOF
19915/* confdefs.h. */
19916_ACEOF
19917cat confdefs.h >>conftest.$ac_ext
19918cat >>conftest.$ac_ext <<_ACEOF
19919/* end confdefs.h. */
19920$ac_includes_default
19921int
19922main ()
19923{
19924static struct stat ac_aggr;
19925if (ac_aggr.st_gen)
19926return 0;
19927 ;
19928 return 0;
19929}
19930_ACEOF
19931rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019932if { (ac_try="$ac_compile"
19933case "(($ac_try" in
19934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19935 *) ac_try_echo=$ac_try;;
19936esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019938 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019939 ac_status=$?
19940 grep -v '^ *+' conftest.er1 >conftest.err
19941 rm -f conftest.er1
19942 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019944 (exit $ac_status); } && {
19945 test -z "$ac_c_werror_flag" ||
19946 test ! -s conftest.err
19947 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019948 ac_cv_member_struct_stat_st_gen=yes
19949else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019950 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019951sed 's/^/| /' conftest.$ac_ext >&5
19952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019953 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019954/* confdefs.h. */
19955_ACEOF
19956cat confdefs.h >>conftest.$ac_ext
19957cat >>conftest.$ac_ext <<_ACEOF
19958/* end confdefs.h. */
19959$ac_includes_default
19960int
19961main ()
19962{
19963static struct stat ac_aggr;
19964if (sizeof ac_aggr.st_gen)
19965return 0;
19966 ;
19967 return 0;
19968}
19969_ACEOF
19970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019971if { (ac_try="$ac_compile"
19972case "(($ac_try" in
19973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19974 *) ac_try_echo=$ac_try;;
19975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019978 ac_status=$?
19979 grep -v '^ *+' conftest.er1 >conftest.err
19980 rm -f conftest.er1
19981 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019983 (exit $ac_status); } && {
19984 test -z "$ac_c_werror_flag" ||
19985 test ! -s conftest.err
19986 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019987 ac_cv_member_struct_stat_st_gen=yes
19988else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019989 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019990sed 's/^/| /' conftest.$ac_ext >&5
19991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019992 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019994
19995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019997
19998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019999fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020000{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20001echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
20002if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020003
20004cat >>confdefs.h <<_ACEOF
20005#define HAVE_STRUCT_STAT_ST_GEN 1
20006_ACEOF
20007
20008
20009fi
20010
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020011{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20012echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020013if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020014 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020015else
20016 cat >conftest.$ac_ext <<_ACEOF
20017/* confdefs.h. */
20018_ACEOF
20019cat confdefs.h >>conftest.$ac_ext
20020cat >>conftest.$ac_ext <<_ACEOF
20021/* end confdefs.h. */
20022$ac_includes_default
20023int
20024main ()
20025{
20026static struct stat ac_aggr;
20027if (ac_aggr.st_birthtime)
20028return 0;
20029 ;
20030 return 0;
20031}
20032_ACEOF
20033rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020034if { (ac_try="$ac_compile"
20035case "(($ac_try" in
20036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20037 *) ac_try_echo=$ac_try;;
20038esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020041 ac_status=$?
20042 grep -v '^ *+' conftest.er1 >conftest.err
20043 rm -f conftest.er1
20044 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020046 (exit $ac_status); } && {
20047 test -z "$ac_c_werror_flag" ||
20048 test ! -s conftest.err
20049 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020050 ac_cv_member_struct_stat_st_birthtime=yes
20051else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020052 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020053sed 's/^/| /' conftest.$ac_ext >&5
20054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020055 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020056/* confdefs.h. */
20057_ACEOF
20058cat confdefs.h >>conftest.$ac_ext
20059cat >>conftest.$ac_ext <<_ACEOF
20060/* end confdefs.h. */
20061$ac_includes_default
20062int
20063main ()
20064{
20065static struct stat ac_aggr;
20066if (sizeof ac_aggr.st_birthtime)
20067return 0;
20068 ;
20069 return 0;
20070}
20071_ACEOF
20072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073if { (ac_try="$ac_compile"
20074case "(($ac_try" in
20075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20076 *) ac_try_echo=$ac_try;;
20077esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020080 ac_status=$?
20081 grep -v '^ *+' conftest.er1 >conftest.err
20082 rm -f conftest.er1
20083 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020085 (exit $ac_status); } && {
20086 test -z "$ac_c_werror_flag" ||
20087 test ! -s conftest.err
20088 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020089 ac_cv_member_struct_stat_st_birthtime=yes
20090else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020091 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020092sed 's/^/| /' conftest.$ac_ext >&5
20093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020094 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020096
20097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020099
20100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020101fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020102{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20103echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
20104if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020105
20106cat >>confdefs.h <<_ACEOF
20107#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20108_ACEOF
20109
20110
20111fi
20112
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020113{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20114echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020115if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020116 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020117else
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020119/* confdefs.h. */
20120_ACEOF
20121cat confdefs.h >>conftest.$ac_ext
20122cat >>conftest.$ac_ext <<_ACEOF
20123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020124$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020125int
20126main ()
20127{
20128static struct stat ac_aggr;
20129if (ac_aggr.st_blocks)
20130return 0;
20131 ;
20132 return 0;
20133}
20134_ACEOF
20135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136if { (ac_try="$ac_compile"
20137case "(($ac_try" in
20138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20139 *) ac_try_echo=$ac_try;;
20140esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020144 grep -v '^ *+' conftest.er1 >conftest.err
20145 rm -f conftest.er1
20146 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020148 (exit $ac_status); } && {
20149 test -z "$ac_c_werror_flag" ||
20150 test ! -s conftest.err
20151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020152 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020153else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020155sed 's/^/| /' conftest.$ac_ext >&5
20156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020158/* confdefs.h. */
20159_ACEOF
20160cat confdefs.h >>conftest.$ac_ext
20161cat >>conftest.$ac_ext <<_ACEOF
20162/* end confdefs.h. */
20163$ac_includes_default
20164int
20165main ()
20166{
20167static struct stat ac_aggr;
20168if (sizeof ac_aggr.st_blocks)
20169return 0;
20170 ;
20171 return 0;
20172}
20173_ACEOF
20174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020175if { (ac_try="$ac_compile"
20176case "(($ac_try" in
20177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20178 *) ac_try_echo=$ac_try;;
20179esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020183 grep -v '^ *+' conftest.er1 >conftest.err
20184 rm -f conftest.er1
20185 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020187 (exit $ac_status); } && {
20188 test -z "$ac_c_werror_flag" ||
20189 test ! -s conftest.err
20190 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020191 ac_cv_member_struct_stat_st_blocks=yes
20192else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020194sed 's/^/| /' conftest.$ac_ext >&5
20195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020196 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020198
20199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020201
20202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020203fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020204{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20205echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
20206if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020207
Martin v. Löwis11437992002-04-12 09:54:03 +000020208cat >>confdefs.h <<_ACEOF
20209#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20210_ACEOF
20211
20212
20213cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020214#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020215_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020216
20217else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020218 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020219 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020220 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20221 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020222esac
20223
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020224fi
20225
Michael W. Hudson54241132001-12-07 15:38:26 +000020226
Martin v. Löwis11437992002-04-12 09:54:03 +000020227
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020228{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20229echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020230if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020231 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020232else
Martin v. Löwis11437992002-04-12 09:54:03 +000020233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020234/* confdefs.h. */
20235_ACEOF
20236cat confdefs.h >>conftest.$ac_ext
20237cat >>conftest.$ac_ext <<_ACEOF
20238/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020239#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020240int
20241main ()
20242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020243return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 ;
20245 return 0;
20246}
20247_ACEOF
20248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020249if { (ac_try="$ac_compile"
20250case "(($ac_try" in
20251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20252 *) ac_try_echo=$ac_try;;
20253esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020257 grep -v '^ *+' conftest.er1 >conftest.err
20258 rm -f conftest.er1
20259 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020261 (exit $ac_status); } && {
20262 test -z "$ac_c_werror_flag" ||
20263 test ! -s conftest.err
20264 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020265 ac_cv_header_time_altzone=yes
20266else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020268sed 's/^/| /' conftest.$ac_ext >&5
20269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020270 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020271fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20274fi
20275
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020276{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20277echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020278if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020279
20280cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020281#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020282_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020283
20284fi
20285
Guido van Rossumda88dad1995-01-26 00:46:29 +000020286was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020287{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20288echo $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 +000020289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020290/* confdefs.h. */
20291_ACEOF
20292cat confdefs.h >>conftest.$ac_ext
20293cat >>conftest.$ac_ext <<_ACEOF
20294/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020295
20296#include <sys/types.h>
20297#include <sys/select.h>
20298#include <sys/time.h>
20299
Martin v. Löwis11437992002-04-12 09:54:03 +000020300int
20301main ()
20302{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020303;
Martin v. Löwis11437992002-04-12 09:54:03 +000020304 ;
20305 return 0;
20306}
20307_ACEOF
20308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020309if { (ac_try="$ac_compile"
20310case "(($ac_try" in
20311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20312 *) ac_try_echo=$ac_try;;
20313esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020317 grep -v '^ *+' conftest.er1 >conftest.err
20318 rm -f conftest.er1
20319 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020321 (exit $ac_status); } && {
20322 test -z "$ac_c_werror_flag" ||
20323 test ! -s conftest.err
20324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020325
20326
20327cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020328#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020329_ACEOF
20330
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020331 was_it_defined=yes
20332
Guido van Rossumf78abae1997-01-21 22:02:36 +000020333else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020335sed 's/^/| /' conftest.$ac_ext >&5
20336
Thomas Wouters477c8d52006-05-27 19:21:47 +000020337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020338fi
20339
20340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020341{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20342echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020344{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20345echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020346if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020347 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020348else
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020350/* confdefs.h. */
20351_ACEOF
20352cat confdefs.h >>conftest.$ac_ext
20353cat >>conftest.$ac_ext <<_ACEOF
20354/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020355
20356# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020357int
20358main ()
20359{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020360struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020361 ;
20362 return 0;
20363}
20364_ACEOF
20365rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020366if { (ac_try="$ac_compile"
20367case "(($ac_try" in
20368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20369 *) ac_try_echo=$ac_try;;
20370esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020374 grep -v '^ *+' conftest.er1 >conftest.err
20375 rm -f conftest.er1
20376 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020378 (exit $ac_status); } && {
20379 test -z "$ac_c_werror_flag" ||
20380 test ! -s conftest.err
20381 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020382 ac_cv_struct_addrinfo=yes
20383else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020385sed 's/^/| /' conftest.$ac_ext >&5
20386
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020387 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020388fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20391fi
20392
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020393{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20394echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020395if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020396
20397cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020398#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020399_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020400
20401fi
20402
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020403{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20404echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020405if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020406 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020407else
Martin v. Löwis11437992002-04-12 09:54:03 +000020408 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020409/* confdefs.h. */
20410_ACEOF
20411cat confdefs.h >>conftest.$ac_ext
20412cat >>conftest.$ac_ext <<_ACEOF
20413/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020414
20415# include <sys/types.h>
20416# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020417int
20418main ()
20419{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020420struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020421 ;
20422 return 0;
20423}
20424_ACEOF
20425rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020426if { (ac_try="$ac_compile"
20427case "(($ac_try" in
20428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20429 *) ac_try_echo=$ac_try;;
20430esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020434 grep -v '^ *+' conftest.er1 >conftest.err
20435 rm -f conftest.er1
20436 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020438 (exit $ac_status); } && {
20439 test -z "$ac_c_werror_flag" ||
20440 test ! -s conftest.err
20441 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020442 ac_cv_struct_sockaddr_storage=yes
20443else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020445sed 's/^/| /' conftest.$ac_ext >&5
20446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020448fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20451fi
20452
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020453{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20454echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020455if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020456
20457cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020458#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020459_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020460
20461fi
20462
Guido van Rossum627b2d71993-12-24 10:39:16 +000020463# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020464
Michael W. Hudson54241132001-12-07 15:38:26 +000020465
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020466{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20467echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020468if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020469 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020470else
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020472/* confdefs.h. */
20473_ACEOF
20474cat confdefs.h >>conftest.$ac_ext
20475cat >>conftest.$ac_ext <<_ACEOF
20476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020477$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020478int
20479main ()
20480{
20481static int test_array [1 - 2 * !(((char) -1) < 0)];
20482test_array [0] = 0
20483
20484 ;
20485 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020486}
Martin v. Löwis11437992002-04-12 09:54:03 +000020487_ACEOF
20488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020489if { (ac_try="$ac_compile"
20490case "(($ac_try" in
20491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492 *) ac_try_echo=$ac_try;;
20493esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020497 grep -v '^ *+' conftest.er1 >conftest.err
20498 rm -f conftest.er1
20499 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020501 (exit $ac_status); } && {
20502 test -z "$ac_c_werror_flag" ||
20503 test ! -s conftest.err
20504 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020505 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020506else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020508sed 's/^/| /' conftest.$ac_ext >&5
20509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020510 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020512
20513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020514fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020515{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20516echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020518 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020519#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020520_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020521
20522fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020523
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020524{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20525echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020526if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020527 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020528else
20529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020530/* confdefs.h. */
20531_ACEOF
20532cat confdefs.h >>conftest.$ac_ext
20533cat >>conftest.$ac_ext <<_ACEOF
20534/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020535
Martin v. Löwis11437992002-04-12 09:54:03 +000020536int
20537main ()
20538{
20539/* FIXME: Include the comments suggested by Paul. */
20540#ifndef __cplusplus
20541 /* Ultrix mips cc rejects this. */
20542 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020544 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020545 char const *const *pcpcc;
20546 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020547 /* NEC SVR4.0.2 mips cc rejects this. */
20548 struct point {int x, y;};
20549 static struct point const zero = {0,0};
20550 /* AIX XL C 1.02.0.0 rejects this.
20551 It does not let you subtract one const X* pointer from another in
20552 an arm of an if-expression whose if-part is not a constant
20553 expression */
20554 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020555 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020556 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020557 ++pcpcc;
20558 ppc = (char**) pcpcc;
20559 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 { /* SCO 3.2v4 cc rejects this. */
20561 char *t;
20562 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020563
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020565 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020566 }
20567 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20568 int x[] = {25, 17};
20569 const int *foo = &x[0];
20570 ++foo;
20571 }
20572 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20573 typedef const int *iptr;
20574 iptr p = 0;
20575 ++p;
20576 }
20577 { /* AIX XL C 1.02.0.0 rejects this saying
20578 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20579 struct s { int j; const int *ap[3]; };
20580 struct s *b; b->j = 5;
20581 }
20582 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20583 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020584 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020586 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020587#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020588
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ;
20590 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020591}
Martin v. Löwis11437992002-04-12 09:54:03 +000020592_ACEOF
20593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020594if { (ac_try="$ac_compile"
20595case "(($ac_try" in
20596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20597 *) ac_try_echo=$ac_try;;
20598esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020602 grep -v '^ *+' conftest.er1 >conftest.err
20603 rm -f conftest.er1
20604 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020606 (exit $ac_status); } && {
20607 test -z "$ac_c_werror_flag" ||
20608 test ! -s conftest.err
20609 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020610 ac_cv_c_const=yes
20611else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020613sed 's/^/| /' conftest.$ac_ext >&5
20614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020615 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020617
20618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020619fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020620{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20621echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020622if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020623
20624cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020625#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000020626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020627
20628fi
20629
Michael W. Hudson54241132001-12-07 15:38:26 +000020630
Guido van Rossumda88dad1995-01-26 00:46:29 +000020631works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020632{ echo "$as_me:$LINENO: checking for working volatile" >&5
20633echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020635/* confdefs.h. */
20636_ACEOF
20637cat confdefs.h >>conftest.$ac_ext
20638cat >>conftest.$ac_ext <<_ACEOF
20639/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020640
Martin v. Löwis11437992002-04-12 09:54:03 +000020641int
20642main ()
20643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020644volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 ;
20646 return 0;
20647}
20648_ACEOF
20649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020650if { (ac_try="$ac_compile"
20651case "(($ac_try" in
20652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20653 *) ac_try_echo=$ac_try;;
20654esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020656 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020658 grep -v '^ *+' conftest.er1 >conftest.err
20659 rm -f conftest.er1
20660 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020662 (exit $ac_status); } && {
20663 test -z "$ac_c_werror_flag" ||
20664 test ! -s conftest.err
20665 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020666 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020667else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020669sed 's/^/| /' conftest.$ac_ext >&5
20670
Martin v. Löwis11437992002-04-12 09:54:03 +000020671
20672cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020673#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000020674_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020675
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020676
Guido van Rossum627b2d71993-12-24 10:39:16 +000020677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020678
20679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020680{ echo "$as_me:$LINENO: result: $works" >&5
20681echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020682
Guido van Rossumda88dad1995-01-26 00:46:29 +000020683works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020684{ echo "$as_me:$LINENO: checking for working signed char" >&5
20685echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020687/* confdefs.h. */
20688_ACEOF
20689cat confdefs.h >>conftest.$ac_ext
20690cat >>conftest.$ac_ext <<_ACEOF
20691/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020692
Martin v. Löwis11437992002-04-12 09:54:03 +000020693int
20694main ()
20695{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020696signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020697 ;
20698 return 0;
20699}
20700_ACEOF
20701rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702if { (ac_try="$ac_compile"
20703case "(($ac_try" in
20704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20705 *) ac_try_echo=$ac_try;;
20706esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020710 grep -v '^ *+' conftest.er1 >conftest.err
20711 rm -f conftest.er1
20712 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020714 (exit $ac_status); } && {
20715 test -z "$ac_c_werror_flag" ||
20716 test ! -s conftest.err
20717 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020718 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020719else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020721sed 's/^/| /' conftest.$ac_ext >&5
20722
Martin v. Löwis11437992002-04-12 09:54:03 +000020723
20724cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020725#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000020726_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020727
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020728
Guido van Rossum7f43da71994-08-01 12:15:30 +000020729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020730
20731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020732{ echo "$as_me:$LINENO: result: $works" >&5
20733echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020734
Guido van Rossumda88dad1995-01-26 00:46:29 +000020735have_prototypes=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020736{ echo "$as_me:$LINENO: checking for prototypes" >&5
20737echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020738cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020739/* confdefs.h. */
20740_ACEOF
20741cat confdefs.h >>conftest.$ac_ext
20742cat >>conftest.$ac_ext <<_ACEOF
20743/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020744int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020745int
20746main ()
20747{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020748return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020749 ;
20750 return 0;
20751}
20752_ACEOF
20753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020754if { (ac_try="$ac_compile"
20755case "(($ac_try" in
20756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20757 *) ac_try_echo=$ac_try;;
20758esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020760 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020762 grep -v '^ *+' conftest.er1 >conftest.err
20763 rm -f conftest.er1
20764 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020766 (exit $ac_status); } && {
20767 test -z "$ac_c_werror_flag" ||
20768 test ! -s conftest.err
20769 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020770
20771
20772cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020773#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020774_ACEOF
20775
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020776 have_prototypes=yes
20777
Guido van Rossumf78abae1997-01-21 22:02:36 +000020778else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020780sed 's/^/| /' conftest.$ac_ext >&5
20781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020782
Guido van Rossum7f43da71994-08-01 12:15:30 +000020783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020784
20785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020786{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20787echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020788
Guido van Rossumda88dad1995-01-26 00:46:29 +000020789works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020790{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20791echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020792cat >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. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020798
20799#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020800int foo(int x, ...) {
20801 va_list va;
20802 va_start(va, x);
20803 va_arg(va, int);
20804 va_arg(va, char *);
20805 va_arg(va, double);
20806 return 0;
20807}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020808
Martin v. Löwis11437992002-04-12 09:54:03 +000020809int
20810main ()
20811{
Guido van Rossum90eea071996-08-30 20:58:57 +000020812return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020813 ;
20814 return 0;
20815}
20816_ACEOF
20817rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020818if { (ac_try="$ac_compile"
20819case "(($ac_try" in
20820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20821 *) ac_try_echo=$ac_try;;
20822esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020826 grep -v '^ *+' conftest.er1 >conftest.err
20827 rm -f conftest.er1
20828 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020830 (exit $ac_status); } && {
20831 test -z "$ac_c_werror_flag" ||
20832 test ! -s conftest.err
20833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020834
20835
20836cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020838_ACEOF
20839
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020840 works=yes
20841
Guido van Rossumf78abae1997-01-21 22:02:36 +000020842else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020844sed 's/^/| /' conftest.$ac_ext >&5
20845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846
Guido van Rossum627b2d71993-12-24 10:39:16 +000020847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020848
20849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020850{ echo "$as_me:$LINENO: result: $works" >&5
20851echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020852
Martin v. Löwisd6320502004-08-12 13:45:08 +000020853# check for socketpair
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020854{ echo "$as_me:$LINENO: checking for socketpair" >&5
20855echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020856cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020857/* confdefs.h. */
20858_ACEOF
20859cat confdefs.h >>conftest.$ac_ext
20860cat >>conftest.$ac_ext <<_ACEOF
20861/* end confdefs.h. */
20862
20863#include <sys/types.h>
20864#include <sys/socket.h>
20865
20866int
20867main ()
20868{
20869void *x=socketpair
20870 ;
20871 return 0;
20872}
20873_ACEOF
20874rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875if { (ac_try="$ac_compile"
20876case "(($ac_try" in
20877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20878 *) ac_try_echo=$ac_try;;
20879esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020883 grep -v '^ *+' conftest.er1 >conftest.err
20884 rm -f conftest.er1
20885 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020887 (exit $ac_status); } && {
20888 test -z "$ac_c_werror_flag" ||
20889 test ! -s conftest.err
20890 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020891
20892cat >>confdefs.h <<\_ACEOF
20893#define HAVE_SOCKETPAIR 1
20894_ACEOF
20895
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020896 { echo "$as_me:$LINENO: result: yes" >&5
20897echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020898else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020899 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020900sed 's/^/| /' conftest.$ac_ext >&5
20901
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020902 { echo "$as_me:$LINENO: result: no" >&5
20903echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020904
20905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020906
20907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020908
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020909# check if sockaddr has sa_len member
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020910{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20911echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020912cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020913/* confdefs.h. */
20914_ACEOF
20915cat confdefs.h >>conftest.$ac_ext
20916cat >>conftest.$ac_ext <<_ACEOF
20917/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020918#include <sys/types.h>
20919#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020920int
20921main ()
20922{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020923struct sockaddr x;
20924x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020925 ;
20926 return 0;
20927}
20928_ACEOF
20929rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020930if { (ac_try="$ac_compile"
20931case "(($ac_try" in
20932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20933 *) ac_try_echo=$ac_try;;
20934esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020938 grep -v '^ *+' conftest.er1 >conftest.err
20939 rm -f conftest.er1
20940 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020942 (exit $ac_status); } && {
20943 test -z "$ac_c_werror_flag" ||
20944 test ! -s conftest.err
20945 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020946 { echo "$as_me:$LINENO: result: yes" >&5
20947echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020948
20949cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020950#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020951_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020952
20953else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020955sed 's/^/| /' conftest.$ac_ext >&5
20956
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020957 { echo "$as_me:$LINENO: result: no" >&5
20958echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020960
20961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020962
Guido van Rossumda88dad1995-01-26 00:46:29 +000020963va_list_is_array=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020964{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20965echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020966cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020967/* confdefs.h. */
20968_ACEOF
20969cat confdefs.h >>conftest.$ac_ext
20970cat >>conftest.$ac_ext <<_ACEOF
20971/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020972
20973#ifdef HAVE_STDARG_PROTOTYPES
20974#include <stdarg.h>
20975#else
20976#include <varargs.h>
20977#endif
20978
Martin v. Löwis11437992002-04-12 09:54:03 +000020979int
20980main ()
20981{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020982va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020988if { (ac_try="$ac_compile"
20989case "(($ac_try" in
20990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991 *) ac_try_echo=$ac_try;;
20992esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020996 grep -v '^ *+' conftest.er1 >conftest.err
20997 rm -f conftest.er1
20998 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021000 (exit $ac_status); } && {
21001 test -z "$ac_c_werror_flag" ||
21002 test ! -s conftest.err
21003 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021004 :
21005else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021007sed 's/^/| /' conftest.$ac_ext >&5
21008
Martin v. Löwis11437992002-04-12 09:54:03 +000021009
21010
21011cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021012#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021013_ACEOF
21014
Guido van Rossumda88dad1995-01-26 00:46:29 +000021015 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021016
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021018
21019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021020{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21021echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021022
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021023# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021024
21025
21026
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021027{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21028echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021029if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021030 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021031else
Martin v. Löwis11437992002-04-12 09:54:03 +000021032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021033/* confdefs.h. */
21034_ACEOF
21035cat confdefs.h >>conftest.$ac_ext
21036cat >>conftest.$ac_ext <<_ACEOF
21037/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021038/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21039 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21040#define gethostbyname_r innocuous_gethostbyname_r
21041
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021042/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021043 which can conflict with char gethostbyname_r (); below.
21044 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021045 <limits.h> exists even on freestanding compilers. */
21046
21047#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021048# include <limits.h>
21049#else
21050# include <assert.h>
21051#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021052
21053#undef gethostbyname_r
21054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021055/* Override any GCC internal prototype to avoid an error.
21056 Use char because int might match the return type of a GCC
21057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021058#ifdef __cplusplus
21059extern "C"
21060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021061char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021062/* The GNU C library defines this for functions which it implements
21063 to always fail with ENOSYS. Some functions are actually named
21064 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021065#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021066choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021067#endif
21068
Skip Montanaro6dead952003-09-25 14:50:04 +000021069int
21070main ()
21071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021072return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021073 ;
21074 return 0;
21075}
21076_ACEOF
21077rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021078if { (ac_try="$ac_link"
21079case "(($ac_try" in
21080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21081 *) ac_try_echo=$ac_try;;
21082esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021084 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021086 grep -v '^ *+' conftest.er1 >conftest.err
21087 rm -f conftest.er1
21088 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021090 (exit $ac_status); } && {
21091 test -z "$ac_c_werror_flag" ||
21092 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021093 } && test -s conftest$ac_exeext &&
21094 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021095 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021096else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021098sed 's/^/| /' conftest.$ac_ext >&5
21099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021100 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102
21103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021104 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021105fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021106{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21107echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
21108if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021109
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021111#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021112_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021113
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021114 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21115echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021116 OLD_CFLAGS=$CFLAGS
21117 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021119/* confdefs.h. */
21120_ACEOF
21121cat confdefs.h >>conftest.$ac_ext
21122cat >>conftest.$ac_ext <<_ACEOF
21123/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021124
21125# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021126
Martin v. Löwis11437992002-04-12 09:54:03 +000021127int
21128main ()
21129{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021130
21131 char *name;
21132 struct hostent *he, *res;
21133 char buffer[2048];
21134 int buflen = 2048;
21135 int h_errnop;
21136
21137 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021138
21139 ;
21140 return 0;
21141}
21142_ACEOF
21143rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021144if { (ac_try="$ac_compile"
21145case "(($ac_try" in
21146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21147 *) ac_try_echo=$ac_try;;
21148esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021152 grep -v '^ *+' conftest.er1 >conftest.err
21153 rm -f conftest.er1
21154 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156 (exit $ac_status); } && {
21157 test -z "$ac_c_werror_flag" ||
21158 test ! -s conftest.err
21159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021160
21161 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021162#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021163_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021164
Martin v. Löwis11437992002-04-12 09:54:03 +000021165
21166cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021167#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021168_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021169
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021170 { echo "$as_me:$LINENO: result: yes" >&5
21171echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021172
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021173else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021175sed 's/^/| /' conftest.$ac_ext >&5
21176
Martin v. Löwis11437992002-04-12 09:54:03 +000021177
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021178 { echo "$as_me:$LINENO: result: no" >&5
21179echo "${ECHO_T}no" >&6; }
21180 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21181echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021183/* confdefs.h. */
21184_ACEOF
21185cat confdefs.h >>conftest.$ac_ext
21186cat >>conftest.$ac_ext <<_ACEOF
21187/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021188
21189# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021190
Martin v. Löwis11437992002-04-12 09:54:03 +000021191int
21192main ()
21193{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021194
21195 char *name;
21196 struct hostent *he;
21197 char buffer[2048];
21198 int buflen = 2048;
21199 int h_errnop;
21200
21201 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021202
21203 ;
21204 return 0;
21205}
21206_ACEOF
21207rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021208if { (ac_try="$ac_compile"
21209case "(($ac_try" in
21210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21211 *) ac_try_echo=$ac_try;;
21212esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021216 grep -v '^ *+' conftest.er1 >conftest.err
21217 rm -f conftest.er1
21218 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 (exit $ac_status); } && {
21221 test -z "$ac_c_werror_flag" ||
21222 test ! -s conftest.err
21223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021224
21225 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021226#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021227_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021228
Martin v. Löwis11437992002-04-12 09:54:03 +000021229
21230cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021231#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021232_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021233
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021234 { echo "$as_me:$LINENO: result: yes" >&5
21235echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021236
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021237else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021239sed 's/^/| /' conftest.$ac_ext >&5
21240
Martin v. Löwis11437992002-04-12 09:54:03 +000021241
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021242 { echo "$as_me:$LINENO: result: no" >&5
21243echo "${ECHO_T}no" >&6; }
21244 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21245echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021247/* confdefs.h. */
21248_ACEOF
21249cat confdefs.h >>conftest.$ac_ext
21250cat >>conftest.$ac_ext <<_ACEOF
21251/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021252
21253# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021254
Martin v. Löwis11437992002-04-12 09:54:03 +000021255int
21256main ()
21257{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021258
21259 char *name;
21260 struct hostent *he;
21261 struct hostent_data data;
21262
21263 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021264
21265 ;
21266 return 0;
21267}
21268_ACEOF
21269rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021270if { (ac_try="$ac_compile"
21271case "(($ac_try" in
21272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21273 *) ac_try_echo=$ac_try;;
21274esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021278 grep -v '^ *+' conftest.er1 >conftest.err
21279 rm -f conftest.er1
21280 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021282 (exit $ac_status); } && {
21283 test -z "$ac_c_werror_flag" ||
21284 test ! -s conftest.err
21285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021286
21287 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021288#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021289_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021290
Martin v. Löwis11437992002-04-12 09:54:03 +000021291
21292cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021293#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021294_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021295
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021296 { echo "$as_me:$LINENO: result: yes" >&5
21297echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021299else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021300 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021301sed 's/^/| /' conftest.$ac_ext >&5
21302
Martin v. Löwis11437992002-04-12 09:54:03 +000021303
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021304 { echo "$as_me:$LINENO: result: no" >&5
21305echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021308
21309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021312
21313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021314
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316
21317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021318 CFLAGS=$OLD_CFLAGS
21319
21320else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021321
Martin v. Löwis11437992002-04-12 09:54:03 +000021322
21323for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021324do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021325as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21326{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21327echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021329 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021330else
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021332/* confdefs.h. */
21333_ACEOF
21334cat confdefs.h >>conftest.$ac_ext
21335cat >>conftest.$ac_ext <<_ACEOF
21336/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021337/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21338 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21339#define $ac_func innocuous_$ac_func
21340
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021341/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021342 which can conflict with char $ac_func (); below.
21343 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021344 <limits.h> exists even on freestanding compilers. */
21345
21346#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021347# include <limits.h>
21348#else
21349# include <assert.h>
21350#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021351
21352#undef $ac_func
21353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021354/* Override any GCC internal prototype to avoid an error.
21355 Use char because int might match the return type of a GCC
21356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021357#ifdef __cplusplus
21358extern "C"
21359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021360char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021361/* The GNU C library defines this for functions which it implements
21362 to always fail with ENOSYS. Some functions are actually named
21363 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021364#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021365choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021366#endif
21367
Skip Montanaro6dead952003-09-25 14:50:04 +000021368int
21369main ()
21370{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021371return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021372 ;
21373 return 0;
21374}
21375_ACEOF
21376rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021377if { (ac_try="$ac_link"
21378case "(($ac_try" in
21379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21380 *) ac_try_echo=$ac_try;;
21381esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021383 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021385 grep -v '^ *+' conftest.er1 >conftest.err
21386 rm -f conftest.er1
21387 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021389 (exit $ac_status); } && {
21390 test -z "$ac_c_werror_flag" ||
21391 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021392 } && test -s conftest$ac_exeext &&
21393 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021394 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021395else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021396 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021397sed 's/^/| /' conftest.$ac_ext >&5
21398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021399 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021401
21402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021403 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021404fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021405ac_res=`eval echo '${'$as_ac_var'}'`
21406 { echo "$as_me:$LINENO: result: $ac_res" >&5
21407echo "${ECHO_T}$ac_res" >&6; }
21408if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021409 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021410#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021411_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021414done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021415
Michael W. Hudson54241132001-12-07 15:38:26 +000021416
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021417fi
21418
Michael W. Hudson54241132001-12-07 15:38:26 +000021419
21420
21421
21422
21423
21424
Guido van Rossum627b2d71993-12-24 10:39:16 +000021425# checks for system services
21426# (none yet)
21427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021428# Linux requires this for correct f.p. operations
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021429{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21430echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021431if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021432 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021433else
Martin v. Löwis11437992002-04-12 09:54:03 +000021434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021435/* confdefs.h. */
21436_ACEOF
21437cat confdefs.h >>conftest.$ac_ext
21438cat >>conftest.$ac_ext <<_ACEOF
21439/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021440/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21441 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21442#define __fpu_control innocuous___fpu_control
21443
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021444/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021445 which can conflict with char __fpu_control (); below.
21446 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021447 <limits.h> exists even on freestanding compilers. */
21448
21449#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021450# include <limits.h>
21451#else
21452# include <assert.h>
21453#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021454
21455#undef __fpu_control
21456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021457/* Override any GCC internal prototype to avoid an error.
21458 Use char because int might match the return type of a GCC
21459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021460#ifdef __cplusplus
21461extern "C"
21462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021463char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021464/* The GNU C library defines this for functions which it implements
21465 to always fail with ENOSYS. Some functions are actually named
21466 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021467#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021468choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021469#endif
21470
Skip Montanaro6dead952003-09-25 14:50:04 +000021471int
21472main ()
21473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021474return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021475 ;
21476 return 0;
21477}
21478_ACEOF
21479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021480if { (ac_try="$ac_link"
21481case "(($ac_try" in
21482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21483 *) ac_try_echo=$ac_try;;
21484esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021486 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021488 grep -v '^ *+' conftest.er1 >conftest.err
21489 rm -f conftest.er1
21490 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492 (exit $ac_status); } && {
21493 test -z "$ac_c_werror_flag" ||
21494 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021495 } && test -s conftest$ac_exeext &&
21496 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021498else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021500sed 's/^/| /' conftest.$ac_ext >&5
21501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021502 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021504
21505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021506 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021507fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021508{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21509echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
21510if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021511 :
21512else
Martin v. Löwis11437992002-04-12 09:54:03 +000021513
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021514{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21515echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021516if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021518else
Martin v. Löwis11437992002-04-12 09:54:03 +000021519 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021520LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021521cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021522/* confdefs.h. */
21523_ACEOF
21524cat confdefs.h >>conftest.$ac_ext
21525cat >>conftest.$ac_ext <<_ACEOF
21526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528/* Override any GCC internal prototype to avoid an error.
21529 Use char because int might match the return type of a GCC
21530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021531#ifdef __cplusplus
21532extern "C"
21533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021534char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021535int
21536main ()
21537{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021538return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021539 ;
21540 return 0;
21541}
21542_ACEOF
21543rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021544if { (ac_try="$ac_link"
21545case "(($ac_try" in
21546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21547 *) ac_try_echo=$ac_try;;
21548esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021550 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021552 grep -v '^ *+' conftest.er1 >conftest.err
21553 rm -f conftest.er1
21554 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021556 (exit $ac_status); } && {
21557 test -z "$ac_c_werror_flag" ||
21558 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021559 } && test -s conftest$ac_exeext &&
21560 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021561 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021562else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021564sed 's/^/| /' conftest.$ac_ext >&5
21565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021566 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568
21569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021570 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021571LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021572fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021573{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21574echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
21575if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021576 cat >>confdefs.h <<_ACEOF
21577#define HAVE_LIBIEEE 1
21578_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021579
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021580 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021581
Guido van Rossum627b2d71993-12-24 10:39:16 +000021582fi
21583
Michael W. Hudson54241132001-12-07 15:38:26 +000021584
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021585fi
21586
Michael W. Hudson54241132001-12-07 15:38:26 +000021587
Guido van Rossum7f253911997-05-09 02:42:48 +000021588# Check for --with-fpectl
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021589{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21590echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021592# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021593if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021595if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021596then
21597
21598cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021599#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021600_ACEOF
21601
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021602 { echo "$as_me:$LINENO: result: yes" >&5
21603echo "${ECHO_T}yes" >&6; }
21604else { echo "$as_me:$LINENO: result: no" >&5
21605echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021606fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021607else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021608 { echo "$as_me:$LINENO: result: no" >&5
21609echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021610fi
21611
Guido van Rossum7f253911997-05-09 02:42:48 +000021612
Guido van Rossum7f43da71994-08-01 12:15:30 +000021613# check for --with-libm=...
21614
Guido van Rossum563e7081996-09-10 18:20:48 +000021615case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021616Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021617*) LIBM=-lm
21618esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021619{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21620echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021622# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021623if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021624 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021625if test "$withval" = no
21626then LIBM=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021627 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21628echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021629elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021630then LIBM=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021631 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21632echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
21633else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21634echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021636fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021637else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021638 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21639echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640fi
21641
Guido van Rossum7f43da71994-08-01 12:15:30 +000021642
21643# check for --with-libc=...
21644
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021645{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21646echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021648# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021649if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021650 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021651if test "$withval" = no
21652then LIBC=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021653 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21654echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021655elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021656then LIBC=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021657 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21658echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
21659else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21660echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021661 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021662fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021663else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021664 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21665echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021666fi
21667
Guido van Rossum7f43da71994-08-01 12:15:30 +000021668
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021669# **************************************************
21670# * Check for various properties of floating point *
21671# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021672
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021673{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
21674echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021675if test "${ac_cv_little_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021676 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021677else
21678
21679if test "$cross_compiling" = yes; then
21680 ac_cv_little_endian_double=no
21681else
21682 cat >conftest.$ac_ext <<_ACEOF
21683/* confdefs.h. */
21684_ACEOF
21685cat confdefs.h >>conftest.$ac_ext
21686cat >>conftest.$ac_ext <<_ACEOF
21687/* end confdefs.h. */
21688
21689#include <string.h>
21690int main() {
21691 double x = 9006104071832581.0;
21692 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
21693 return 0;
21694 else
21695 return 1;
21696}
21697
21698_ACEOF
21699rm -f conftest$ac_exeext
21700if { (ac_try="$ac_link"
21701case "(($ac_try" in
21702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21703 *) ac_try_echo=$ac_try;;
21704esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021706 (eval "$ac_link") 2>&5
21707 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021709 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21710 { (case "(($ac_try" in
21711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21712 *) ac_try_echo=$ac_try;;
21713esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021715 (eval "$ac_try") 2>&5
21716 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021718 (exit $ac_status); }; }; then
21719 ac_cv_little_endian_double=yes
21720else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021721 echo "$as_me: program exited with status $ac_status" >&5
21722echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021723sed 's/^/| /' conftest.$ac_ext >&5
21724
21725( exit $ac_status )
21726ac_cv_little_endian_double=no
21727fi
21728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21729fi
21730
21731
21732fi
21733
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021734{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
21735echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021736if test "$ac_cv_little_endian_double" = yes
21737then
21738
21739cat >>confdefs.h <<\_ACEOF
21740#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
21741_ACEOF
21742
21743fi
21744
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021745{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
21746echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021747if test "${ac_cv_big_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021748 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021749else
21750
21751if test "$cross_compiling" = yes; then
21752 ac_cv_big_endian_double=no
21753else
21754 cat >conftest.$ac_ext <<_ACEOF
21755/* confdefs.h. */
21756_ACEOF
21757cat confdefs.h >>conftest.$ac_ext
21758cat >>conftest.$ac_ext <<_ACEOF
21759/* end confdefs.h. */
21760
21761#include <string.h>
21762int main() {
21763 double x = 9006104071832581.0;
21764 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
21765 return 0;
21766 else
21767 return 1;
21768}
21769
21770_ACEOF
21771rm -f conftest$ac_exeext
21772if { (ac_try="$ac_link"
21773case "(($ac_try" in
21774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21775 *) ac_try_echo=$ac_try;;
21776esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021778 (eval "$ac_link") 2>&5
21779 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21782 { (case "(($ac_try" in
21783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21784 *) ac_try_echo=$ac_try;;
21785esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021787 (eval "$ac_try") 2>&5
21788 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021790 (exit $ac_status); }; }; then
21791 ac_cv_big_endian_double=yes
21792else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021793 echo "$as_me: program exited with status $ac_status" >&5
21794echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021795sed 's/^/| /' conftest.$ac_ext >&5
21796
21797( exit $ac_status )
21798ac_cv_big_endian_double=no
21799fi
21800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21801fi
21802
21803
21804fi
21805
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021806{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
21807echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021808if test "$ac_cv_big_endian_double" = yes
21809then
21810
21811cat >>confdefs.h <<\_ACEOF
21812#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
21813_ACEOF
21814
21815fi
21816
21817# Some ARM platforms use a mixed-endian representation for doubles.
21818# While Python doesn't currently have full support for these platforms
21819# (see e.g., issue 1762561), we can at least make sure that float <-> string
21820# conversions work.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021821{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
21822echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021823if test "${ac_cv_mixed_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021824 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021825else
21826
21827if test "$cross_compiling" = yes; then
21828 ac_cv_mixed_endian_double=no
21829else
21830 cat >conftest.$ac_ext <<_ACEOF
21831/* confdefs.h. */
21832_ACEOF
21833cat confdefs.h >>conftest.$ac_ext
21834cat >>conftest.$ac_ext <<_ACEOF
21835/* end confdefs.h. */
21836
21837#include <string.h>
21838int main() {
21839 double x = 9006104071832581.0;
21840 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
21841 return 0;
21842 else
21843 return 1;
21844}
21845
21846_ACEOF
21847rm -f conftest$ac_exeext
21848if { (ac_try="$ac_link"
21849case "(($ac_try" in
21850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21851 *) ac_try_echo=$ac_try;;
21852esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021854 (eval "$ac_link") 2>&5
21855 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021857 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21858 { (case "(($ac_try" in
21859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21860 *) ac_try_echo=$ac_try;;
21861esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021863 (eval "$ac_try") 2>&5
21864 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021866 (exit $ac_status); }; }; then
21867 ac_cv_mixed_endian_double=yes
21868else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021869 echo "$as_me: program exited with status $ac_status" >&5
21870echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021871sed 's/^/| /' conftest.$ac_ext >&5
21872
21873( exit $ac_status )
21874ac_cv_mixed_endian_double=no
21875fi
21876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21877fi
21878
21879
21880fi
21881
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021882{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
21883echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021884if test "$ac_cv_mixed_endian_double" = yes
21885then
21886
21887cat >>confdefs.h <<\_ACEOF
21888#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
21889_ACEOF
21890
21891fi
21892
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021893# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000021894# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021895# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000021896# rounding; this is a problem on x86, where the x87 FPU has a default
21897# rounding precision of 64 bits. For gcc/x86, we try to fix this by
21898# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021899if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
21900then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021901 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000021902 # x87 control word. It should be, but you never know...
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021903 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
21904echo $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 +000021905 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021906/* confdefs.h. */
21907_ACEOF
21908cat confdefs.h >>conftest.$ac_ext
21909cat >>conftest.$ac_ext <<_ACEOF
21910/* end confdefs.h. */
21911
21912int
21913main ()
21914{
21915
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021916 unsigned short cw;
21917 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
21918 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021919
21920 ;
21921 return 0;
21922}
21923_ACEOF
21924rm -f conftest.$ac_objext
21925if { (ac_try="$ac_compile"
21926case "(($ac_try" in
21927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21928 *) ac_try_echo=$ac_try;;
21929esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021931 (eval "$ac_compile") 2>conftest.er1
21932 ac_status=$?
21933 grep -v '^ *+' conftest.er1 >conftest.err
21934 rm -f conftest.er1
21935 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021937 (exit $ac_status); } && {
21938 test -z "$ac_c_werror_flag" ||
21939 test ! -s conftest.err
21940 } && test -s conftest.$ac_objext; then
21941 have_gcc_asm_for_x87=yes
21942else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021943 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021944sed 's/^/| /' conftest.$ac_ext >&5
21945
21946 have_gcc_asm_for_x87=no
21947fi
21948
21949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021950 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
21951echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000021952 if test "$have_gcc_asm_for_x87" = yes
21953 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021954
21955cat >>confdefs.h <<\_ACEOF
21956#define HAVE_GCC_ASM_FOR_X87 1
21957_ACEOF
21958
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021959 fi
21960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021961
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021962# Detect whether system arithmetic is subject to x87-style double
21963# rounding issues. The result of this test has little meaning on non
21964# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21965# mode is round-to-nearest and double rounding issues are present, and
21966# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021967{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21968echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000021969# $BASECFLAGS may affect the result
21970ac_save_cc="$CC"
21971CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021972if test "$cross_compiling" = yes; then
21973 ac_cv_x87_double_rounding=no
21974else
21975 cat >conftest.$ac_ext <<_ACEOF
21976/* confdefs.h. */
21977_ACEOF
21978cat confdefs.h >>conftest.$ac_ext
21979cat >>conftest.$ac_ext <<_ACEOF
21980/* end confdefs.h. */
21981
21982#include <stdlib.h>
21983#include <math.h>
21984int main() {
21985 volatile double x, y, z;
21986 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21987 x = 0.99999999999999989; /* 1-2**-53 */
21988 y = 1./x;
21989 if (y != 1.)
21990 exit(0);
21991 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21992 x = 1e16;
21993 y = 2.99999;
21994 z = x + y;
21995 if (z != 1e16+4.)
21996 exit(0);
21997 /* both tests show evidence of double rounding */
21998 exit(1);
21999}
22000
22001_ACEOF
22002rm -f conftest$ac_exeext
22003if { (ac_try="$ac_link"
22004case "(($ac_try" in
22005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22006 *) ac_try_echo=$ac_try;;
22007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022009 (eval "$ac_link") 2>&5
22010 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22013 { (case "(($ac_try" in
22014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22015 *) ac_try_echo=$ac_try;;
22016esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022018 (eval "$ac_try") 2>&5
22019 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022021 (exit $ac_status); }; }; then
22022 ac_cv_x87_double_rounding=no
22023else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022024 echo "$as_me: program exited with status $ac_status" >&5
22025echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022026sed 's/^/| /' conftest.$ac_ext >&5
22027
22028( exit $ac_status )
22029ac_cv_x87_double_rounding=yes
22030fi
22031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22032fi
22033
22034
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022035CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022036{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22037echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022038if test "$ac_cv_x87_double_rounding" = yes
22039then
22040
22041cat >>confdefs.h <<\_ACEOF
22042#define X87_DOUBLE_ROUNDING 1
22043_ACEOF
22044
22045fi
22046
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022047# ************************************
22048# * Check for mathematical functions *
22049# ************************************
22050
22051LIBS_SAVE=$LIBS
22052LIBS="$LIBS $LIBM"
22053
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022054# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22055# -0. on some architectures.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022056{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22057echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022058if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022059 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022060else
22061
22062if test "$cross_compiling" = yes; then
22063 ac_cv_tanh_preserves_zero_sign=no
22064else
22065 cat >conftest.$ac_ext <<_ACEOF
22066/* confdefs.h. */
22067_ACEOF
22068cat confdefs.h >>conftest.$ac_ext
22069cat >>conftest.$ac_ext <<_ACEOF
22070/* end confdefs.h. */
22071
22072#include <math.h>
22073#include <stdlib.h>
22074int main() {
22075 /* return 0 if either negative zeros don't exist
22076 on this platform or if negative zeros exist
22077 and tanh(-0.) == -0. */
22078 if (atan2(0., -1.) == atan2(-0., -1.) ||
22079 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22080 else exit(1);
22081}
22082
22083_ACEOF
22084rm -f conftest$ac_exeext
22085if { (ac_try="$ac_link"
22086case "(($ac_try" in
22087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22088 *) ac_try_echo=$ac_try;;
22089esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022091 (eval "$ac_link") 2>&5
22092 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22095 { (case "(($ac_try" in
22096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22097 *) ac_try_echo=$ac_try;;
22098esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022100 (eval "$ac_try") 2>&5
22101 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022103 (exit $ac_status); }; }; then
22104 ac_cv_tanh_preserves_zero_sign=yes
22105else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022106 echo "$as_me: program exited with status $ac_status" >&5
22107echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022108sed 's/^/| /' conftest.$ac_ext >&5
22109
22110( exit $ac_status )
22111ac_cv_tanh_preserves_zero_sign=no
22112fi
22113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22114fi
22115
22116
22117fi
22118
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022119{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22120echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022121if test "$ac_cv_tanh_preserves_zero_sign" = yes
22122then
22123
22124cat >>confdefs.h <<\_ACEOF
22125#define TANH_PRESERVES_ZERO_SIGN 1
22126_ACEOF
22127
22128fi
22129
22130
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022131
Michael W. Hudson54241132001-12-07 15:38:26 +000022132
Christian Heimes99170a52007-12-19 02:07:34 +000022133
22134
22135
22136
22137
Mark Dickinsonf2537862009-04-18 13:58:18 +000022138
22139for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022140do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022141as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22142{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22143echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022144if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022145 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022146else
22147 cat >conftest.$ac_ext <<_ACEOF
22148/* confdefs.h. */
22149_ACEOF
22150cat confdefs.h >>conftest.$ac_ext
22151cat >>conftest.$ac_ext <<_ACEOF
22152/* end confdefs.h. */
22153/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22154 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22155#define $ac_func innocuous_$ac_func
22156
22157/* System header to define __stub macros and hopefully few prototypes,
22158 which can conflict with char $ac_func (); below.
22159 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22160 <limits.h> exists even on freestanding compilers. */
22161
22162#ifdef __STDC__
22163# include <limits.h>
22164#else
22165# include <assert.h>
22166#endif
22167
22168#undef $ac_func
22169
22170/* Override any GCC internal prototype to avoid an error.
22171 Use char because int might match the return type of a GCC
22172 builtin and then its argument prototype would still apply. */
22173#ifdef __cplusplus
22174extern "C"
22175#endif
22176char $ac_func ();
22177/* The GNU C library defines this for functions which it implements
22178 to always fail with ENOSYS. Some functions are actually named
22179 something starting with __ and the normal name is an alias. */
22180#if defined __stub_$ac_func || defined __stub___$ac_func
22181choke me
22182#endif
22183
22184int
22185main ()
22186{
22187return $ac_func ();
22188 ;
22189 return 0;
22190}
22191_ACEOF
22192rm -f conftest.$ac_objext conftest$ac_exeext
22193if { (ac_try="$ac_link"
22194case "(($ac_try" in
22195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22196 *) ac_try_echo=$ac_try;;
22197esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022199 (eval "$ac_link") 2>conftest.er1
22200 ac_status=$?
22201 grep -v '^ *+' conftest.er1 >conftest.err
22202 rm -f conftest.er1
22203 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022205 (exit $ac_status); } && {
22206 test -z "$ac_c_werror_flag" ||
22207 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022208 } && test -s conftest$ac_exeext &&
22209 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000022210 eval "$as_ac_var=yes"
22211else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022212 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022213sed 's/^/| /' conftest.$ac_ext >&5
22214
22215 eval "$as_ac_var=no"
22216fi
22217
22218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22219 conftest$ac_exeext conftest.$ac_ext
22220fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022221ac_res=`eval echo '${'$as_ac_var'}'`
22222 { echo "$as_me:$LINENO: result: $ac_res" >&5
22223echo "${ECHO_T}$ac_res" >&6; }
22224if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022225 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022226#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022227_ACEOF
22228
22229fi
22230done
22231
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022232{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22233echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022234if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022235 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022236else
22237 cat >conftest.$ac_ext <<_ACEOF
22238/* confdefs.h. */
22239_ACEOF
22240cat confdefs.h >>conftest.$ac_ext
22241cat >>conftest.$ac_ext <<_ACEOF
22242/* end confdefs.h. */
22243#include <math.h>
22244
22245int
22246main ()
22247{
22248#ifndef isinf
22249 (void) isinf;
22250#endif
22251
22252 ;
22253 return 0;
22254}
22255_ACEOF
22256rm -f conftest.$ac_objext
22257if { (ac_try="$ac_compile"
22258case "(($ac_try" in
22259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22260 *) ac_try_echo=$ac_try;;
22261esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022263 (eval "$ac_compile") 2>conftest.er1
22264 ac_status=$?
22265 grep -v '^ *+' conftest.er1 >conftest.err
22266 rm -f conftest.er1
22267 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022269 (exit $ac_status); } && {
22270 test -z "$ac_c_werror_flag" ||
22271 test ! -s conftest.err
22272 } && test -s conftest.$ac_objext; then
22273 ac_cv_have_decl_isinf=yes
22274else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022275 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022276sed 's/^/| /' conftest.$ac_ext >&5
22277
22278 ac_cv_have_decl_isinf=no
22279fi
22280
22281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22282fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022283{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22284echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
22285if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022286
22287cat >>confdefs.h <<_ACEOF
22288#define HAVE_DECL_ISINF 1
22289_ACEOF
22290
22291
22292else
22293 cat >>confdefs.h <<_ACEOF
22294#define HAVE_DECL_ISINF 0
22295_ACEOF
22296
22297
22298fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022299{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22300echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022301if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022302 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022303else
22304 cat >conftest.$ac_ext <<_ACEOF
22305/* confdefs.h. */
22306_ACEOF
22307cat confdefs.h >>conftest.$ac_ext
22308cat >>conftest.$ac_ext <<_ACEOF
22309/* end confdefs.h. */
22310#include <math.h>
22311
22312int
22313main ()
22314{
22315#ifndef isnan
22316 (void) isnan;
22317#endif
22318
22319 ;
22320 return 0;
22321}
22322_ACEOF
22323rm -f conftest.$ac_objext
22324if { (ac_try="$ac_compile"
22325case "(($ac_try" in
22326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22327 *) ac_try_echo=$ac_try;;
22328esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022330 (eval "$ac_compile") 2>conftest.er1
22331 ac_status=$?
22332 grep -v '^ *+' conftest.er1 >conftest.err
22333 rm -f conftest.er1
22334 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022336 (exit $ac_status); } && {
22337 test -z "$ac_c_werror_flag" ||
22338 test ! -s conftest.err
22339 } && test -s conftest.$ac_objext; then
22340 ac_cv_have_decl_isnan=yes
22341else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022342 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022343sed 's/^/| /' conftest.$ac_ext >&5
22344
22345 ac_cv_have_decl_isnan=no
22346fi
22347
22348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22349fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022350{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22351echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22352if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022353
22354cat >>confdefs.h <<_ACEOF
22355#define HAVE_DECL_ISNAN 1
22356_ACEOF
22357
22358
22359else
22360 cat >>confdefs.h <<_ACEOF
22361#define HAVE_DECL_ISNAN 0
22362_ACEOF
22363
22364
22365fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022366{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22367echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022368if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022369 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022370else
22371 cat >conftest.$ac_ext <<_ACEOF
22372/* confdefs.h. */
22373_ACEOF
22374cat confdefs.h >>conftest.$ac_ext
22375cat >>conftest.$ac_ext <<_ACEOF
22376/* end confdefs.h. */
22377#include <math.h>
22378
22379int
22380main ()
22381{
22382#ifndef isfinite
22383 (void) isfinite;
22384#endif
22385
22386 ;
22387 return 0;
22388}
22389_ACEOF
22390rm -f conftest.$ac_objext
22391if { (ac_try="$ac_compile"
22392case "(($ac_try" in
22393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22394 *) ac_try_echo=$ac_try;;
22395esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022397 (eval "$ac_compile") 2>conftest.er1
22398 ac_status=$?
22399 grep -v '^ *+' conftest.er1 >conftest.err
22400 rm -f conftest.er1
22401 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022403 (exit $ac_status); } && {
22404 test -z "$ac_c_werror_flag" ||
22405 test ! -s conftest.err
22406 } && test -s conftest.$ac_objext; then
22407 ac_cv_have_decl_isfinite=yes
22408else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022409 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022410sed 's/^/| /' conftest.$ac_ext >&5
22411
22412 ac_cv_have_decl_isfinite=no
22413fi
22414
22415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22416fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022417{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22418echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22419if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022420
22421cat >>confdefs.h <<_ACEOF
22422#define HAVE_DECL_ISFINITE 1
22423_ACEOF
22424
22425
22426else
22427 cat >>confdefs.h <<_ACEOF
22428#define HAVE_DECL_ISFINITE 0
22429_ACEOF
22430
22431
22432fi
22433
22434
Christian Heimes99170a52007-12-19 02:07:34 +000022435
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022436LIBS=$LIBS_SAVE
22437
Mark Dickinson10683072009-04-18 21:18:19 +000022438# Multiprocessing check for broken sem_getvalue
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022439{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22440echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
22441if test "$cross_compiling" = yes; then
22442 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22443See \`config.log' for more details." >&5
22444echo "$as_me: error: cannot run test program while cross compiling
22445See \`config.log' for more details." >&2;}
22446 { (exit 1); exit 1; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000022447else
22448 cat >conftest.$ac_ext <<_ACEOF
22449/* confdefs.h. */
22450_ACEOF
22451cat confdefs.h >>conftest.$ac_ext
22452cat >>conftest.$ac_ext <<_ACEOF
22453/* end confdefs.h. */
22454
22455#include <unistd.h>
22456#include <fcntl.h>
22457#include <stdio.h>
22458#include <semaphore.h>
22459#include <sys/stat.h>
22460
22461int main(void){
22462 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
22463 int count;
22464 int res;
22465 if(a==SEM_FAILED){
22466 perror("sem_open");
22467 return 1;
22468
22469 }
22470 res = sem_getvalue(a, &count);
22471 sem_close(a);
22472 return res==-1 ? 1 : 0;
22473}
22474
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022475
Mark Dickinson10683072009-04-18 21:18:19 +000022476_ACEOF
22477rm -f conftest$ac_exeext
22478if { (ac_try="$ac_link"
22479case "(($ac_try" in
22480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22481 *) ac_try_echo=$ac_try;;
22482esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022484 (eval "$ac_link") 2>&5
22485 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22488 { (case "(($ac_try" in
22489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22490 *) ac_try_echo=$ac_try;;
22491esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022493 (eval "$ac_try") 2>&5
22494 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022496 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022497 { echo "$as_me:$LINENO: result: no" >&5
22498echo "${ECHO_T}no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022499else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022500 echo "$as_me: program exited with status $ac_status" >&5
22501echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000022502sed 's/^/| /' conftest.$ac_ext >&5
22503
22504( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022505{ echo "$as_me:$LINENO: result: yes" >&5
22506echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022507
22508cat >>confdefs.h <<\_ACEOF
22509#define HAVE_BROKEN_SEM_GETVALUE 1
22510_ACEOF
22511
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022512
22513fi
22514rm -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 +000022515fi
22516
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022517
22518
Mark Dickinsonbd792642009-03-18 20:06:12 +000022519# determine what size digit to use for Python's longs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022520{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
22521echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022522# Check whether --enable-big-digits was given.
22523if test "${enable_big_digits+set}" = set; then
22524 enableval=$enable_big_digits; case $enable_big_digits in
22525yes)
22526 enable_big_digits=30 ;;
22527no)
22528 enable_big_digits=15 ;;
2252915|30)
22530 ;;
22531*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022532 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
22533echo "$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 +000022534 { (exit 1); exit 1; }; } ;;
22535esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022536{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
22537echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022538
22539cat >>confdefs.h <<_ACEOF
22540#define PYLONG_BITS_IN_DIGIT $enable_big_digits
22541_ACEOF
22542
22543
22544else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022545 { echo "$as_me:$LINENO: result: no value specified" >&5
22546echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000022547fi
22548
22549
Guido van Rossumef2255b2000-03-10 22:30:29 +000022550# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022551if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022552 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22553echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022554if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022556fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022557{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22558echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022559else
Martin v. Löwis11437992002-04-12 09:54:03 +000022560 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022561{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22562echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022564/* confdefs.h. */
22565_ACEOF
22566cat confdefs.h >>conftest.$ac_ext
22567cat >>conftest.$ac_ext <<_ACEOF
22568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022569$ac_includes_default
22570#include <wchar.h>
22571_ACEOF
22572rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573if { (ac_try="$ac_compile"
22574case "(($ac_try" in
22575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22576 *) ac_try_echo=$ac_try;;
22577esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022579 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022581 grep -v '^ *+' conftest.er1 >conftest.err
22582 rm -f conftest.er1
22583 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022585 (exit $ac_status); } && {
22586 test -z "$ac_c_werror_flag" ||
22587 test ! -s conftest.err
22588 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 ac_header_compiler=yes
22590else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022592sed 's/^/| /' conftest.$ac_ext >&5
22593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022594 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022596
22597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022598{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22599echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022600
22601# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022602{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22603echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022605/* confdefs.h. */
22606_ACEOF
22607cat confdefs.h >>conftest.$ac_ext
22608cat >>conftest.$ac_ext <<_ACEOF
22609/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022610#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022611_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022612if { (ac_try="$ac_cpp conftest.$ac_ext"
22613case "(($ac_try" in
22614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22615 *) ac_try_echo=$ac_try;;
22616esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022618 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022619 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022620 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 rm -f conftest.er1
22622 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022624 (exit $ac_status); } >/dev/null && {
22625 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22626 test ! -s conftest.err
22627 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022628 ac_header_preproc=yes
22629else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022631sed 's/^/| /' conftest.$ac_ext >&5
22632
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022635
Martin v. Löwis11437992002-04-12 09:54:03 +000022636rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022637{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22638echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022639
22640# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022641case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22642 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022643 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22644echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22645 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22646echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022647 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022648 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022649 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022650 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22651echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
22652 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22653echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22654 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22655echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22656 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22657echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
22658 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22659echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
22660 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22661echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022662 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000022663## -------------------------------------- ##
22664## Report this to http://bugs.python.org/ ##
22665## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022666_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022667 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022668 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022669esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022670{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22671echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022672if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022673 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022674else
22675 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022676fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022677{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22678echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022679
22680fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022681if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022682
22683
22684cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022685#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022686_ACEOF
22687
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022688 wchar_h="yes"
22689
Guido van Rossumef2255b2000-03-10 22:30:29 +000022690else
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022692
22693fi
22694
Michael W. Hudson54241132001-12-07 15:38:26 +000022695
Martin v. Löwis11437992002-04-12 09:54:03 +000022696
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022697# determine wchar_t size
22698if test "$wchar_h" = yes
22699then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022700 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22701echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
22702if test "${ac_cv_type_wchar_t+set}" = set; then
22703 echo $ECHO_N "(cached) $ECHO_C" >&6
22704else
22705 cat >conftest.$ac_ext <<_ACEOF
22706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
22711#include <wchar.h>
22712
22713typedef wchar_t ac__type_new_;
22714int
22715main ()
22716{
22717if ((ac__type_new_ *) 0)
22718 return 0;
22719if (sizeof (ac__type_new_))
22720 return 0;
22721 ;
22722 return 0;
22723}
22724_ACEOF
22725rm -f conftest.$ac_objext
22726if { (ac_try="$ac_compile"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
22731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22732 (eval "$ac_compile") 2>conftest.er1
22733 ac_status=$?
22734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
22737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22738 (exit $ac_status); } && {
22739 test -z "$ac_c_werror_flag" ||
22740 test ! -s conftest.err
22741 } && test -s conftest.$ac_objext; then
22742 ac_cv_type_wchar_t=yes
22743else
22744 echo "$as_me: failed program was:" >&5
22745sed 's/^/| /' conftest.$ac_ext >&5
22746
22747 ac_cv_type_wchar_t=no
22748fi
22749
22750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22751fi
22752{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22753echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22754
22755# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22758# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022759{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22760echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022761if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022763else
Martin v. Löwis11437992002-04-12 09:54:03 +000022764 if test "$cross_compiling" = yes; then
22765 # Depending upon the size, compute the lo and hi bounds.
22766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022767/* confdefs.h. */
22768_ACEOF
22769cat confdefs.h >>conftest.$ac_ext
22770cat >>conftest.$ac_ext <<_ACEOF
22771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022772#include <wchar.h>
22773
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022774 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022775int
22776main ()
22777{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022778static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022779test_array [0] = 0
22780
22781 ;
22782 return 0;
22783}
22784_ACEOF
22785rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022786if { (ac_try="$ac_compile"
22787case "(($ac_try" in
22788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22789 *) ac_try_echo=$ac_try;;
22790esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022794 grep -v '^ *+' conftest.er1 >conftest.err
22795 rm -f conftest.er1
22796 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022798 (exit $ac_status); } && {
22799 test -z "$ac_c_werror_flag" ||
22800 test ! -s conftest.err
22801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022802 ac_lo=0 ac_mid=0
22803 while :; do
22804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022805/* confdefs.h. */
22806_ACEOF
22807cat confdefs.h >>conftest.$ac_ext
22808cat >>conftest.$ac_ext <<_ACEOF
22809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022810#include <wchar.h>
22811
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022812 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022813int
22814main ()
22815{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022816static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022817test_array [0] = 0
22818
22819 ;
22820 return 0;
22821}
22822_ACEOF
22823rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022824if { (ac_try="$ac_compile"
22825case "(($ac_try" in
22826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22827 *) ac_try_echo=$ac_try;;
22828esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022832 grep -v '^ *+' conftest.er1 >conftest.err
22833 rm -f conftest.er1
22834 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022836 (exit $ac_status); } && {
22837 test -z "$ac_c_werror_flag" ||
22838 test ! -s conftest.err
22839 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022840 ac_hi=$ac_mid; break
22841else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022843sed 's/^/| /' conftest.$ac_ext >&5
22844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022845 ac_lo=`expr $ac_mid + 1`
22846 if test $ac_lo -le $ac_mid; then
22847 ac_lo= ac_hi=
22848 break
22849 fi
22850 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022852
22853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022854 done
22855else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022857sed 's/^/| /' conftest.$ac_ext >&5
22858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022860/* confdefs.h. */
22861_ACEOF
22862cat confdefs.h >>conftest.$ac_ext
22863cat >>conftest.$ac_ext <<_ACEOF
22864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022865#include <wchar.h>
22866
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022867 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022868int
22869main ()
22870{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022871static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022872test_array [0] = 0
22873
22874 ;
22875 return 0;
22876}
22877_ACEOF
22878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022879if { (ac_try="$ac_compile"
22880case "(($ac_try" in
22881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22882 *) ac_try_echo=$ac_try;;
22883esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022885 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022887 grep -v '^ *+' conftest.er1 >conftest.err
22888 rm -f conftest.er1
22889 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022891 (exit $ac_status); } && {
22892 test -z "$ac_c_werror_flag" ||
22893 test ! -s conftest.err
22894 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022895 ac_hi=-1 ac_mid=-1
22896 while :; do
22897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022898/* confdefs.h. */
22899_ACEOF
22900cat confdefs.h >>conftest.$ac_ext
22901cat >>conftest.$ac_ext <<_ACEOF
22902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022903#include <wchar.h>
22904
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022905 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022906int
22907main ()
22908{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022909static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022910test_array [0] = 0
22911
22912 ;
22913 return 0;
22914}
22915_ACEOF
22916rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022917if { (ac_try="$ac_compile"
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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022925 grep -v '^ *+' conftest.er1 >conftest.err
22926 rm -f conftest.er1
22927 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022929 (exit $ac_status); } && {
22930 test -z "$ac_c_werror_flag" ||
22931 test ! -s conftest.err
22932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022933 ac_lo=$ac_mid; break
22934else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022936sed 's/^/| /' conftest.$ac_ext >&5
22937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022938 ac_hi=`expr '(' $ac_mid ')' - 1`
22939 if test $ac_mid -le $ac_hi; then
22940 ac_lo= ac_hi=
22941 break
22942 fi
22943 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022945
22946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022947 done
22948else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022950sed 's/^/| /' conftest.$ac_ext >&5
22951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022952 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954
22955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022957
22958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022959# Binary search between lo and hi bounds.
22960while test "x$ac_lo" != "x$ac_hi"; do
22961 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022963/* confdefs.h. */
22964_ACEOF
22965cat confdefs.h >>conftest.$ac_ext
22966cat >>conftest.$ac_ext <<_ACEOF
22967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022968#include <wchar.h>
22969
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022970 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022971int
22972main ()
22973{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022974static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022975test_array [0] = 0
22976
22977 ;
22978 return 0;
22979}
22980_ACEOF
22981rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022982if { (ac_try="$ac_compile"
22983case "(($ac_try" in
22984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22985 *) ac_try_echo=$ac_try;;
22986esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022990 grep -v '^ *+' conftest.er1 >conftest.err
22991 rm -f conftest.er1
22992 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022994 (exit $ac_status); } && {
22995 test -z "$ac_c_werror_flag" ||
22996 test ! -s conftest.err
22997 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022998 ac_hi=$ac_mid
22999else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023000 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023001sed 's/^/| /' conftest.$ac_ext >&5
23002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023003 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023005
23006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023007done
23008case $ac_lo in
23009?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023010'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023011 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023012See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023013echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023014See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023015 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023016 else
23017 ac_cv_sizeof_wchar_t=0
23018 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023019esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023020else
Martin v. Löwis11437992002-04-12 09:54:03 +000023021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023022/* confdefs.h. */
23023_ACEOF
23024cat confdefs.h >>conftest.$ac_ext
23025cat >>conftest.$ac_ext <<_ACEOF
23026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023027#include <wchar.h>
23028
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023029 typedef wchar_t ac__type_sizeof_;
23030static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
23031static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023032#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023033#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023034int
23035main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023036{
Martin v. Löwis11437992002-04-12 09:54:03 +000023037
23038 FILE *f = fopen ("conftest.val", "w");
23039 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023040 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023041 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023042 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023043 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023044 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023045 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023046 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023047 }
23048 else
23049 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023050 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023051 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023052 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023053 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023054 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023055 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023056
23057 ;
23058 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023059}
Martin v. Löwis11437992002-04-12 09:54:03 +000023060_ACEOF
23061rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023062if { (ac_try="$ac_link"
23063case "(($ac_try" in
23064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23065 *) ac_try_echo=$ac_try;;
23066esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023068 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023069 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023072 { (case "(($ac_try" in
23073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23074 *) ac_try_echo=$ac_try;;
23075esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023077 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023078 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023080 (exit $ac_status); }; }; then
23081 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023082else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023083 echo "$as_me: program exited with status $ac_status" >&5
23084echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023085sed 's/^/| /' conftest.$ac_ext >&5
23086
Martin v. Löwis11437992002-04-12 09:54:03 +000023087( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023088if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023089 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023090See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023091echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023092See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023093 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023094 else
23095 ac_cv_sizeof_wchar_t=0
23096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023098rm -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 +000023099fi
23100rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023101fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023102{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23103echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023104
23105
23106
Martin v. Löwis11437992002-04-12 09:54:03 +000023107cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023108#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023109_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023110
Michael W. Hudson54241132001-12-07 15:38:26 +000023111
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023112fi
23113
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023114{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23115echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023116have_ucs4_tcl=no
23117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023118/* confdefs.h. */
23119_ACEOF
23120cat confdefs.h >>conftest.$ac_ext
23121cat >>conftest.$ac_ext <<_ACEOF
23122/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023123
23124#include <tcl.h>
23125#if TCL_UTF_MAX != 6
23126# error "NOT UCS4_TCL"
23127#endif
23128int
23129main ()
23130{
23131
23132 ;
23133 return 0;
23134}
23135_ACEOF
23136rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023137if { (ac_try="$ac_compile"
23138case "(($ac_try" in
23139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23140 *) ac_try_echo=$ac_try;;
23141esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023145 grep -v '^ *+' conftest.er1 >conftest.err
23146 rm -f conftest.er1
23147 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023149 (exit $ac_status); } && {
23150 test -z "$ac_c_werror_flag" ||
23151 test ! -s conftest.err
23152 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023153
23154
23155cat >>confdefs.h <<\_ACEOF
23156#define HAVE_UCS4_TCL 1
23157_ACEOF
23158
23159 have_ucs4_tcl=yes
23160
23161else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023163sed 's/^/| /' conftest.$ac_ext >&5
23164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023165
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023167
23168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023169{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23170echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023171
Skip Montanaro6dead952003-09-25 14:50:04 +000023172# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023173if test "$wchar_h" = yes
23174then
23175 # check whether wchar_t is signed or not
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023176 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23177echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023178 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023179 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023180else
23181
23182 if test "$cross_compiling" = yes; then
23183 ac_cv_wchar_t_signed=yes
23184else
23185 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023186/* confdefs.h. */
23187_ACEOF
23188cat confdefs.h >>conftest.$ac_ext
23189cat >>conftest.$ac_ext <<_ACEOF
23190/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023191
23192 #include <wchar.h>
23193 int main()
23194 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023195 /* Success: exit code 0 */
23196 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023197 }
23198
23199_ACEOF
23200rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023201if { (ac_try="$ac_link"
23202case "(($ac_try" in
23203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23204 *) ac_try_echo=$ac_try;;
23205esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023207 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023208 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023210 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023211 { (case "(($ac_try" in
23212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23213 *) ac_try_echo=$ac_try;;
23214esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023216 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023217 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023219 (exit $ac_status); }; }; then
23220 ac_cv_wchar_t_signed=yes
23221else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023222 echo "$as_me: program exited with status $ac_status" >&5
23223echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023224sed 's/^/| /' conftest.$ac_ext >&5
23225
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023226( exit $ac_status )
23227ac_cv_wchar_t_signed=no
23228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023229rm -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 +000023230fi
23231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023232
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023233fi
23234
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023235 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23236echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023237fi
23238
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023239{ echo "$as_me:$LINENO: checking what type to use for str" >&5
23240echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023241
23242# Check whether --with-wide-unicode was given.
23243if test "${with_wide_unicode+set}" = set; then
23244 withval=$with_wide_unicode;
23245if test "$withval" != no
23246then unicode_size="4"
23247else unicode_size="2"
23248fi
23249
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023250else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023251
Georg Brandl52d168a2008-01-07 18:10:24 +000023252case "$have_ucs4_tcl" in
23253 yes) unicode_size="4" ;;
23254 *) unicode_size="2" ;;
23255esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023256
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023257fi
23258
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023259
23260
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023261
Georg Brandl52d168a2008-01-07 18:10:24 +000023262case "$unicode_size" in
23263 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023264#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023265_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023266 ;;
23267 *) cat >>confdefs.h <<\_ACEOF
23268#define Py_UNICODE_SIZE 2
23269_ACEOF
23270 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023271esac
23272
Michael W. Hudson54241132001-12-07 15:38:26 +000023273
Martin v. Löwis11437992002-04-12 09:54:03 +000023274
23275
Georg Brandl52d168a2008-01-07 18:10:24 +000023276# wchar_t is only usable if it maps to an unsigned type
23277if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023278 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023279then
23280 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023281
Martin v. Löwis11437992002-04-12 09:54:03 +000023282cat >>confdefs.h <<\_ACEOF
23283#define HAVE_USABLE_WCHAR_T 1
23284_ACEOF
23285
Georg Brandl52d168a2008-01-07 18:10:24 +000023286 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023287#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023288_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023289
Georg Brandl52d168a2008-01-07 18:10:24 +000023290elif test "$ac_cv_sizeof_short" = "$unicode_size"
23291then
23292 PY_UNICODE_TYPE="unsigned short"
23293 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023294#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023295_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023296
Georg Brandl52d168a2008-01-07 18:10:24 +000023297elif test "$ac_cv_sizeof_long" = "$unicode_size"
23298then
23299 PY_UNICODE_TYPE="unsigned long"
23300 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023301#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023302_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023303
Georg Brandl52d168a2008-01-07 18:10:24 +000023304else
23305 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023306fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023307{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23308echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023309
23310# check for endianness
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023311{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23312echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023313if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023315else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023316 # See if sys/param.h defines the BYTE_ORDER macro.
23317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023318/* confdefs.h. */
23319_ACEOF
23320cat confdefs.h >>conftest.$ac_ext
23321cat >>conftest.$ac_ext <<_ACEOF
23322/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023323#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023324#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023325
Martin v. Löwis11437992002-04-12 09:54:03 +000023326int
23327main ()
23328{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023329#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
23330 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
23331 bogus endian macros
23332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023333
23334 ;
23335 return 0;
23336}
23337_ACEOF
23338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023339if { (ac_try="$ac_compile"
23340case "(($ac_try" in
23341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23342 *) ac_try_echo=$ac_try;;
23343esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023347 grep -v '^ *+' conftest.er1 >conftest.err
23348 rm -f conftest.er1
23349 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023351 (exit $ac_status); } && {
23352 test -z "$ac_c_werror_flag" ||
23353 test ! -s conftest.err
23354 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023355 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023357/* confdefs.h. */
23358_ACEOF
23359cat confdefs.h >>conftest.$ac_ext
23360cat >>conftest.$ac_ext <<_ACEOF
23361/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023362#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023363#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023364
Martin v. Löwis11437992002-04-12 09:54:03 +000023365int
23366main ()
23367{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023368#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023369 not big endian
23370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023371
23372 ;
23373 return 0;
23374}
23375_ACEOF
23376rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023377if { (ac_try="$ac_compile"
23378case "(($ac_try" in
23379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23380 *) ac_try_echo=$ac_try;;
23381esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023383 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023385 grep -v '^ *+' conftest.er1 >conftest.err
23386 rm -f conftest.er1
23387 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023389 (exit $ac_status); } && {
23390 test -z "$ac_c_werror_flag" ||
23391 test ! -s conftest.err
23392 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023393 ac_cv_c_bigendian=yes
23394else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023395 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023396sed 's/^/| /' conftest.$ac_ext >&5
23397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023398 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023400
23401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023402else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023403 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023404sed 's/^/| /' conftest.$ac_ext >&5
23405
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023406 # It does not; compile a test program.
23407if test "$cross_compiling" = yes; then
23408 # try to guess the endianness by grepping values into an object file
23409 ac_cv_c_bigendian=unknown
23410 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023411/* confdefs.h. */
23412_ACEOF
23413cat confdefs.h >>conftest.$ac_ext
23414cat >>conftest.$ac_ext <<_ACEOF
23415/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023416short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23417short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23418void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
23419short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23420short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23421void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023422int
23423main ()
23424{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023425 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023426 ;
23427 return 0;
23428}
23429_ACEOF
23430rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023431if { (ac_try="$ac_compile"
23432case "(($ac_try" in
23433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23434 *) ac_try_echo=$ac_try;;
23435esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023439 grep -v '^ *+' conftest.er1 >conftest.err
23440 rm -f conftest.er1
23441 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023443 (exit $ac_status); } && {
23444 test -z "$ac_c_werror_flag" ||
23445 test ! -s conftest.err
23446 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023447 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023448 ac_cv_c_bigendian=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023449fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023450if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23451 if test "$ac_cv_c_bigendian" = unknown; then
23452 ac_cv_c_bigendian=no
23453 else
23454 # finding both strings is unlikely to happen, but who knows?
23455 ac_cv_c_bigendian=unknown
23456 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023457fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023458else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023460sed 's/^/| /' conftest.$ac_ext >&5
23461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023462
Martin v. Löwis11437992002-04-12 09:54:03 +000023463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023464
23465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023466else
23467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023468/* confdefs.h. */
23469_ACEOF
23470cat confdefs.h >>conftest.$ac_ext
23471cat >>conftest.$ac_ext <<_ACEOF
23472/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023473$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023474int
23475main ()
23476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023477
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023478 /* Are we little or big endian? From Harbison&Steele. */
23479 union
23480 {
23481 long int l;
23482 char c[sizeof (long int)];
23483 } u;
23484 u.l = 1;
23485 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023486
23487 ;
23488 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023489}
Martin v. Löwis11437992002-04-12 09:54:03 +000023490_ACEOF
23491rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023492if { (ac_try="$ac_link"
23493case "(($ac_try" in
23494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23495 *) ac_try_echo=$ac_try;;
23496esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023498 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023499 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023501 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023502 { (case "(($ac_try" in
23503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23504 *) ac_try_echo=$ac_try;;
23505esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023507 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023508 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023510 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023511 ac_cv_c_bigendian=no
23512else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023513 echo "$as_me: program exited with status $ac_status" >&5
23514echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023515sed 's/^/| /' conftest.$ac_ext >&5
23516
Martin v. Löwis11437992002-04-12 09:54:03 +000023517( exit $ac_status )
23518ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023520rm -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 +000023521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023522
23523
Martin v. Löwis11437992002-04-12 09:54:03 +000023524fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023525
23526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23527fi
23528{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23529echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
23530case $ac_cv_c_bigendian in
23531 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023532
23533cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023534#define WORDS_BIGENDIAN 1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023535_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023536 ;;
23537 no)
23538 ;;
23539 *)
23540 { { echo "$as_me:$LINENO: error: unknown endianness
23541presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23542echo "$as_me: error: unknown endianness
23543presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023544 { (exit 1); exit 1; }; } ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023545esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023546
Michael W. Hudson54241132001-12-07 15:38:26 +000023547
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023548# Check whether right shifting a negative integer extends the sign bit
23549# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023550{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23551echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023552if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023553 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023554else
Martin v. Löwis11437992002-04-12 09:54:03 +000023555
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023556if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023557 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023558else
Martin v. Löwis11437992002-04-12 09:54:03 +000023559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023560/* confdefs.h. */
23561_ACEOF
23562cat confdefs.h >>conftest.$ac_ext
23563cat >>conftest.$ac_ext <<_ACEOF
23564/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023565
23566int main()
23567{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023568 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023569}
23570
Martin v. Löwis11437992002-04-12 09:54:03 +000023571_ACEOF
23572rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023573if { (ac_try="$ac_link"
23574case "(($ac_try" in
23575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23576 *) ac_try_echo=$ac_try;;
23577esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023579 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023580 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023583 { (case "(($ac_try" in
23584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23585 *) ac_try_echo=$ac_try;;
23586esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023588 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023589 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023591 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023592 ac_cv_rshift_extends_sign=yes
23593else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023594 echo "$as_me: program exited with status $ac_status" >&5
23595echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023596sed 's/^/| /' conftest.$ac_ext >&5
23597
Martin v. Löwis11437992002-04-12 09:54:03 +000023598( exit $ac_status )
23599ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023601rm -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 +000023602fi
23603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023604
23605fi
23606
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023607{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23608echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023609if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023610then
Martin v. Löwis11437992002-04-12 09:54:03 +000023611
23612cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023613#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023614_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023615
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023616fi
23617
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023618# check for getc_unlocked and related locking functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023619{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23620echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023621if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023622 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023623else
Martin v. Löwis11437992002-04-12 09:54:03 +000023624
23625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023626/* confdefs.h. */
23627_ACEOF
23628cat confdefs.h >>conftest.$ac_ext
23629cat >>conftest.$ac_ext <<_ACEOF
23630/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023631#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023632int
23633main ()
23634{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023635
23636 FILE *f = fopen("/dev/null", "r");
23637 flockfile(f);
23638 getc_unlocked(f);
23639 funlockfile(f);
23640
Martin v. Löwis11437992002-04-12 09:54:03 +000023641 ;
23642 return 0;
23643}
23644_ACEOF
23645rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023646if { (ac_try="$ac_link"
23647case "(($ac_try" in
23648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23649 *) ac_try_echo=$ac_try;;
23650esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023652 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023654 grep -v '^ *+' conftest.er1 >conftest.err
23655 rm -f conftest.er1
23656 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023658 (exit $ac_status); } && {
23659 test -z "$ac_c_werror_flag" ||
23660 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023661 } && test -s conftest$ac_exeext &&
23662 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023663 ac_cv_have_getc_unlocked=yes
23664else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023666sed 's/^/| /' conftest.$ac_ext >&5
23667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023668 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023670
23671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023672 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023673fi
23674
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023675{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23676echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023677if test "$ac_cv_have_getc_unlocked" = yes
23678then
Martin v. Löwis11437992002-04-12 09:54:03 +000023679
23680cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023681#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023682_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023683
23684fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023685
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023686# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023687# save the value of LIBS so we don't actually link Python with readline
23688LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023689
Gregory P. Smith18820942008-09-07 06:24:49 +000023690# On some systems we need to link readline to a termcap compatible
23691# library. NOTE: Keep the precedence of listed libraries synchronised
23692# with setup.py.
23693py_cv_lib_readline=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023694{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23695echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023696for py_libtermcap in "" ncursesw ncurses curses termcap; do
23697 if test -z "$py_libtermcap"; then
23698 READLINE_LIBS="-lreadline"
23699 else
23700 READLINE_LIBS="-lreadline -l$py_libtermcap"
23701 fi
23702 LIBS="$READLINE_LIBS $LIBS_no_readline"
23703 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023704/* confdefs.h. */
23705_ACEOF
23706cat confdefs.h >>conftest.$ac_ext
23707cat >>conftest.$ac_ext <<_ACEOF
23708/* end confdefs.h. */
23709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023710/* Override any GCC internal prototype to avoid an error.
23711 Use char because int might match the return type of a GCC
23712 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023713#ifdef __cplusplus
23714extern "C"
23715#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023716char readline ();
23717int
23718main ()
23719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023720return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023721 ;
23722 return 0;
23723}
23724_ACEOF
23725rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023726if { (ac_try="$ac_link"
23727case "(($ac_try" in
23728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23729 *) ac_try_echo=$ac_try;;
23730esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023732 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023733 ac_status=$?
23734 grep -v '^ *+' conftest.er1 >conftest.err
23735 rm -f conftest.er1
23736 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023738 (exit $ac_status); } && {
23739 test -z "$ac_c_werror_flag" ||
23740 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023741 } && test -s conftest$ac_exeext &&
23742 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000023743 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023744else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023745 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023746sed 's/^/| /' conftest.$ac_ext >&5
23747
Gregory P. Smith18820942008-09-07 06:24:49 +000023748
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023750
23751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023752 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000023753 if test $py_cv_lib_readline = yes; then
23754 break
23755 fi
23756done
23757# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23758#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000023759if test $py_cv_lib_readline = no; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023760 { echo "$as_me:$LINENO: result: none" >&5
23761echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023762else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023763 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23764echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023765
23766cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023767#define HAVE_LIBREADLINE 1
23768_ACEOF
23769
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023770fi
23771
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023772# check for readline 2.1
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023773{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23774echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023775if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023776 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023777else
23778 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023779LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023780cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023781/* confdefs.h. */
23782_ACEOF
23783cat confdefs.h >>conftest.$ac_ext
23784cat >>conftest.$ac_ext <<_ACEOF
23785/* end confdefs.h. */
23786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023787/* Override any GCC internal prototype to avoid an error.
23788 Use char because int might match the return type of a GCC
23789 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023790#ifdef __cplusplus
23791extern "C"
23792#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023793char rl_callback_handler_install ();
23794int
23795main ()
23796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023797return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023798 ;
23799 return 0;
23800}
23801_ACEOF
23802rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023803if { (ac_try="$ac_link"
23804case "(($ac_try" in
23805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23806 *) ac_try_echo=$ac_try;;
23807esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023809 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023811 grep -v '^ *+' conftest.er1 >conftest.err
23812 rm -f conftest.er1
23813 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023815 (exit $ac_status); } && {
23816 test -z "$ac_c_werror_flag" ||
23817 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023818 } && test -s conftest$ac_exeext &&
23819 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023820 ac_cv_lib_readline_rl_callback_handler_install=yes
23821else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023822 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023823sed 's/^/| /' conftest.$ac_ext >&5
23824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023825 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023827
23828rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023829 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023830LIBS=$ac_check_lib_save_LIBS
23831fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023832{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23833echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
23834if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023835
23836cat >>confdefs.h <<\_ACEOF
23837#define HAVE_RL_CALLBACK 1
23838_ACEOF
23839
23840fi
23841
23842
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023843# check for readline 2.2
23844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023850#include <readline/readline.h>
23851_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023852if { (ac_try="$ac_cpp conftest.$ac_ext"
23853case "(($ac_try" in
23854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23855 *) ac_try_echo=$ac_try;;
23856esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023859 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023860 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023861 rm -f conftest.er1
23862 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023864 (exit $ac_status); } >/dev/null && {
23865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23866 test ! -s conftest.err
23867 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023868 have_readline=yes
23869else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023871sed 's/^/| /' conftest.$ac_ext >&5
23872
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023873 have_readline=no
23874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023875
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023876rm -f conftest.err conftest.$ac_ext
23877if test $have_readline = yes
23878then
23879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023880/* confdefs.h. */
23881_ACEOF
23882cat confdefs.h >>conftest.$ac_ext
23883cat >>conftest.$ac_ext <<_ACEOF
23884/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023885#include <readline/readline.h>
23886
23887_ACEOF
23888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023889 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023890
23891cat >>confdefs.h <<\_ACEOF
23892#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23893_ACEOF
23894
23895fi
23896rm -f conftest*
23897
23898fi
23899
Martin v. Löwis0daad592001-09-30 21:09:59 +000023900# check for readline 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023901{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23902echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023903if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023905else
Martin v. Löwis11437992002-04-12 09:54:03 +000023906 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023907LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023909/* confdefs.h. */
23910_ACEOF
23911cat confdefs.h >>conftest.$ac_ext
23912cat >>conftest.$ac_ext <<_ACEOF
23913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023915/* Override any GCC internal prototype to avoid an error.
23916 Use char because int might match the return type of a GCC
23917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023918#ifdef __cplusplus
23919extern "C"
23920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023921char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023922int
23923main ()
23924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023925return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023926 ;
23927 return 0;
23928}
23929_ACEOF
23930rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023931if { (ac_try="$ac_link"
23932case "(($ac_try" in
23933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23934 *) ac_try_echo=$ac_try;;
23935esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023937 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023939 grep -v '^ *+' conftest.er1 >conftest.err
23940 rm -f conftest.er1
23941 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023943 (exit $ac_status); } && {
23944 test -z "$ac_c_werror_flag" ||
23945 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023946 } && test -s conftest$ac_exeext &&
23947 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023948 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023949else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023951sed 's/^/| /' conftest.$ac_ext >&5
23952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023953 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023955
23956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023957 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023958LIBS=$ac_check_lib_save_LIBS
23959fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023960{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23961echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
23962if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023963
Martin v. Löwis11437992002-04-12 09:54:03 +000023964cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023965#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023966_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023967
Martin v. Löwis0daad592001-09-30 21:09:59 +000023968fi
23969
Michael W. Hudson54241132001-12-07 15:38:26 +000023970
Thomas Wouters89d996e2007-09-08 17:39:28 +000023971# also in 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023972{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23973echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000023974if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023975 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000023976else
23977 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023978LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000023979cat >conftest.$ac_ext <<_ACEOF
23980/* confdefs.h. */
23981_ACEOF
23982cat confdefs.h >>conftest.$ac_ext
23983cat >>conftest.$ac_ext <<_ACEOF
23984/* end confdefs.h. */
23985
23986/* Override any GCC internal prototype to avoid an error.
23987 Use char because int might match the return type of a GCC
23988 builtin and then its argument prototype would still apply. */
23989#ifdef __cplusplus
23990extern "C"
23991#endif
23992char rl_completion_display_matches_hook ();
23993int
23994main ()
23995{
23996return rl_completion_display_matches_hook ();
23997 ;
23998 return 0;
23999}
24000_ACEOF
24001rm -f conftest.$ac_objext conftest$ac_exeext
24002if { (ac_try="$ac_link"
24003case "(($ac_try" in
24004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24005 *) ac_try_echo=$ac_try;;
24006esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024008 (eval "$ac_link") 2>conftest.er1
24009 ac_status=$?
24010 grep -v '^ *+' conftest.er1 >conftest.err
24011 rm -f conftest.er1
24012 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024014 (exit $ac_status); } && {
24015 test -z "$ac_c_werror_flag" ||
24016 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024017 } && test -s conftest$ac_exeext &&
24018 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024019 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24020else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024021 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024022sed 's/^/| /' conftest.$ac_ext >&5
24023
24024 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24025fi
24026
24027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24028 conftest$ac_exeext conftest.$ac_ext
24029LIBS=$ac_check_lib_save_LIBS
24030fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024031{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24032echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24033if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024034
24035cat >>confdefs.h <<\_ACEOF
24036#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24037_ACEOF
24038
24039fi
24040
24041
Martin v. Löwis0daad592001-09-30 21:09:59 +000024042# check for readline 4.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024043{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24044echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024045if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024046 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024047else
Martin v. Löwis11437992002-04-12 09:54:03 +000024048 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024049LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024050cat >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
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024057/* Override any GCC internal prototype to avoid an error.
24058 Use char because int might match the return type of a GCC
24059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024060#ifdef __cplusplus
24061extern "C"
24062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024063char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024064int
24065main ()
24066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024067return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024068 ;
24069 return 0;
24070}
24071_ACEOF
24072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024073if { (ac_try="$ac_link"
24074case "(($ac_try" in
24075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24076 *) ac_try_echo=$ac_try;;
24077esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024081 grep -v '^ *+' conftest.er1 >conftest.err
24082 rm -f conftest.er1
24083 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024085 (exit $ac_status); } && {
24086 test -z "$ac_c_werror_flag" ||
24087 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024088 } && test -s conftest$ac_exeext &&
24089 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024090 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024091else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024093sed 's/^/| /' conftest.$ac_ext >&5
24094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024095 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024097
24098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024100LIBS=$ac_check_lib_save_LIBS
24101fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024102{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24103echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
24104if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024105
Martin v. Löwis11437992002-04-12 09:54:03 +000024106cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024107#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024108_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024109
Guido van Rossum353ae582001-07-10 16:45:32 +000024110fi
24111
Jack Jansendd19cf82001-12-06 22:36:17 +000024112
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024113# also in readline 4.2
24114cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024115/* confdefs.h. */
24116_ACEOF
24117cat confdefs.h >>conftest.$ac_ext
24118cat >>conftest.$ac_ext <<_ACEOF
24119/* end confdefs.h. */
24120#include <readline/readline.h>
24121_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024122if { (ac_try="$ac_cpp conftest.$ac_ext"
24123case "(($ac_try" in
24124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24125 *) ac_try_echo=$ac_try;;
24126esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024128 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024129 ac_status=$?
24130 grep -v '^ *+' conftest.er1 >conftest.err
24131 rm -f conftest.er1
24132 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024134 (exit $ac_status); } >/dev/null && {
24135 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24136 test ! -s conftest.err
24137 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024138 have_readline=yes
24139else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024140 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024141sed 's/^/| /' conftest.$ac_ext >&5
24142
24143 have_readline=no
24144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024145
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024146rm -f conftest.err conftest.$ac_ext
24147if test $have_readline = yes
24148then
24149 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024150/* confdefs.h. */
24151_ACEOF
24152cat confdefs.h >>conftest.$ac_ext
24153cat >>conftest.$ac_ext <<_ACEOF
24154/* end confdefs.h. */
24155#include <readline/readline.h>
24156
24157_ACEOF
24158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24159 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24160
24161cat >>confdefs.h <<\_ACEOF
24162#define HAVE_RL_CATCH_SIGNAL 1
24163_ACEOF
24164
24165fi
24166rm -f conftest*
24167
24168fi
24169
Martin v. Löwis82bca632006-02-10 20:49:30 +000024170# End of readline checks: restore LIBS
24171LIBS=$LIBS_no_readline
24172
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024173{ echo "$as_me:$LINENO: checking for broken nice()" >&5
24174echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024175if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024176 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024177else
Martin v. Löwis11437992002-04-12 09:54:03 +000024178
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024179if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024180 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024181else
Martin v. Löwis11437992002-04-12 09:54:03 +000024182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024183/* confdefs.h. */
24184_ACEOF
24185cat confdefs.h >>conftest.$ac_ext
24186cat >>conftest.$ac_ext <<_ACEOF
24187/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024188
24189int main()
24190{
24191 int val1 = nice(1);
24192 if (val1 != -1 && val1 == nice(2))
24193 exit(0);
24194 exit(1);
24195}
24196
Martin v. Löwis11437992002-04-12 09:54:03 +000024197_ACEOF
24198rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024199if { (ac_try="$ac_link"
24200case "(($ac_try" in
24201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24202 *) ac_try_echo=$ac_try;;
24203esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024205 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024206 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024209 { (case "(($ac_try" in
24210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24211 *) ac_try_echo=$ac_try;;
24212esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024214 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024215 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024217 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024218 ac_cv_broken_nice=yes
24219else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024220 echo "$as_me: program exited with status $ac_status" >&5
24221echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024222sed 's/^/| /' conftest.$ac_ext >&5
24223
Martin v. Löwis11437992002-04-12 09:54:03 +000024224( exit $ac_status )
24225ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024227rm -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 +000024228fi
24229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024230
24231fi
24232
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024233{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24234echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024235if test "$ac_cv_broken_nice" = yes
24236then
Martin v. Löwis11437992002-04-12 09:54:03 +000024237
24238cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024239#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024240_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024241
24242fi
24243
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024244{ echo "$as_me:$LINENO: checking for broken poll()" >&5
24245echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
24246if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024247 ac_cv_broken_poll=no
24248else
24249 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024250/* confdefs.h. */
24251_ACEOF
24252cat confdefs.h >>conftest.$ac_ext
24253cat >>conftest.$ac_ext <<_ACEOF
24254/* end confdefs.h. */
24255
24256#include <poll.h>
24257
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024258int main (void)
24259 {
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024260 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24261
24262 close (42);
24263
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024264 int poll_test = poll (&poll_struct, 1, 0);
24265
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024266 if (poll_test < 0)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024267 {
24268 exit(0);
24269 }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024270 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024271 {
24272 exit(0);
24273 }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024274 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024275 {
24276 exit(1);
24277 }
24278 }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024279
24280_ACEOF
24281rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024282if { (ac_try="$ac_link"
24283case "(($ac_try" in
24284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24285 *) ac_try_echo=$ac_try;;
24286esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024288 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024289 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024292 { (case "(($ac_try" in
24293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24294 *) ac_try_echo=$ac_try;;
24295esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024297 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024298 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024300 (exit $ac_status); }; }; then
24301 ac_cv_broken_poll=yes
24302else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024303 echo "$as_me: program exited with status $ac_status" >&5
24304echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024305sed 's/^/| /' conftest.$ac_ext >&5
24306
24307( exit $ac_status )
24308ac_cv_broken_poll=no
24309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024310rm -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 +000024311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024312
24313
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024314{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24315echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024316if test "$ac_cv_broken_poll" = yes
24317then
24318
24319cat >>confdefs.h <<\_ACEOF
24320#define HAVE_BROKEN_POLL 1
24321_ACEOF
24322
24323fi
24324
Brett Cannon43802422005-02-10 20:48:03 +000024325# 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 +000024326# (which is not required by ISO C or UNIX spec) and/or if we support
24327# tzname[]
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024328{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24329echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024330if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024331 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024332else
24333 cat >conftest.$ac_ext <<_ACEOF
24334/* confdefs.h. */
24335_ACEOF
24336cat confdefs.h >>conftest.$ac_ext
24337cat >>conftest.$ac_ext <<_ACEOF
24338/* end confdefs.h. */
24339#include <sys/types.h>
24340#include <$ac_cv_struct_tm>
24341
24342
24343int
24344main ()
24345{
24346static struct tm ac_aggr;
24347if (ac_aggr.tm_zone)
24348return 0;
24349 ;
24350 return 0;
24351}
24352_ACEOF
24353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354if { (ac_try="$ac_compile"
24355case "(($ac_try" in
24356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24357 *) ac_try_echo=$ac_try;;
24358esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024361 ac_status=$?
24362 grep -v '^ *+' conftest.er1 >conftest.err
24363 rm -f conftest.er1
24364 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024366 (exit $ac_status); } && {
24367 test -z "$ac_c_werror_flag" ||
24368 test ! -s conftest.err
24369 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024370 ac_cv_member_struct_tm_tm_zone=yes
24371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024372 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024373sed 's/^/| /' conftest.$ac_ext >&5
24374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024375 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024376/* confdefs.h. */
24377_ACEOF
24378cat confdefs.h >>conftest.$ac_ext
24379cat >>conftest.$ac_ext <<_ACEOF
24380/* end confdefs.h. */
24381#include <sys/types.h>
24382#include <$ac_cv_struct_tm>
24383
24384
24385int
24386main ()
24387{
24388static struct tm ac_aggr;
24389if (sizeof ac_aggr.tm_zone)
24390return 0;
24391 ;
24392 return 0;
24393}
24394_ACEOF
24395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024396if { (ac_try="$ac_compile"
24397case "(($ac_try" in
24398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24399 *) ac_try_echo=$ac_try;;
24400esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024402 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024403 ac_status=$?
24404 grep -v '^ *+' conftest.er1 >conftest.err
24405 rm -f conftest.er1
24406 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408 (exit $ac_status); } && {
24409 test -z "$ac_c_werror_flag" ||
24410 test ! -s conftest.err
24411 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024412 ac_cv_member_struct_tm_tm_zone=yes
24413else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024414 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024415sed 's/^/| /' conftest.$ac_ext >&5
24416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024419
24420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024422
24423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024424fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024425{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24426echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
24427if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024428
24429cat >>confdefs.h <<_ACEOF
24430#define HAVE_STRUCT_TM_TM_ZONE 1
24431_ACEOF
24432
24433
24434fi
24435
24436if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24437
24438cat >>confdefs.h <<\_ACEOF
24439#define HAVE_TM_ZONE 1
24440_ACEOF
24441
24442else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024443 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24444echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024445if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024446 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024447else
24448 cat >conftest.$ac_ext <<_ACEOF
24449/* confdefs.h. */
24450_ACEOF
24451cat confdefs.h >>conftest.$ac_ext
24452cat >>conftest.$ac_ext <<_ACEOF
24453/* end confdefs.h. */
24454#include <time.h>
24455
24456int
24457main ()
24458{
24459#ifndef tzname
24460 (void) tzname;
24461#endif
24462
24463 ;
24464 return 0;
24465}
24466_ACEOF
24467rm -f conftest.$ac_objext
24468if { (ac_try="$ac_compile"
24469case "(($ac_try" in
24470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24471 *) ac_try_echo=$ac_try;;
24472esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024474 (eval "$ac_compile") 2>conftest.er1
24475 ac_status=$?
24476 grep -v '^ *+' conftest.er1 >conftest.err
24477 rm -f conftest.er1
24478 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024480 (exit $ac_status); } && {
24481 test -z "$ac_c_werror_flag" ||
24482 test ! -s conftest.err
24483 } && test -s conftest.$ac_objext; then
24484 ac_cv_have_decl_tzname=yes
24485else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024486 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487sed 's/^/| /' conftest.$ac_ext >&5
24488
24489 ac_cv_have_decl_tzname=no
24490fi
24491
24492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24493fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024494{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24495echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24496if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024497
24498cat >>confdefs.h <<_ACEOF
24499#define HAVE_DECL_TZNAME 1
24500_ACEOF
24501
24502
24503else
24504 cat >>confdefs.h <<_ACEOF
24505#define HAVE_DECL_TZNAME 0
24506_ACEOF
24507
24508
24509fi
24510
24511
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024512 { echo "$as_me:$LINENO: checking for tzname" >&5
24513echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024514if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024515 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000024516else
24517 cat >conftest.$ac_ext <<_ACEOF
24518/* confdefs.h. */
24519_ACEOF
24520cat confdefs.h >>conftest.$ac_ext
24521cat >>conftest.$ac_ext <<_ACEOF
24522/* end confdefs.h. */
24523#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024524#if !HAVE_DECL_TZNAME
24525extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024526#endif
24527
24528int
24529main ()
24530{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024531return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024532 ;
24533 return 0;
24534}
24535_ACEOF
24536rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024537if { (ac_try="$ac_link"
24538case "(($ac_try" in
24539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24540 *) ac_try_echo=$ac_try;;
24541esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024543 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024544 ac_status=$?
24545 grep -v '^ *+' conftest.er1 >conftest.err
24546 rm -f conftest.er1
24547 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549 (exit $ac_status); } && {
24550 test -z "$ac_c_werror_flag" ||
24551 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024552 } && test -s conftest$ac_exeext &&
24553 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024554 ac_cv_var_tzname=yes
24555else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024556 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024557sed 's/^/| /' conftest.$ac_ext >&5
24558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024559 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024561
24562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024563 conftest$ac_exeext conftest.$ac_ext
24564fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024565{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24566echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024567 if test $ac_cv_var_tzname = yes; then
24568
24569cat >>confdefs.h <<\_ACEOF
24570#define HAVE_TZNAME 1
24571_ACEOF
24572
24573 fi
24574fi
24575
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024576
Martin v. Löwis1d459062005-03-14 21:23:33 +000024577# check tzset(3) exists and works like we expect it to
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024578{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24579echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024580if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024581 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024582else
24583
24584if test "$cross_compiling" = yes; then
24585 ac_cv_working_tzset=no
24586else
24587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024588/* confdefs.h. */
24589_ACEOF
24590cat confdefs.h >>conftest.$ac_ext
24591cat >>conftest.$ac_ext <<_ACEOF
24592/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024593
24594#include <stdlib.h>
24595#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024596#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024597
24598#if HAVE_TZNAME
24599extern char *tzname[];
24600#endif
24601
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024602int main()
24603{
Brett Cannon18367812003-09-19 00:59:16 +000024604 /* Note that we need to ensure that not only does tzset(3)
24605 do 'something' with localtime, but it works as documented
24606 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024607 This includes making sure that tzname is set properly if
24608 tm->tm_zone does not exist since it is the alternative way
24609 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024610
24611 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024612 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024613 */
24614
Martin v. Löwis1d459062005-03-14 21:23:33 +000024615 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024616 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24617
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024618 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024619 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024620 if (localtime(&groundhogday)->tm_hour != 0)
24621 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024622#if HAVE_TZNAME
24623 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24624 if (strcmp(tzname[0], "UTC") ||
24625 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24626 exit(1);
24627#endif
Brett Cannon18367812003-09-19 00:59:16 +000024628
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024629 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024630 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024631 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024632 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024633#if HAVE_TZNAME
24634 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24635 exit(1);
24636#endif
Brett Cannon18367812003-09-19 00:59:16 +000024637
24638 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24639 tzset();
24640 if (localtime(&groundhogday)->tm_hour != 11)
24641 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024642#if HAVE_TZNAME
24643 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24644 exit(1);
24645#endif
24646
24647#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024648 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24649 exit(1);
24650 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24651 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024652#endif
Brett Cannon18367812003-09-19 00:59:16 +000024653
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024654 exit(0);
24655}
24656
24657_ACEOF
24658rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024659if { (ac_try="$ac_link"
24660case "(($ac_try" in
24661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24662 *) ac_try_echo=$ac_try;;
24663esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024666 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024668 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024669 { (case "(($ac_try" in
24670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24671 *) ac_try_echo=$ac_try;;
24672esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024674 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024675 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024677 (exit $ac_status); }; }; then
24678 ac_cv_working_tzset=yes
24679else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024680 echo "$as_me: program exited with status $ac_status" >&5
24681echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024682sed 's/^/| /' conftest.$ac_ext >&5
24683
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024684( exit $ac_status )
24685ac_cv_working_tzset=no
24686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024687rm -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 +000024688fi
24689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024690
24691fi
24692
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024693{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24694echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024695if test "$ac_cv_working_tzset" = yes
24696then
24697
24698cat >>confdefs.h <<\_ACEOF
24699#define HAVE_WORKING_TZSET 1
24700_ACEOF
24701
24702fi
24703
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024704# Look for subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024705{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24706echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024707if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024708 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024709else
24710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024711/* confdefs.h. */
24712_ACEOF
24713cat confdefs.h >>conftest.$ac_ext
24714cat >>conftest.$ac_ext <<_ACEOF
24715/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024716#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024717int
24718main ()
24719{
24720
24721struct stat st;
24722st.st_mtim.tv_nsec = 1;
24723
24724 ;
24725 return 0;
24726}
24727_ACEOF
24728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024729if { (ac_try="$ac_compile"
24730case "(($ac_try" in
24731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24732 *) ac_try_echo=$ac_try;;
24733esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024737 grep -v '^ *+' conftest.er1 >conftest.err
24738 rm -f conftest.er1
24739 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 (exit $ac_status); } && {
24742 test -z "$ac_c_werror_flag" ||
24743 test ! -s conftest.err
24744 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024745 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024746else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024748sed 's/^/| /' conftest.$ac_ext >&5
24749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024750 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024751fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24754fi
24755
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024756{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24757echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024758if test "$ac_cv_stat_tv_nsec" = yes
24759then
24760
24761cat >>confdefs.h <<\_ACEOF
24762#define HAVE_STAT_TV_NSEC 1
24763_ACEOF
24764
24765fi
24766
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024767# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024768{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24769echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024770if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024771 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024772else
24773 cat >conftest.$ac_ext <<_ACEOF
24774/* confdefs.h. */
24775_ACEOF
24776cat confdefs.h >>conftest.$ac_ext
24777cat >>conftest.$ac_ext <<_ACEOF
24778/* end confdefs.h. */
24779#include <sys/stat.h>
24780int
24781main ()
24782{
24783
24784struct stat st;
24785st.st_mtimespec.tv_nsec = 1;
24786
24787 ;
24788 return 0;
24789}
24790_ACEOF
24791rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024792if { (ac_try="$ac_compile"
24793case "(($ac_try" in
24794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24795 *) ac_try_echo=$ac_try;;
24796esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024799 ac_status=$?
24800 grep -v '^ *+' conftest.er1 >conftest.err
24801 rm -f conftest.er1
24802 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024804 (exit $ac_status); } && {
24805 test -z "$ac_c_werror_flag" ||
24806 test ! -s conftest.err
24807 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024808 ac_cv_stat_tv_nsec2=yes
24809else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024810 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024811sed 's/^/| /' conftest.$ac_ext >&5
24812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024814fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24817fi
24818
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024819{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24820echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024821if test "$ac_cv_stat_tv_nsec2" = yes
24822then
24823
24824cat >>confdefs.h <<\_ACEOF
24825#define HAVE_STAT_TV_NSEC2 1
24826_ACEOF
24827
24828fi
24829
Jack Jansen666b1e72001-10-31 12:11:48 +000024830# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024831{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24832echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024833if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024834 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024835else
Martin v. Löwis11437992002-04-12 09:54:03 +000024836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024837/* confdefs.h. */
24838_ACEOF
24839cat confdefs.h >>conftest.$ac_ext
24840cat >>conftest.$ac_ext <<_ACEOF
24841/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024842#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024843int
24844main ()
24845{
Jack Jansen666b1e72001-10-31 12:11:48 +000024846
24847 int rtn;
24848 rtn = mvwdelch(0,0,0);
24849
Martin v. Löwis11437992002-04-12 09:54:03 +000024850 ;
24851 return 0;
24852}
24853_ACEOF
24854rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024855if { (ac_try="$ac_compile"
24856case "(($ac_try" in
24857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24858 *) ac_try_echo=$ac_try;;
24859esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024863 grep -v '^ *+' conftest.er1 >conftest.err
24864 rm -f conftest.er1
24865 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024867 (exit $ac_status); } && {
24868 test -z "$ac_c_werror_flag" ||
24869 test ! -s conftest.err
24870 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024871 ac_cv_mvwdelch_is_expression=yes
24872else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024874sed 's/^/| /' conftest.$ac_ext >&5
24875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024876 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024877fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24880fi
24881
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024882{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24883echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024884
24885if test "$ac_cv_mvwdelch_is_expression" = yes
24886then
Martin v. Löwis11437992002-04-12 09:54:03 +000024887
24888cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024889#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024890_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024891
24892fi
24893
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024894{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24895echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024896if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024897 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024898else
Martin v. Löwis11437992002-04-12 09:54:03 +000024899 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024900/* confdefs.h. */
24901_ACEOF
24902cat confdefs.h >>conftest.$ac_ext
24903cat >>conftest.$ac_ext <<_ACEOF
24904/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024905#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024906int
24907main ()
24908{
Jack Jansen666b1e72001-10-31 12:11:48 +000024909
24910 WINDOW *w;
24911 w->_flags = 0;
24912
Martin v. Löwis11437992002-04-12 09:54:03 +000024913 ;
24914 return 0;
24915}
24916_ACEOF
24917rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024918if { (ac_try="$ac_compile"
24919case "(($ac_try" in
24920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24921 *) ac_try_echo=$ac_try;;
24922esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024926 grep -v '^ *+' conftest.er1 >conftest.err
24927 rm -f conftest.er1
24928 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024930 (exit $ac_status); } && {
24931 test -z "$ac_c_werror_flag" ||
24932 test ! -s conftest.err
24933 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024934 ac_cv_window_has_flags=yes
24935else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024936 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024937sed 's/^/| /' conftest.$ac_ext >&5
24938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024939 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024940fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24943fi
24944
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024945{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24946echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024947
Jack Jansen666b1e72001-10-31 12:11:48 +000024948
24949if test "$ac_cv_window_has_flags" = yes
24950then
Martin v. Löwis11437992002-04-12 09:54:03 +000024951
24952cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024953#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024954_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024955
24956fi
24957
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024958{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24959echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024960cat >conftest.$ac_ext <<_ACEOF
24961/* confdefs.h. */
24962_ACEOF
24963cat confdefs.h >>conftest.$ac_ext
24964cat >>conftest.$ac_ext <<_ACEOF
24965/* end confdefs.h. */
24966#include <curses.h>
24967int
24968main ()
24969{
24970void *x=is_term_resized
24971 ;
24972 return 0;
24973}
24974_ACEOF
24975rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024976if { (ac_try="$ac_compile"
24977case "(($ac_try" in
24978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24979 *) ac_try_echo=$ac_try;;
24980esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024982 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024983 ac_status=$?
24984 grep -v '^ *+' conftest.er1 >conftest.err
24985 rm -f conftest.er1
24986 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024988 (exit $ac_status); } && {
24989 test -z "$ac_c_werror_flag" ||
24990 test ! -s conftest.err
24991 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024992
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024993cat >>confdefs.h <<\_ACEOF
24994#define HAVE_CURSES_IS_TERM_RESIZED 1
24995_ACEOF
24996
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024997 { echo "$as_me:$LINENO: result: yes" >&5
24998echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024999else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025000 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025001sed 's/^/| /' conftest.$ac_ext >&5
25002
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025003 { echo "$as_me:$LINENO: result: no" >&5
25004echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025005
25006fi
25007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25009
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025010{ echo "$as_me:$LINENO: checking for resize_term" >&5
25011echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025012cat >conftest.$ac_ext <<_ACEOF
25013/* confdefs.h. */
25014_ACEOF
25015cat confdefs.h >>conftest.$ac_ext
25016cat >>conftest.$ac_ext <<_ACEOF
25017/* end confdefs.h. */
25018#include <curses.h>
25019int
25020main ()
25021{
25022void *x=resize_term
25023 ;
25024 return 0;
25025}
25026_ACEOF
25027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025028if { (ac_try="$ac_compile"
25029case "(($ac_try" in
25030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25031 *) ac_try_echo=$ac_try;;
25032esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025034 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025035 ac_status=$?
25036 grep -v '^ *+' conftest.er1 >conftest.err
25037 rm -f conftest.er1
25038 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025040 (exit $ac_status); } && {
25041 test -z "$ac_c_werror_flag" ||
25042 test ! -s conftest.err
25043 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025044
25045cat >>confdefs.h <<\_ACEOF
25046#define HAVE_CURSES_RESIZE_TERM 1
25047_ACEOF
25048
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025049 { echo "$as_me:$LINENO: result: yes" >&5
25050echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025051else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025052 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025053sed 's/^/| /' conftest.$ac_ext >&5
25054
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025055 { echo "$as_me:$LINENO: result: no" >&5
25056echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025057
25058fi
25059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25061
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025062{ echo "$as_me:$LINENO: checking for resizeterm" >&5
25063echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025064cat >conftest.$ac_ext <<_ACEOF
25065/* confdefs.h. */
25066_ACEOF
25067cat confdefs.h >>conftest.$ac_ext
25068cat >>conftest.$ac_ext <<_ACEOF
25069/* end confdefs.h. */
25070#include <curses.h>
25071int
25072main ()
25073{
25074void *x=resizeterm
25075 ;
25076 return 0;
25077}
25078_ACEOF
25079rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025080if { (ac_try="$ac_compile"
25081case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025086 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025087 ac_status=$?
25088 grep -v '^ *+' conftest.er1 >conftest.err
25089 rm -f conftest.er1
25090 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025092 (exit $ac_status); } && {
25093 test -z "$ac_c_werror_flag" ||
25094 test ! -s conftest.err
25095 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025096
25097cat >>confdefs.h <<\_ACEOF
25098#define HAVE_CURSES_RESIZETERM 1
25099_ACEOF
25100
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025101 { echo "$as_me:$LINENO: result: yes" >&5
25102echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025103else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025104 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025105sed 's/^/| /' conftest.$ac_ext >&5
25106
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025107 { echo "$as_me:$LINENO: result: no" >&5
25108echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025109
25110fi
25111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25113
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025114{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25115echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025116
25117if test -r /dev/ptmx
25118then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025119 { echo "$as_me:$LINENO: result: yes" >&5
25120echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025121
25122cat >>confdefs.h <<\_ACEOF
25123#define HAVE_DEV_PTMX 1
25124_ACEOF
25125
Thomas Wouters89f507f2006-12-13 04:49:30 +000025126else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025127 { echo "$as_me:$LINENO: result: no" >&5
25128echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025129fi
25130
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025131{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25132echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025133
25134if test -r /dev/ptc
25135then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025136 { echo "$as_me:$LINENO: result: yes" >&5
25137echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025138
25139cat >>confdefs.h <<\_ACEOF
25140#define HAVE_DEV_PTC 1
25141_ACEOF
25142
Thomas Wouters89f507f2006-12-13 04:49:30 +000025143else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025144 { echo "$as_me:$LINENO: result: no" >&5
25145echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025146fi
25147
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025148{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25149echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
25150if test "$cross_compiling" = yes; then
25151 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
25152See \`config.log' for more details." >&5
25153echo "$as_me: error: cannot run test program while cross compiling
25154See \`config.log' for more details." >&2;}
25155 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025156else
25157 cat >conftest.$ac_ext <<_ACEOF
25158/* confdefs.h. */
25159_ACEOF
25160cat confdefs.h >>conftest.$ac_ext
25161cat >>conftest.$ac_ext <<_ACEOF
25162/* end confdefs.h. */
25163#include <stdio.h>
25164#include <stddef.h>
25165#include <string.h>
25166
Christian Heimes2c181612007-12-17 20:04:13 +000025167#ifdef HAVE_SYS_TYPES_H
25168#include <sys/types.h>
25169#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025170
25171#ifdef HAVE_SSIZE_T
25172typedef ssize_t Py_ssize_t;
25173#elif SIZEOF_VOID_P == SIZEOF_LONG
25174typedef long Py_ssize_t;
25175#else
25176typedef int Py_ssize_t;
25177#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025178
Christian Heimes2c181612007-12-17 20:04:13 +000025179int main()
25180{
25181 char buffer[256];
25182
Thomas Wouters477c8d52006-05-27 19:21:47 +000025183 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25184 return 1;
25185
Thomas Wouters89f507f2006-12-13 04:49:30 +000025186 if (strcmp(buffer, "123"))
25187 return 1;
25188
25189 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25190 return 1;
25191
25192 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025193 return 1;
25194
25195 return 0;
25196}
25197_ACEOF
25198rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025199if { (ac_try="$ac_link"
25200case "(($ac_try" in
25201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25202 *) ac_try_echo=$ac_try;;
25203esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025205 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025206 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025208 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025209 { (case "(($ac_try" in
25210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25211 *) ac_try_echo=$ac_try;;
25212esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025214 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025215 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025217 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025218 { echo "$as_me:$LINENO: result: yes" >&5
25219echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025220
25221cat >>confdefs.h <<\_ACEOF
25222#define PY_FORMAT_SIZE_T "z"
25223_ACEOF
25224
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025225else
25226 echo "$as_me: program exited with status $ac_status" >&5
25227echo "$as_me: failed program was:" >&5
25228sed 's/^/| /' conftest.$ac_ext >&5
25229
25230( exit $ac_status )
25231{ echo "$as_me:$LINENO: result: no" >&5
25232echo "${ECHO_T}no" >&6; }
25233fi
25234rm -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 +000025235fi
25236
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025237
25238
25239{ echo "$as_me:$LINENO: checking for socklen_t" >&5
25240echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025241if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025242 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025243else
Martin v. Löwis11437992002-04-12 09:54:03 +000025244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025245/* confdefs.h. */
25246_ACEOF
25247cat confdefs.h >>conftest.$ac_ext
25248cat >>conftest.$ac_ext <<_ACEOF
25249/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025250
25251#ifdef HAVE_SYS_TYPES_H
25252#include <sys/types.h>
25253#endif
25254#ifdef HAVE_SYS_SOCKET_H
25255#include <sys/socket.h>
25256#endif
25257
25258
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025259typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025260int
25261main ()
25262{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025263if ((ac__type_new_ *) 0)
25264 return 0;
25265if (sizeof (ac__type_new_))
25266 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 ;
25268 return 0;
25269}
25270_ACEOF
25271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025272if { (ac_try="$ac_compile"
25273case "(($ac_try" in
25274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25275 *) ac_try_echo=$ac_try;;
25276esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025278 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025279 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025280 grep -v '^ *+' conftest.er1 >conftest.err
25281 rm -f conftest.er1
25282 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025284 (exit $ac_status); } && {
25285 test -z "$ac_c_werror_flag" ||
25286 test ! -s conftest.err
25287 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025288 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000025289else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025291sed 's/^/| /' conftest.$ac_ext >&5
25292
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025293 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000025294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295
25296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025297fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025298{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25299echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
25300if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025301 :
25302else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025303
Martin v. Löwis01c04012002-11-11 14:58:44 +000025304cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025305#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025306_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025307
25308fi
25309
Michael W. Hudson54241132001-12-07 15:38:26 +000025310
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025311{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25312echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
25313if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000025314 ac_cv_broken_mbstowcs=no
25315else
25316 cat >conftest.$ac_ext <<_ACEOF
25317/* confdefs.h. */
25318_ACEOF
25319cat confdefs.h >>conftest.$ac_ext
25320cat >>conftest.$ac_ext <<_ACEOF
25321/* end confdefs.h. */
25322
25323#include<stdlib.h>
25324int main() {
25325 size_t len = -1;
25326 const char *str = "text";
25327 len = mbstowcs(NULL, str, 0);
25328 return (len != 4);
25329}
25330
25331_ACEOF
25332rm -f conftest$ac_exeext
25333if { (ac_try="$ac_link"
25334case "(($ac_try" in
25335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25336 *) ac_try_echo=$ac_try;;
25337esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025339 (eval "$ac_link") 2>&5
25340 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025342 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25343 { (case "(($ac_try" in
25344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25345 *) ac_try_echo=$ac_try;;
25346esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025348 (eval "$ac_try") 2>&5
25349 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025351 (exit $ac_status); }; }; then
25352 ac_cv_broken_mbstowcs=no
25353else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025354 echo "$as_me: program exited with status $ac_status" >&5
25355echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025356sed 's/^/| /' conftest.$ac_ext >&5
25357
25358( exit $ac_status )
25359ac_cv_broken_mbstowcs=yes
25360fi
25361rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25362fi
25363
25364
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025365{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25366echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025367if test "$ac_cv_broken_mbstowcs" = yes
25368then
25369
25370cat >>confdefs.h <<\_ACEOF
25371#define HAVE_BROKEN_MBSTOWCS 1
25372_ACEOF
25373
25374fi
25375
Antoine Pitroub52ec782009-01-25 16:34:23 +000025376# Check for --with-computed-gotos
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025377{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25378echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025379
25380# Check whether --with-computed-gotos was given.
25381if test "${with_computed_gotos+set}" = set; then
25382 withval=$with_computed_gotos;
25383if test "$withval" != no
25384then
25385
25386cat >>confdefs.h <<\_ACEOF
25387#define USE_COMPUTED_GOTOS 1
25388_ACEOF
25389
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025390 { echo "$as_me:$LINENO: result: yes" >&5
25391echo "${ECHO_T}yes" >&6; }
25392else { echo "$as_me:$LINENO: result: no" >&5
25393echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025394fi
25395else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025396 { echo "$as_me:$LINENO: result: no" >&5
25397echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000025398fi
25399
25400
25401
Michael W. Hudson54241132001-12-07 15:38:26 +000025402
25403
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025404for h in `(cd $srcdir;echo Python/thread_*.h)`
25405do
25406 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25407done
25408
Michael W. Hudson54241132001-12-07 15:38:26 +000025409
Neal Norwitzd24499d2005-12-18 21:36:39 +000025410SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025411{ echo "$as_me:$LINENO: checking for build directories" >&5
25412echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025413for dir in $SRCDIRS; do
25414 if test ! -d $dir; then
25415 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025416 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025417done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025418{ echo "$as_me:$LINENO: result: done" >&5
25419echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025420
Guido van Rossum627b2d71993-12-24 10:39:16 +000025421# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000025422ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025423
Martin v. Löwis11437992002-04-12 09:54:03 +000025424cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025425# This file is a shell script that caches the results of configure
25426# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025427# scripts and configure runs, see configure's option --config-cache.
25428# It is not useful on other systems. If it contains results you don't
25429# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025430#
Martin v. Löwis11437992002-04-12 09:54:03 +000025431# config.status only pays attention to the cache file if you give it
25432# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025433#
Skip Montanaro6dead952003-09-25 14:50:04 +000025434# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025435# loading this file, other *unset* `ac_cv_foo' will be assigned the
25436# following values.
25437
25438_ACEOF
25439
Guido van Rossumf78abae1997-01-21 22:02:36 +000025440# The following way of writing the cache mishandles newlines in values,
25441# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025442# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025443# Ultrix sh set writes to stderr and can't be redirected directly,
25444# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025445(
25446 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25447 eval ac_val=\$$ac_var
25448 case $ac_val in #(
25449 *${as_nl}*)
25450 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025451 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
25452echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025453 esac
25454 case $ac_var in #(
25455 _ | IFS | as_nl) ;; #(
25456 *) $as_unset $ac_var ;;
25457 esac ;;
25458 esac
25459 done
25460
Martin v. Löwis11437992002-04-12 09:54:03 +000025461 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025462 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25463 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025464 # `set' does not quote correctly, so add quotes (double-quote
25465 # substitution turns \\\\ into \\, and sed turns \\ into \).
25466 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025467 "s/'/'\\\\''/g;
25468 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025469 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025470 *)
25471 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025474 esac |
25475 sort
25476) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025478 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025479 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025480 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025481 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25482 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025483 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25484 :end' >>confcache
25485if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25486 if test -w "$cache_file"; then
25487 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025488 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
25489echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025490 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025491 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025492 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25493echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025494 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025495fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025496rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025497
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025498test "x$prefix" = xNONE && prefix=$ac_default_prefix
25499# Let make expand exec_prefix.
25500test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025502DEFS=-DHAVE_CONFIG_H
25503
Skip Montanaro6dead952003-09-25 14:50:04 +000025504ac_libobjs=
25505ac_ltlibobjs=
25506for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25507 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025508 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025509 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025510 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25511 # will be set to the directory where LIBOBJS objects are built.
25512 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25513 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025514done
25515LIBOBJS=$ac_libobjs
25516
25517LTLIBOBJS=$ac_ltlibobjs
25518
25519
Martin v. Löwis11437992002-04-12 09:54:03 +000025520
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025521: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025522ac_clean_files_save=$ac_clean_files
25523ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025524{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25525echo "$as_me: creating $CONFIG_STATUS" >&6;}
25526cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025527#! $SHELL
25528# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025529# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025530# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025531# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025532
Martin v. Löwis11437992002-04-12 09:54:03 +000025533debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025534ac_cs_recheck=false
25535ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025536SHELL=\${CONFIG_SHELL-$SHELL}
25537_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025538
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025539cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025540## --------------------- ##
25541## M4sh Initialization. ##
25542## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025544# Be more Bourne compatible
25545DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025546if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25547 emulate sh
25548 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025549 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025550 # is contrary to our usage. Disable this feature.
25551 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025552 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025553else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554 case `(set -o) 2>/dev/null` in
25555 *posix*) set -o posix ;;
25556esac
25557
Michael W. Hudson54241132001-12-07 15:38:26 +000025558fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025559
25560
Michael W. Hudson54241132001-12-07 15:38:26 +000025561
Michael W. Hudson54241132001-12-07 15:38:26 +000025562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025563# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025564# Avoid depending upon Character Ranges.
25565as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25566as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25567as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25568as_cr_digits='0123456789'
25569as_cr_alnum=$as_cr_Letters$as_cr_digits
25570
25571# The user is always right.
25572if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025573 echo "#! /bin/sh" >conf$$.sh
25574 echo "exit 0" >>conf$$.sh
25575 chmod +x conf$$.sh
25576 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
25577 PATH_SEPARATOR=';'
25578 else
25579 PATH_SEPARATOR=:
25580 fi
25581 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025582fi
25583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025584# Support unset when possible.
25585if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25586 as_unset=unset
25587else
25588 as_unset=false
25589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025591
25592# IFS
25593# We need space, tab and new line, in precisely that order. Quoting is
25594# there to prevent editors from complaining about space-tab.
25595# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25596# splitting by setting IFS to empty value.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025597as_nl='
25598'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025599IFS=" "" $as_nl"
25600
25601# Find who we are. Look in the path if we contain no directory separator.
25602case $0 in
25603 *[\\/]* ) as_myself=$0 ;;
25604 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025605for as_dir in $PATH
25606do
25607 IFS=$as_save_IFS
25608 test -z "$as_dir" && as_dir=.
25609 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25610done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025611IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025613 ;;
25614esac
25615# We did not find ourselves, most probably we were run as `sh COMMAND'
25616# in which case we are not to be found in the path.
25617if test "x$as_myself" = x; then
25618 as_myself=$0
25619fi
25620if test ! -f "$as_myself"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025621 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025622 { (exit 1); exit 1; }
25623fi
25624
25625# Work around bugs in pre-3.0 UWIN ksh.
25626for as_var in ENV MAIL MAILPATH
25627do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25628done
25629PS1='$ '
25630PS2='> '
25631PS4='+ '
25632
25633# NLS nuisances.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025634for as_var in \
25635 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25636 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25637 LC_TELEPHONE LC_TIME
25638do
25639 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25640 eval $as_var=C; export $as_var
25641 else
25642 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25643 fi
25644done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025645
25646# Required to use basename.
25647if expr a : '\(a\)' >/dev/null 2>&1 &&
25648 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25649 as_expr=expr
25650else
25651 as_expr=false
25652fi
25653
25654if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25655 as_basename=basename
25656else
25657 as_basename=false
25658fi
25659
25660
25661# Name of the executable.
25662as_me=`$as_basename -- "$0" ||
25663$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25664 X"$0" : 'X\(//\)$' \| \
25665 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025666echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025667 sed '/^.*\/\([^/][^/]*\)\/*$/{
25668 s//\1/
25669 q
25670 }
25671 /^X\/\(\/\/\)$/{
25672 s//\1/
25673 q
25674 }
25675 /^X\/\(\/\).*/{
25676 s//\1/
25677 q
25678 }
25679 s/.*/./; q'`
25680
25681# CDPATH.
25682$as_unset CDPATH
25683
25684
25685
Martin v. Löwis11437992002-04-12 09:54:03 +000025686 as_lineno_1=$LINENO
25687 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025688 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025689 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025690
Martin v. Löwis11437992002-04-12 09:54:03 +000025691 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25692 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693 # line-number line after each line using $LINENO; the second 'sed'
25694 # does the real work. The second script uses 'N' to pair each
25695 # line-number line with the line containing $LINENO, and appends
25696 # trailing '-' during substitution so that $LINENO is not a special
25697 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025698 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025699 # scripts with optimization help from Paolo Bonzini. Blame Lee
25700 # E. McMahon (1931-1989) for sed's syntax. :-)
25701 sed -n '
25702 p
25703 /[$]LINENO/=
25704 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025705 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025706 s/[$]LINENO.*/&-/
25707 t lineno
25708 b
25709 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025710 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025711 :loop
25712 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025713 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025714 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025715 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025717 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025718 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025719
Martin v. Löwis11437992002-04-12 09:54:03 +000025720 # Don't try to exec as it changes $[0], causing all sort of problems
25721 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722 # original and so on. Autoconf is especially sensitive to this).
25723 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025724 # Exit status is that of the last command.
25725 exit
25726}
25727
25728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025729if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25730 as_dirname=dirname
25731else
25732 as_dirname=false
25733fi
25734
25735ECHO_C= ECHO_N= ECHO_T=
25736case `echo -n x` in
25737-n*)
25738 case `echo 'x\c'` in
25739 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25740 *) ECHO_C='\c';;
25741 esac;;
25742*)
25743 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025744esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025746if expr a : '\(a\)' >/dev/null 2>&1 &&
25747 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025748 as_expr=expr
25749else
25750 as_expr=false
25751fi
25752
25753rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025754if test -d conf$$.dir; then
25755 rm -f conf$$.dir/conf$$.file
25756else
25757 rm -f conf$$.dir
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025758 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025759fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025760echo >conf$$.file
25761if ln -s conf$$.file conf$$ 2>/dev/null; then
25762 as_ln_s='ln -s'
25763 # ... but there are two gotchas:
25764 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25765 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25766 # In both cases, we have to default to `cp -p'.
25767 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025768 as_ln_s='cp -p'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025769elif ln conf$$.file conf$$ 2>/dev/null; then
25770 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000025771else
25772 as_ln_s='cp -p'
25773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025774rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25775rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025776
Skip Montanaro6dead952003-09-25 14:50:04 +000025777if mkdir -p . 2>/dev/null; then
25778 as_mkdir_p=:
25779else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025780 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025781 as_mkdir_p=false
25782fi
25783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025784if test -x / >/dev/null 2>&1; then
25785 as_test_x='test -x'
25786else
25787 if ls -dL / >/dev/null 2>&1; then
25788 as_ls_L_option=L
25789 else
25790 as_ls_L_option=
25791 fi
25792 as_test_x='
25793 eval sh -c '\''
25794 if test -d "$1"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025795 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025796 else
25797 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025798 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025799 esac;
25800 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25801 ???[sx]*):;;*)false;;esac;fi
25802 '\'' sh
25803 '
25804fi
25805as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025806
25807# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025808as_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 +000025809
25810# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025811as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025812
25813
Martin v. Löwis11437992002-04-12 09:54:03 +000025814exec 6>&1
25815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025816# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025817# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025818# values after options handling.
25819ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000025820This file was extended by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025821generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025822
25823 CONFIG_FILES = $CONFIG_FILES
25824 CONFIG_HEADERS = $CONFIG_HEADERS
25825 CONFIG_LINKS = $CONFIG_LINKS
25826 CONFIG_COMMANDS = $CONFIG_COMMANDS
25827 $ $0 $@
25828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025829on `(hostname || uname -n) 2>/dev/null | sed 1q`
25830"
25831
Martin v. Löwis11437992002-04-12 09:54:03 +000025832_ACEOF
25833
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025834cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025835# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000025836config_files="$ac_config_files"
25837config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025839_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025840
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025841cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025842ac_cs_usage="\
25843\`$as_me' instantiates files from templates according to the
25844current configuration.
25845
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025846Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000025847
25848 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025849 -V, --version print version number and configuration settings, then exit
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025850 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025851 -d, --debug don't remove temporary files
25852 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025853 --file=FILE[:TEMPLATE]
25854 instantiate the configuration file FILE
25855 --header=FILE[:TEMPLATE]
25856 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025857
25858Configuration files:
25859$config_files
25860
25861Configuration headers:
25862$config_headers
25863
25864Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025866_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025867cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025868ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000025869python config.status 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025870configured by $0, generated by GNU Autoconf 2.61,
25871 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025872
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025873Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025874This config.status script is free software; the Free Software Foundation
25875gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025876
25877ac_pwd='$ac_pwd'
25878srcdir='$srcdir'
25879INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025880_ACEOF
25881
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025882cat >>$CONFIG_STATUS <<\_ACEOF
25883# If no file are specified by the user, then we need to provide default
25884# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000025885ac_need_defaults=:
25886while test $# != 0
25887do
25888 case $1 in
25889 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025890 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25891 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025892 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025893 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025894 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025895 ac_option=$1
25896 ac_optarg=$2
25897 ac_shift=shift
25898 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025899 esac
25900
Skip Montanaro6dead952003-09-25 14:50:04 +000025901 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025902 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025903 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25904 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025906 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025907 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025908 debug=: ;;
25909 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025910 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025911 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025912 ac_need_defaults=false;;
25913 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025914 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025915 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025916 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025917 --he | --h)
25918 # Conflict between --help and --header
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025919 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920Try \`$0 --help' for more information." >&2
25921 { (exit 1); exit 1; }; };;
25922 --help | --hel | -h )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025923 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025924 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25925 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25926 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025927
25928 # This is an error.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025929 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025930Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025931 { (exit 1); exit 1; }; } ;;
25932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025933 *) ac_config_targets="$ac_config_targets $1"
25934 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025935
25936 esac
25937 shift
25938done
25939
Skip Montanaro6dead952003-09-25 14:50:04 +000025940ac_configure_extra_args=
25941
25942if $ac_cs_silent; then
25943 exec 6>/dev/null
25944 ac_configure_extra_args="$ac_configure_extra_args --silent"
25945fi
25946
25947_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025948cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025949if \$ac_cs_recheck; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025950 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25951 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025952 export CONFIG_SHELL
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025953 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025954fi
25955
Martin v. Löwis11437992002-04-12 09:54:03 +000025956_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025957cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025958exec 5>>config.log
25959{
25960 echo
25961 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25962## Running $as_me. ##
25963_ASBOX
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025964 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025965} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025966
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025967_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025968cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025970
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025971cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025972
25973# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025974for ac_config_target in $ac_config_targets
25975do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025976 case $ac_config_target in
25977 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25978 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25979 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000025980 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25981 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025982 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25983 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000025984 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025986 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25987echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025988 { (exit 1); exit 1; }; };;
25989 esac
25990done
25991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025992
Martin v. Löwis11437992002-04-12 09:54:03 +000025993# If the user did not use the arguments to specify the items to instantiate,
25994# then the envvar interface is used. Set only those that are not.
25995# We use the long form for the default assignment because of an extremely
25996# bizarre bug on SunOS 4.1.3.
25997if $ac_need_defaults; then
25998 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25999 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26000fi
26001
Skip Montanaro6dead952003-09-25 14:50:04 +000026002# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026003# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026004# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026005# Hook for its removal unless debugging.
26006# Note that there is a small window in which the directory will not be cleaned:
26007# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026008$debug ||
26009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026010 tmp=
26011 trap 'exit_status=$?
26012 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26013' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026014 trap '{ (exit 1); exit 1; }' 1 2 13 15
26015}
Martin v. Löwis11437992002-04-12 09:54:03 +000026016# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026017
Martin v. Löwis11437992002-04-12 09:54:03 +000026018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026019 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026020 test -n "$tmp" && test -d "$tmp"
26021} ||
26022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026023 tmp=./conf$$-$RANDOM
26024 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026025} ||
26026{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026027 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026028 { (exit 1); exit 1; }
26029}
26030
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026031#
26032# Set up the sed scripts for CONFIG_FILES section.
26033#
26034
26035# No need to generate the scripts if there are no CONFIG_FILES.
26036# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026037if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026038
26039_ACEOF
26040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026041
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026043ac_delim='%!_!# '
26044for ac_last_try in false false false false false :; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026045 cat >conf$$subs.sed <<_ACEOF
26046SHELL!$SHELL$ac_delim
26047PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
26048PACKAGE_NAME!$PACKAGE_NAME$ac_delim
26049PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
26050PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
26051PACKAGE_STRING!$PACKAGE_STRING$ac_delim
26052PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
26053exec_prefix!$exec_prefix$ac_delim
26054prefix!$prefix$ac_delim
26055program_transform_name!$program_transform_name$ac_delim
26056bindir!$bindir$ac_delim
26057sbindir!$sbindir$ac_delim
26058libexecdir!$libexecdir$ac_delim
26059datarootdir!$datarootdir$ac_delim
26060datadir!$datadir$ac_delim
26061sysconfdir!$sysconfdir$ac_delim
26062sharedstatedir!$sharedstatedir$ac_delim
26063localstatedir!$localstatedir$ac_delim
26064includedir!$includedir$ac_delim
26065oldincludedir!$oldincludedir$ac_delim
26066docdir!$docdir$ac_delim
26067infodir!$infodir$ac_delim
26068htmldir!$htmldir$ac_delim
26069dvidir!$dvidir$ac_delim
26070pdfdir!$pdfdir$ac_delim
26071psdir!$psdir$ac_delim
26072libdir!$libdir$ac_delim
26073localedir!$localedir$ac_delim
26074mandir!$mandir$ac_delim
26075DEFS!$DEFS$ac_delim
26076ECHO_C!$ECHO_C$ac_delim
26077ECHO_N!$ECHO_N$ac_delim
26078ECHO_T!$ECHO_T$ac_delim
26079LIBS!$LIBS$ac_delim
26080build_alias!$build_alias$ac_delim
26081host_alias!$host_alias$ac_delim
26082target_alias!$target_alias$ac_delim
26083VERSION!$VERSION$ac_delim
26084SOVERSION!$SOVERSION$ac_delim
26085CONFIG_ARGS!$CONFIG_ARGS$ac_delim
26086UNIVERSALSDK!$UNIVERSALSDK$ac_delim
26087ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
26088PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
26089PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
26090PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
26091PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
26092PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
26093FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
26094FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
26095FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
26096FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
26097FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
26098MACHDEP!$MACHDEP$ac_delim
26099SGI_ABI!$SGI_ABI$ac_delim
26100CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
26101EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
26102CC!$CC$ac_delim
26103CFLAGS!$CFLAGS$ac_delim
26104LDFLAGS!$LDFLAGS$ac_delim
26105CPPFLAGS!$CPPFLAGS$ac_delim
26106ac_ct_CC!$ac_ct_CC$ac_delim
26107EXEEXT!$EXEEXT$ac_delim
26108OBJEXT!$OBJEXT$ac_delim
26109CXX!$CXX$ac_delim
26110MAINCC!$MAINCC$ac_delim
26111CPP!$CPP$ac_delim
26112GREP!$GREP$ac_delim
26113EGREP!$EGREP$ac_delim
26114BUILDEXEEXT!$BUILDEXEEXT$ac_delim
26115LIBRARY!$LIBRARY$ac_delim
26116LDLIBRARY!$LDLIBRARY$ac_delim
26117DLLLIBRARY!$DLLLIBRARY$ac_delim
26118BLDLIBRARY!$BLDLIBRARY$ac_delim
26119LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
26120INSTSONAME!$INSTSONAME$ac_delim
26121RUNSHARED!$RUNSHARED$ac_delim
26122LINKCC!$LINKCC$ac_delim
26123GNULD!$GNULD$ac_delim
26124RANLIB!$RANLIB$ac_delim
26125AR!$AR$ac_delim
26126ARFLAGS!$ARFLAGS$ac_delim
26127SVNVERSION!$SVNVERSION$ac_delim
26128INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
26129INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
26130INSTALL_DATA!$INSTALL_DATA$ac_delim
26131LN!$LN$ac_delim
26132OPT!$OPT$ac_delim
26133BASECFLAGS!$BASECFLAGS$ac_delim
26134UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
26135OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
26136LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
26137SO!$SO$ac_delim
26138LDSHARED!$LDSHARED$ac_delim
26139BLDSHARED!$BLDSHARED$ac_delim
26140CCSHARED!$CCSHARED$ac_delim
26141LINKFORSHARED!$LINKFORSHARED$ac_delim
26142CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
26143_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026144
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026145 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026146 break
26147 elif $ac_last_try; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026148 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26149echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026150 { (exit 1); exit 1; }; }
26151 else
26152 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026153 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026154done
26155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026156ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26157if test -n "$ac_eof"; then
26158 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26159 ac_eof=`expr $ac_eof + 1`
26160fi
26161
26162cat >>$CONFIG_STATUS <<_ACEOF
26163cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
26164/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026165_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026166sed '
26167s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26168s/^/s,@/; s/!/@,|#_!!_#|/
26169:n
26170t n
26171s/'"$ac_delim"'$/,g/; t
26172s/$/\\/; p
26173N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26174' >>$CONFIG_STATUS <conf$$subs.sed
26175rm -f conf$$subs.sed
26176cat >>$CONFIG_STATUS <<_ACEOF
26177CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026178_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026179
26180
26181ac_delim='%!_!# '
26182for ac_last_try in false false false false false :; do
26183 cat >conf$$subs.sed <<_ACEOF
26184SHLIBS!$SHLIBS$ac_delim
26185USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
26186SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
26187USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
26188LDLAST!$LDLAST$ac_delim
26189THREADOBJ!$THREADOBJ$ac_delim
26190DLINCLDIR!$DLINCLDIR$ac_delim
26191DYNLOADFILE!$DYNLOADFILE$ac_delim
26192MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
26193TRUE!$TRUE$ac_delim
26194LIBOBJS!$LIBOBJS$ac_delim
26195HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
26196HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
26197HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
26198HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
26199HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
26200LIBM!$LIBM$ac_delim
26201LIBC!$LIBC$ac_delim
26202THREADHEADERS!$THREADHEADERS$ac_delim
26203SRCDIRS!$SRCDIRS$ac_delim
26204LTLIBOBJS!$LTLIBOBJS$ac_delim
26205_ACEOF
26206
26207 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
26208 break
26209 elif $ac_last_try; then
26210 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26211echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026212 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026213 else
26214 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26215 fi
26216done
26217
26218ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
26219if test -n "$ac_eof"; then
26220 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
26221 ac_eof=`expr $ac_eof + 1`
26222fi
26223
26224cat >>$CONFIG_STATUS <<_ACEOF
26225cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
26226/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026227_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026228sed '
26229s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
26230s/^/s,@/; s/!/@,|#_!!_#|/
26231:n
26232t n
26233s/'"$ac_delim"'$/,g/; t
26234s/$/\\/; p
26235N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
26236' >>$CONFIG_STATUS <conf$$subs.sed
26237rm -f conf$$subs.sed
26238cat >>$CONFIG_STATUS <<_ACEOF
26239:end
26240s/|#_!!_#|//g
26241CEOF$ac_eof
26242_ACEOF
26243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026244
26245# VPATH may cause trouble with some makes, so we remove $(srcdir),
26246# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26247# trailing colons and then remove the whole line if VPATH becomes empty
26248# (actually we leave an empty line to preserve line numbers).
26249if test "x$srcdir" = x.; then
26250 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26251s/:*\$(srcdir):*/:/
26252s/:*\${srcdir}:*/:/
26253s/:*@srcdir@:*/:/
26254s/^\([^=]*=[ ]*\):*/\1/
26255s/:*$//
26256s/^[^=]*=[ ]*$//
26257}'
26258fi
26259
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026260cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026261fi # test -n "$CONFIG_FILES"
26262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026263
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026264for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026265do
26266 case $ac_tag in
26267 :[FHLC]) ac_mode=$ac_tag; continue;;
26268 esac
26269 case $ac_mode$ac_tag in
26270 :[FHL]*:*);;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026271 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
26272echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026273 { (exit 1); exit 1; }; };;
26274 :[FH]-) ac_tag=-:-;;
26275 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26276 esac
26277 ac_save_IFS=$IFS
26278 IFS=:
26279 set x $ac_tag
26280 IFS=$ac_save_IFS
26281 shift
26282 ac_file=$1
26283 shift
26284
26285 case $ac_mode in
26286 :L) ac_source=$1;;
26287 :[FH])
26288 ac_file_inputs=
26289 for ac_f
26290 do
26291 case $ac_f in
26292 -) ac_f="$tmp/stdin";;
26293 *) # Look for the file first in the build tree, then in the source tree
26294 # (if the path is not absolute). The absolute path cannot be DOS-style,
26295 # because $ac_f cannot contain `:'.
26296 test -f "$ac_f" ||
26297 case $ac_f in
26298 [\\/$]*) false;;
26299 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26300 esac ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026301 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26302echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026303 { (exit 1); exit 1; }; };;
26304 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026305 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026306 done
26307
26308 # Let's still pretend it is `configure' which instantiates (i.e., don't
26309 # use $as_me), people would be surprised to read:
26310 # /* config.h. Generated by config.status. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026311 configure_input="Generated from "`IFS=:
26312 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026313 if test x"$ac_file" != x-; then
26314 configure_input="$ac_file. $configure_input"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026315 { echo "$as_me:$LINENO: creating $ac_file" >&5
26316echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317 fi
26318
26319 case $ac_tag in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026320 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026321 esac
26322 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026323 esac
26324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026326$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026327 X"$ac_file" : 'X\(//\)[^/]' \| \
26328 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026329 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026330echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026331 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26332 s//\1/
26333 q
26334 }
26335 /^X\(\/\/\)[^/].*/{
26336 s//\1/
26337 q
26338 }
26339 /^X\(\/\/\)$/{
26340 s//\1/
26341 q
26342 }
26343 /^X\(\/\).*/{
26344 s//\1/
26345 q
26346 }
26347 s/.*/./; q'`
26348 { as_dir="$ac_dir"
26349 case $as_dir in #(
26350 -*) as_dir=./$as_dir;;
26351 esac
26352 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026353 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026354 while :; do
26355 case $as_dir in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026356 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026357 *) as_qdir=$as_dir;;
26358 esac
26359 as_dirs="'$as_qdir' $as_dirs"
26360 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026361$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026362 X"$as_dir" : 'X\(//\)[^/]' \| \
26363 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026364 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026365echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026366 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26367 s//\1/
26368 q
26369 }
26370 /^X\(\/\/\)[^/].*/{
26371 s//\1/
26372 q
26373 }
26374 /^X\(\/\/\)$/{
26375 s//\1/
26376 q
26377 }
26378 /^X\(\/\).*/{
26379 s//\1/
26380 q
26381 }
26382 s/.*/./; q'`
26383 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026385 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026386 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26387echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026388 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026389 ac_builddir=.
26390
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026391case "$ac_dir" in
26392.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26393*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026394 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026395 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026396 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026397 case $ac_top_builddir_sub in
26398 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26399 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26400 esac ;;
26401esac
26402ac_abs_top_builddir=$ac_pwd
26403ac_abs_builddir=$ac_pwd$ac_dir_suffix
26404# for backward compatibility:
26405ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026406
26407case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026408 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026409 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026410 ac_top_srcdir=$ac_top_builddir_sub
26411 ac_abs_top_srcdir=$ac_pwd ;;
26412 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026413 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026414 ac_top_srcdir=$srcdir
26415 ac_abs_top_srcdir=$srcdir ;;
26416 *) # Relative name.
26417 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26418 ac_top_srcdir=$ac_top_build_prefix$srcdir
26419 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026420esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026421ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026422
Martin v. Löwis11437992002-04-12 09:54:03 +000026423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424 case $ac_mode in
26425 :F)
26426 #
26427 # CONFIG_FILE
26428 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026429
26430 case $INSTALL in
26431 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026432 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026433 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026434_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026436cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026437# If the template does not know about datarootdir, expand it.
26438# FIXME: This hack should be removed a few years after 2.60.
26439ac_datarootdir_hack=; ac_datarootdir_seen=
26440
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026441case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026442 p
26443 q
26444}
26445/@datadir@/p
26446/@docdir@/p
26447/@infodir@/p
26448/@localedir@/p
26449/@mandir@/p
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026450' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451*datarootdir*) ac_datarootdir_seen=yes;;
26452*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026453 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26454echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026455_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026456cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 ac_datarootdir_hack='
26458 s&@datadir@&$datadir&g
26459 s&@docdir@&$docdir&g
26460 s&@infodir@&$infodir&g
26461 s&@localedir@&$localedir&g
26462 s&@mandir@&$mandir&g
26463 s&\\\${datarootdir}&$datarootdir&g' ;;
26464esac
26465_ACEOF
26466
26467# Neutralize VPATH when `$srcdir' = `.'.
26468# Shell code in configure.ac might set extrasub.
26469# FIXME: do we really want to maintain this feature?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026470cat >>$CONFIG_STATUS <<_ACEOF
26471 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026472$extrasub
26473_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026474cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026475:t
26476/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026477s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026478s&@top_builddir@&$ac_top_builddir_sub&;t t
26479s&@srcdir@&$ac_srcdir&;t t
26480s&@abs_srcdir@&$ac_abs_srcdir&;t t
26481s&@top_srcdir@&$ac_top_srcdir&;t t
26482s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26483s&@builddir@&$ac_builddir&;t t
26484s&@abs_builddir@&$ac_abs_builddir&;t t
26485s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26486s&@INSTALL@&$ac_INSTALL&;t t
26487$ac_datarootdir_hack
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026488" $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 +000026489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026490test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26491 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26492 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026493 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026494which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026495echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026496which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026498 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026499 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026500 -) cat "$tmp/out"; rm -f "$tmp/out";;
26501 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
26502 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026503 ;;
26504 :H)
26505 #
26506 # CONFIG_HEADER
26507 #
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026508_ACEOF
26509
26510# Transform confdefs.h into a sed script `conftest.defines', that
26511# substitutes the proper values into config.h.in to produce config.h.
26512rm -f conftest.defines conftest.tail
26513# First, append a space to every undef/define line, to ease matching.
26514echo 's/$/ /' >conftest.defines
26515# Then, protect against being on the right side of a sed subst, or in
26516# an unquoted here document, in config.status. If some macros were
26517# called several times there might be several #defines for the same
26518# symbol, which is useless. But do not sort them, since the last
26519# AC_DEFINE must be honored.
26520ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26521# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26522# NAME is the cpp macro being defined, VALUE is the value it is being given.
26523# PARAMS is the parameter list in the macro definition--in most cases, it's
26524# just an empty string.
26525ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26526ac_dB='\\)[ (].*,\\1define\\2'
26527ac_dC=' '
26528ac_dD=' ,'
26529
26530uniq confdefs.h |
26531 sed -n '
26532 t rset
26533 :rset
26534 s/^[ ]*#[ ]*define[ ][ ]*//
26535 t ok
26536 d
26537 :ok
26538 s/[\\&,]/\\&/g
26539 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26540 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26541 ' >>conftest.defines
26542
26543# Remove the space that was appended to ease matching.
26544# Then replace #undef with comments. This is necessary, for
26545# example, in the case of _POSIX_SOURCE, which is predefined and required
26546# on some systems where configure will not decide to define it.
26547# (The regexp can be short, since the line contains either #define or #undef.)
26548echo 's/ $//
26549s,^[ #]*u.*,/* & */,' >>conftest.defines
26550
26551# Break up conftest.defines:
26552ac_max_sed_lines=50
26553
26554# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26555# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26556# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26557# et cetera.
26558ac_in='$ac_file_inputs'
26559ac_out='"$tmp/out1"'
26560ac_nxt='"$tmp/out2"'
26561
26562while :
26563do
26564 # Write a here document:
26565 cat >>$CONFIG_STATUS <<_ACEOF
26566 # First, check the format of the line:
26567 cat >"\$tmp/defines.sed" <<\\CEOF
26568/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26569/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26570b
26571:def
26572_ACEOF
26573 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
26574 echo 'CEOF
26575 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26576 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26577 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26578 grep . conftest.tail >/dev/null || break
26579 rm -f conftest.defines
26580 mv conftest.tail conftest.defines
26581done
26582rm -f conftest.defines conftest.tail
26583
26584echo "ac_result=$ac_in" >>$CONFIG_STATUS
26585cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026586 if test x"$ac_file" != x-; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026587 echo "/* $configure_input */" >"$tmp/config.h"
26588 cat "$ac_result" >>"$tmp/config.h"
26589 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
26590 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26591echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026592 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026593 rm -f $ac_file
26594 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026595 fi
26596 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026597 echo "/* $configure_input */"
26598 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026599 fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026600 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026601 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603
26604 esac
26605
26606done # for ac_tag
26607
Guido van Rossum627b2d71993-12-24 10:39:16 +000026608
Martin v. Löwis11437992002-04-12 09:54:03 +000026609{ (exit 0); exit 0; }
26610_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026611chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026612ac_clean_files=$ac_clean_files_save
26613
26614
26615# configure is writing to config.log, and then calls config.status.
26616# config.status does its own redirection, appending to config.log.
26617# Unfortunately, on DOS this fails, as config.log is still kept open
26618# by configure, so config.status won't be able to write to it; its
26619# output is simply discarded. So we exec the FD to /dev/null,
26620# effectively closing config.log, so it can be properly (re)opened and
26621# appended to by config.status. When coming back to configure, we
26622# need to make the FD available again.
26623if test "$no_create" != yes; then
26624 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026625 ac_config_status_args=
26626 test "$silent" = yes &&
26627 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026628 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026629 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026630 exec 5>>config.log
26631 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26632 # would make configure fail if this is the last instruction.
26633 $ac_cs_success || { (exit 1); exit 1; }
26634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026635
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026636
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026637echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026638if test ! -f Modules/Setup
26639then
26640 cp $srcdir/Modules/Setup.dist Modules/Setup
26641fi
26642
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026643echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026644if test ! -f Modules/Setup.local
26645then
26646 echo "# Edit this file for local setup changes" >Modules/Setup.local
26647fi
26648
26649echo "creating Makefile"
26650$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26651 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026652 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026653mv config.c Modules