blob: e304feb95adba01c2fedfa88fb5a084156c44a57 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00002# From configure.in Revision: 74669 .
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 +00001911
1912
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001913UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001914{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1915echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001916
1917# Check whether --with-universal-archs was given.
1918if test "${with_universal_archs+set}" = set; then
1919 withval=$with_universal_archs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001920 { echo "$as_me:$LINENO: result: $withval" >&5
1921echo "${ECHO_T}$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001922 UNIVERSAL_ARCHS="$withval"
1923
1924else
1925
Alexandre Vassalotti19142282009-07-17 23:11:52 +00001926 { echo "$as_me:$LINENO: result: 32-bit" >&5
1927echo "${ECHO_T}32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001928
1929fi
1930
1931
1932
1933
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001934
1935# Check whether --with-framework-name was given.
1936if test "${with_framework_name+set}" = set; then
1937 withval=$with_framework_name;
1938 PYTHONFRAMEWORK=${withval}
1939 PYTHONFRAMEWORKDIR=${withval}.framework
1940 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1941
1942else
1943
1944 PYTHONFRAMEWORK=Python
1945 PYTHONFRAMEWORKDIR=Python.framework
1946 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1947
1948fi
1949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001950# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001951if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001952 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001953 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001954 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001955 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001956 esac
1957 case $enableval in
1958 no)
1959 PYTHONFRAMEWORK=
1960 PYTHONFRAMEWORKDIR=no-framework
1961 PYTHONFRAMEWORKPREFIX=
1962 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001963 FRAMEWORKINSTALLFIRST=
1964 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001965 FRAMEWORKALTINSTALLFIRST=
1966 FRAMEWORKALTINSTALLLAST=
1967 if test "x${prefix}" = "xNONE"; then
1968 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1969 else
1970 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1971 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001972 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001973 ;;
1974 *)
1975 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001977 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00001978 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001979 if test "$UNIVERSAL_ARCHS" = "all"
1980 then
1981 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00001982 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001983 else
Ronald Oussorene3918352009-03-30 18:00:28 +00001984 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001985 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1986 fi
1987
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001988 if test "x${prefix}" = "xNONE" ; then
1989 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1990 else
1991 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1992 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001993 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001995 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00001996 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001997 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001999 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002000
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002001 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2002
2003 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2004
Jack Jansene578a632001-08-15 01:27:14 +00002005 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002006
Guido van Rossum563e7081996-09-10 18:20:48 +00002007else
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Jack Jansene578a632001-08-15 01:27:14 +00002009 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002010 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002011 PYTHONFRAMEWORKPREFIX=
2012 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 FRAMEWORKINSTALLFIRST=
2014 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002015 FRAMEWORKALTINSTALLFIRST=
2016 FRAMEWORKALTINSTALLLAST=
2017 if test "x${prefix}" = "xNONE" ; then
2018 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2019 else
2020 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2021 fi
Jack Jansene578a632001-08-15 01:27:14 +00002022 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024 if test "$UNIVERSAL_ARCHS" = "all"
2025 then
2026 FRAMEWORKINSTALLLAST=update4wayuniversal
2027 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2028 fi
2029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002030fi
2031
Thomas Wouters477c8d52006-05-27 19:21:47 +00002032
2033
Michael W. Hudson54241132001-12-07 15:38:26 +00002034
2035
2036
2037
Jack Jansene578a632001-08-15 01:27:14 +00002038
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
Jack Jansene578a632001-08-15 01:27:14 +00002043##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002044## AC_HELP_STRING(--with-dyld,
2045## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002046##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002047# Set name for machine-dependent library files
2048
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002049{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2050echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051if test -z "$MACHDEP"
2052then
Guido van Rossum563e7081996-09-10 18:20:48 +00002053 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002054 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2055 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002056 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002058 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002059 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002060 ac_md_system=`echo $ac_sys_system |
2061 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2062 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002063 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002064 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002065
Guido van Rossum07397971997-04-29 21:49:50 +00002066 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002067 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002068 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002069 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002070 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002071 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002072 esac
2073fi
Guido van Rossum91922671997-10-09 20:24:13 +00002074
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002075# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2076# disable features if it is defined, without any means to access these
2077# features as extensions. For these systems, we skip the definition of
2078# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2079# some feature, make sure there is no alternative way to access this
2080# feature. Also, when using wildcards, make sure you have verified the
2081# need for not defining _XOPEN_SOURCE on all systems matching the
2082# wildcard, and that the wildcard does not include future systems
2083# (which may remove their limitations).
2084case $ac_sys_system/$ac_sys_release in
2085 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2086 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002087 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002088 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002089 define_xopen_source=no
2090 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2091 # also defined. This can be overridden by defining _BSD_SOURCE
2092 # As this has a different meaning on Linux, only define it on OpenBSD
2093
2094cat >>confdefs.h <<\_ACEOF
2095#define _BSD_SOURCE 1
2096_ACEOF
2097
2098 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002099 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2100 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2101 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002102 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 +00002103 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002104 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2105 # of union __?sigval. Reported by Stuart Bishop.
2106 SunOS/5.6)
2107 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002108 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2109 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002110 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002111 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002112 define_xopen_source=no;;
2113 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002114 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002115 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002116 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002117 # On FreeBSD 4, the math functions C89 does not cover are never defined
2118 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2119 FreeBSD/4.*)
2120 define_xopen_source=no;;
2121 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2122 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2123 # identifies itself as Darwin/7.*
2124 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2125 # disables platform specific features beyond repair.
2126 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2127 # has no effect, don't bother defining them
2128 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002129 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002130 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2131 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2132 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002133 AIX/4)
2134 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002135 AIX/5)
2136 if test `uname -r` -eq 1; then
2137 define_xopen_source=no
2138 fi
2139 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002140 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2141 # defining NI_NUMERICHOST.
2142 QNX/6.3.2)
2143 define_xopen_source=no
2144 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002145
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002146esac
2147
2148if test $define_xopen_source = yes
2149then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002150 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2151 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002152 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2153 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002154 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002155 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156
2157cat >>confdefs.h <<\_ACEOF
2158#define _XOPEN_SOURCE 500
2159_ACEOF
2160
2161 ;;
2162 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002163
2164cat >>confdefs.h <<\_ACEOF
2165#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002166_ACEOF
2167
Skip Montanarof0d5f792004-08-15 14:08:23 +00002168 ;;
2169 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002170
2171 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2172 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2173 # several APIs are not declared. Since this is also needed in some
2174 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002175 # except for Solaris 10, where it must not be defined,
2176 # as it implies XPG4.2
2177 case $ac_sys_system/$ac_sys_release in
2178 SunOS/5.10)
2179 ;;
2180 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002181
2182cat >>confdefs.h <<\_ACEOF
2183#define _XOPEN_SOURCE_EXTENDED 1
2184_ACEOF
2185
Martin v. Löwis7dece662005-11-26 11:38:24 +00002186 ;;
2187 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002188
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002189
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002190cat >>confdefs.h <<\_ACEOF
2191#define _POSIX_C_SOURCE 200112L
2192_ACEOF
2193
2194
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002195fi
2196
Guido van Rossum91922671997-10-09 20:24:13 +00002197#
2198# SGI compilers allow the specification of the both the ABI and the
2199# ISA on the command line. Depending on the values of these switches,
2200# different and often incompatable code will be generated.
2201#
2202# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2203# thus supply support for various ABI/ISA combinations. The MACHDEP
2204# variable is also adjusted.
2205#
2206
2207if test ! -z "$SGI_ABI"
2208then
2209 CC="cc $SGI_ABI"
2210 LDFLAGS="$SGI_ABI $LDFLAGS"
2211 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2212fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002213{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2214echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002215
Jack Jansen6b08a402004-06-03 12:41:45 +00002216# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2217# it may influence the way we can build extensions, so distutils
2218# needs to check it
2219
Thomas Wouters477c8d52006-05-27 19:21:47 +00002220
Jack Jansen6b08a402004-06-03 12:41:45 +00002221CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002222EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002223
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002224{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2225echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002226ac_sys_machine=`uname -m`
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002227{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2228echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002229
Guido van Rossum627b2d71993-12-24 10:39:16 +00002230# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002231
2232# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2233# for debug/optimization stuff. BASECFLAGS is for flags that are required
2234# just to get things to compile and link. Users are free to override OPT
2235# when running configure or make. The build should not break if they do.
2236# BASECFLAGS should generally not be messed with, however.
2237
2238# XXX shouldn't some/most/all of this code be merged with the stuff later
2239# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002240{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2241echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002243# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002244if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002245 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002246 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002247 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248 without_gcc=yes;;
2249 yes) CC=gcc
2250 without_gcc=no;;
2251 *) CC=$withval
2252 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254else
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002256 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002257 AIX*) CC=cc_r
2258 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002259 Monterey*)
2260 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002261 without_gcc=;;
2262 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002264fi
2265
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002266{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2267echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002268
Guido van Rossum8b131c51995-03-09 14:10:13 +00002269# If the user switches compilers, we can't believe the cache
2270if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2271then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002272 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002273(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002274echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002275(it is also a good idea to do 'make clean' before compiling)" >&2;}
2276 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002277fi
2278
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_ext=c
2280ac_cpp='$CPP $CPPFLAGS'
2281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284if test -n "$ac_tool_prefix"; then
2285 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2286set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002287{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2288echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002289if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002290 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002291else
2292 if test -n "$CC"; then
2293 ac_cv_prog_CC="$CC" # Let the user override the test.
2294else
Martin v. Löwis11437992002-04-12 09:54:03 +00002295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296for as_dir in $PATH
2297do
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
2300 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002301 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 +00002302 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002303 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002304 break 2
2305 fi
2306done
2307done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002308IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002309
Jack Jansendd19cf82001-12-06 22:36:17 +00002310fi
2311fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002312CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002313if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002314 { echo "$as_me:$LINENO: result: $CC" >&5
2315echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002316else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002317 { echo "$as_me:$LINENO: result: no" >&5
2318echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002319fi
2320
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002321
Martin v. Löwis11437992002-04-12 09:54:03 +00002322fi
2323if test -z "$ac_cv_prog_CC"; then
2324 ac_ct_CC=$CC
2325 # Extract the first word of "gcc", so it can be a program name with args.
2326set dummy gcc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002329if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002331else
2332 if test -n "$ac_ct_CC"; then
2333 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2334else
2335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2336for as_dir in $PATH
2337do
2338 IFS=$as_save_IFS
2339 test -z "$as_dir" && as_dir=.
2340 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341 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 +00002342 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002343 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002344 break 2
2345 fi
2346done
2347done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002349
2350fi
2351fi
2352ac_ct_CC=$ac_cv_prog_ac_ct_CC
2353if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002354 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2355echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002356else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002357 { echo "$as_me:$LINENO: result: no" >&5
2358echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002359fi
2360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002361 if test "x$ac_ct_CC" = x; then
2362 CC=""
2363 else
2364 case $cross_compiling:$ac_tool_warned in
2365yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002366{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2367whose name does not start with the host triplet. If you think this
2368configuration is useful to you, please write to autoconf@gnu.org." >&5
2369echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2370whose name does not start with the host triplet. If you think this
2371configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002372ac_tool_warned=yes ;;
2373esac
2374 CC=$ac_ct_CC
2375 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002376else
2377 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002378fi
2379
Jack Jansendd19cf82001-12-06 22:36:17 +00002380if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381 if test -n "$ac_tool_prefix"; then
2382 # 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 +00002383set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002384{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2385echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002386if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002387 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002388else
2389 if test -n "$CC"; then
2390 ac_cv_prog_CC="$CC" # Let the user override the test.
2391else
Martin v. Löwis11437992002-04-12 09:54:03 +00002392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2393for as_dir in $PATH
2394do
2395 IFS=$as_save_IFS
2396 test -z "$as_dir" && as_dir=.
2397 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398 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 +00002399 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002400 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002401 break 2
2402 fi
2403done
2404done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002405IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002406
2407fi
2408fi
2409CC=$ac_cv_prog_CC
2410if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002411 { echo "$as_me:$LINENO: result: $CC" >&5
2412echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002413else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002414 { echo "$as_me:$LINENO: result: no" >&5
2415echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002416fi
2417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418
Martin v. Löwis11437992002-04-12 09:54:03 +00002419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002420fi
2421if test -z "$CC"; then
2422 # Extract the first word of "cc", so it can be a program name with args.
2423set dummy cc; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002424{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002426if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002427 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002428else
2429 if test -n "$CC"; then
2430 ac_cv_prog_CC="$CC" # Let the user override the test.
2431else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002432 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434for as_dir in $PATH
2435do
2436 IFS=$as_save_IFS
2437 test -z "$as_dir" && as_dir=.
2438 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439 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 +00002440 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2441 ac_prog_rejected=yes
2442 continue
2443 fi
2444 ac_cv_prog_CC="cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002445 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002446 break 2
2447 fi
2448done
2449done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002452if test $ac_prog_rejected = yes; then
2453 # We found a bogon in the path, so make sure we never use it.
2454 set dummy $ac_cv_prog_CC
2455 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002457 # We chose a different compiler from the bogus one.
2458 # However, it has the same basename, so the bogon will be chosen
2459 # first if we set CC to just the basename; use the full file name.
2460 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002461 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002462 fi
2463fi
2464fi
2465fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002466CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002467if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002468 { echo "$as_me:$LINENO: result: $CC" >&5
2469echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002470else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002471 { echo "$as_me:$LINENO: result: no" >&5
2472echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002473fi
2474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475
Martin v. Löwis11437992002-04-12 09:54:03 +00002476fi
2477if test -z "$CC"; then
2478 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 do
2481 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2482set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002483{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2484echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002485if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002487else
2488 if test -n "$CC"; then
2489 ac_cv_prog_CC="$CC" # Let the user override the test.
2490else
Martin v. Löwis11437992002-04-12 09:54:03 +00002491as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2492for as_dir in $PATH
2493do
2494 IFS=$as_save_IFS
2495 test -z "$as_dir" && as_dir=.
2496 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 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 +00002498 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002499 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002502done
2503done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002505
2506fi
2507fi
2508CC=$ac_cv_prog_CC
2509if test -n "$CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002510 { echo "$as_me:$LINENO: result: $CC" >&5
2511echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002512else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002513 { echo "$as_me:$LINENO: result: no" >&5
2514echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002515fi
2516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 test -n "$CC" && break
2519 done
2520fi
2521if test -z "$CC"; then
2522 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002524do
2525 # Extract the first word of "$ac_prog", so it can be a program name with args.
2526set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002527{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2528echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002529if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002530 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002531else
2532 if test -n "$ac_ct_CC"; then
2533 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2534else
2535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
2540 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 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 +00002542 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002543 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 break 2
2545 fi
2546done
2547done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
2551fi
2552ac_ct_CC=$ac_cv_prog_ac_ct_CC
2553if test -n "$ac_ct_CC"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002554 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2555echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002556else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002557 { echo "$as_me:$LINENO: result: no" >&5
2558echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002559fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 test -n "$ac_ct_CC" && break
2563done
Michael W. Hudson54241132001-12-07 15:38:26 +00002564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 if test "x$ac_ct_CC" = x; then
2566 CC=""
2567 else
2568 case $cross_compiling:$ac_tool_warned in
2569yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002570{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2571whose name does not start with the host triplet. If you think this
2572configuration is useful to you, please write to autoconf@gnu.org." >&5
2573echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2574whose name does not start with the host triplet. If you think this
2575configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576ac_tool_warned=yes ;;
2577esac
2578 CC=$ac_ct_CC
2579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002580fi
2581
2582fi
2583
2584
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002585test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002586See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002587echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002588See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002589 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002590
2591# Provide some information about the compiler.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002592echo "$as_me:$LINENO: checking for C compiler version" >&5
2593ac_compiler=`set X $ac_compile; echo $2`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594{ (ac_try="$ac_compiler --version >&5"
2595case "(($ac_try" in
2596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2597 *) ac_try_echo=$ac_try;;
2598esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604{ (ac_try="$ac_compiler -v >&5"
2605case "(($ac_try" in
2606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2607 *) ac_try_echo=$ac_try;;
2608esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614{ (ac_try="$ac_compiler -V >&5"
2615case "(($ac_try" in
2616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2617 *) ac_try_echo=$ac_try;;
2618esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 (exit $ac_status); }
2624
2625cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002626/* confdefs.h. */
2627_ACEOF
2628cat confdefs.h >>conftest.$ac_ext
2629cat >>conftest.$ac_ext <<_ACEOF
2630/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632int
2633main ()
2634{
2635
2636 ;
2637 return 0;
2638}
2639_ACEOF
2640ac_clean_files_save=$ac_clean_files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002641ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Try to create an executable without -o first, disregard a.out.
2643# It will help us diagnose broken compilers, and finding out an intuition
2644# of exeext.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002645{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2646echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2647ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2648#
2649# List of possible output files, starting from the most likely.
2650# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2651# only as a last resort. b.out is created by i960 compilers.
2652ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2653#
2654# The IRIX 6 linker writes into existing files which may not be
2655# executable, retaining their permissions. Remove them first so a
2656# subsequent execution test works.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657ac_rmfiles=
2658for ac_file in $ac_files
2659do
2660 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002661 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2663 esac
2664done
2665rm -f $ac_rmfiles
2666
2667if { (ac_try="$ac_link_default"
2668case "(($ac_try" in
2669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2670 *) ac_try_echo=$ac_try;;
2671esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002677 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2678# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2679# in a Makefile. We should not override ac_cv_exeext if it was cached,
2680# so that the user can short-circuit this test for compilers unknown to
2681# Autoconf.
2682for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002683do
2684 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002686 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002687 ;;
2688 [ab].out )
2689 # We found the default executable, but exeext='' is most
2690 # certainly right.
2691 break;;
2692 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2694 then :; else
2695 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2696 fi
2697 # We set ac_cv_exeext here because the later test for it is not
2698 # safe: cross compilers may not add the suffix if given an `-o'
2699 # argument, so we may need to know it at that point already.
2700 # Even if this section looks crufty: it has the advantage of
2701 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002702 break;;
2703 * )
2704 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 esac
2706done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707test "$ac_cv_exeext" = no && ac_cv_exeext=
2708
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002709else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002710 ac_file=''
2711fi
2712
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002713{ echo "$as_me:$LINENO: result: $ac_file" >&5
2714echo "${ECHO_T}$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715if test -z "$ac_file"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002716 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002717sed 's/^/| /' conftest.$ac_ext >&5
2718
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002719{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002720See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002721echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002722See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002723 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002724fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002725
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002726ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002729# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002730{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2731echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002732# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2733# If not cross compiling, check that we can run a simple program.
2734if test "$cross_compiling" != yes; then
2735 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 { (case "(($ac_try" in
2737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2738 *) ac_try_echo=$ac_try;;
2739esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 (exit $ac_status); }; }; then
2745 cross_compiling=no
2746 else
2747 if test "$cross_compiling" = maybe; then
2748 cross_compiling=yes
2749 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002750 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002751If you meant to cross compile, use \`--host'.
2752See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002753echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002754If you meant to cross compile, use \`--host'.
2755See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002756 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 fi
2758 fi
2759fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002760{ echo "$as_me:$LINENO: result: yes" >&5
2761echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002762
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002763rm -f a.out a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002764ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002766# the compiler is broken, or we cross compile.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002767{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2768echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2769{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2770echo "${ECHO_T}$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002771
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002772{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2773echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774if { (ac_try="$ac_link"
2775case "(($ac_try" in
2776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2777 *) ac_try_echo=$ac_try;;
2778esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002780 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002784 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2785# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2786# work properly (i.e., refer to `conftest.exe'), while it won't with
2787# `rm'.
2788for ac_file in conftest.exe conftest conftest.*; do
2789 test -f "$ac_file" || continue
2790 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002791 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002792 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2793 break;;
2794 * ) break;;
2795 esac
2796done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002798 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002799See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002800echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002801See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002802 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002803fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002804
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002805rm -f conftest$ac_cv_exeext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002806{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2807echo "${ECHO_T}$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002808
2809rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002810EXEEXT=$ac_cv_exeext
2811ac_exeext=$EXEEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002812{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2813echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002814if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002815 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002816else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002817 cat >conftest.$ac_ext <<_ACEOF
2818/* confdefs.h. */
2819_ACEOF
2820cat confdefs.h >>conftest.$ac_ext
2821cat >>conftest.$ac_ext <<_ACEOF
2822/* end confdefs.h. */
2823
2824int
2825main ()
2826{
2827
2828 ;
2829 return 0;
2830}
2831_ACEOF
2832rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002833if { (ac_try="$ac_compile"
2834case "(($ac_try" in
2835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2836 *) ac_try_echo=$ac_try;;
2837esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002839 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843 for ac_file in conftest.o conftest.obj conftest.*; do
2844 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002846 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2848 break;;
2849 esac
2850done
2851else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002853sed 's/^/| /' conftest.$ac_ext >&5
2854
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002855{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002856See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002857echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002858See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002859 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002860fi
2861
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002862rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002863fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002864{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2865echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866OBJEXT=$ac_cv_objext
2867ac_objext=$OBJEXT
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002868{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2869echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002870if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002872else
2873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002874/* confdefs.h. */
2875_ACEOF
2876cat confdefs.h >>conftest.$ac_ext
2877cat >>conftest.$ac_ext <<_ACEOF
2878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002879
Martin v. Löwis11437992002-04-12 09:54:03 +00002880int
2881main ()
2882{
2883#ifndef __GNUC__
2884 choke me
2885#endif
2886
2887 ;
2888 return 0;
2889}
2890_ACEOF
2891rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002892if { (ac_try="$ac_compile"
2893case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2896esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002898 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002900 grep -v '^ *+' conftest.er1 >conftest.err
2901 rm -f conftest.er1
2902 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002904 (exit $ac_status); } && {
2905 test -z "$ac_c_werror_flag" ||
2906 test ! -s conftest.err
2907 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_compiler_gnu=yes
2909else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002911sed 's/^/| /' conftest.$ac_ext >&5
2912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002913 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002915
2916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002917ac_cv_c_compiler_gnu=$ac_compiler_gnu
2918
2919fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002920{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2921echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2922GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002923ac_test_CFLAGS=${CFLAGS+set}
2924ac_save_CFLAGS=$CFLAGS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002925{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2926echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002927if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002928 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002929else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 ac_save_c_werror_flag=$ac_c_werror_flag
2931 ac_c_werror_flag=yes
2932 ac_cv_prog_cc_g=no
2933 CFLAGS="-g"
2934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002935/* confdefs.h. */
2936_ACEOF
2937cat confdefs.h >>conftest.$ac_ext
2938cat >>conftest.$ac_ext <<_ACEOF
2939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941int
2942main ()
2943{
2944
2945 ;
2946 return 0;
2947}
2948_ACEOF
2949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002950if { (ac_try="$ac_compile"
2951case "(($ac_try" in
2952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2953 *) ac_try_echo=$ac_try;;
2954esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002958 grep -v '^ *+' conftest.er1 >conftest.err
2959 rm -f conftest.er1
2960 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002962 (exit $ac_status); } && {
2963 test -z "$ac_c_werror_flag" ||
2964 test ! -s conftest.err
2965 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002966 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002969sed 's/^/| /' conftest.$ac_ext >&5
2970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002971 CFLAGS=""
2972 cat >conftest.$ac_ext <<_ACEOF
2973/* confdefs.h. */
2974_ACEOF
2975cat confdefs.h >>conftest.$ac_ext
2976cat >>conftest.$ac_ext <<_ACEOF
2977/* end confdefs.h. */
2978
2979int
2980main ()
2981{
2982
2983 ;
2984 return 0;
2985}
2986_ACEOF
2987rm -f conftest.$ac_objext
2988if { (ac_try="$ac_compile"
2989case "(($ac_try" in
2990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2991 *) ac_try_echo=$ac_try;;
2992esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002994 (eval "$ac_compile") 2>conftest.er1
2995 ac_status=$?
2996 grep -v '^ *+' conftest.er1 >conftest.err
2997 rm -f conftest.er1
2998 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00002999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003000 (exit $ac_status); } && {
3001 test -z "$ac_c_werror_flag" ||
3002 test ! -s conftest.err
3003 } && test -s conftest.$ac_objext; then
3004 :
3005else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003006 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007sed 's/^/| /' conftest.$ac_ext >&5
3008
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010 CFLAGS="-g"
3011 cat >conftest.$ac_ext <<_ACEOF
3012/* confdefs.h. */
3013_ACEOF
3014cat confdefs.h >>conftest.$ac_ext
3015cat >>conftest.$ac_ext <<_ACEOF
3016/* end confdefs.h. */
3017
3018int
3019main ()
3020{
3021
3022 ;
3023 return 0;
3024}
3025_ACEOF
3026rm -f conftest.$ac_objext
3027if { (ac_try="$ac_compile"
3028case "(($ac_try" in
3029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3030 *) ac_try_echo=$ac_try;;
3031esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033 (eval "$ac_compile") 2>conftest.er1
3034 ac_status=$?
3035 grep -v '^ *+' conftest.er1 >conftest.err
3036 rm -f conftest.er1
3037 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039 (exit $ac_status); } && {
3040 test -z "$ac_c_werror_flag" ||
3041 test ! -s conftest.err
3042 } && test -s conftest.$ac_objext; then
3043 ac_cv_prog_cc_g=yes
3044else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003045 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046sed 's/^/| /' conftest.$ac_ext >&5
3047
3048
Guido van Rossum627b2d71993-12-24 10:39:16 +00003049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
3051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053
3054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3055fi
3056
3057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3058 ac_c_werror_flag=$ac_save_c_werror_flag
3059fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003060{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3061echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003062if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003063 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003064elif test $ac_cv_prog_cc_g = yes; then
3065 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003066 CFLAGS="-g -O2"
3067 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003068 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003069 fi
3070else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003071 if test "$GCC" = yes; then
3072 CFLAGS="-O2"
3073 else
3074 CFLAGS=
3075 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003076fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003077{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3078echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003080 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003081else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003083ac_save_CC=$CC
3084cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003085/* confdefs.h. */
3086_ACEOF
3087cat confdefs.h >>conftest.$ac_ext
3088cat >>conftest.$ac_ext <<_ACEOF
3089/* end confdefs.h. */
3090#include <stdarg.h>
3091#include <stdio.h>
3092#include <sys/types.h>
3093#include <sys/stat.h>
3094/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3095struct buf { int x; };
3096FILE * (*rcsopen) (struct buf *, struct stat *, int);
3097static char *e (p, i)
3098 char **p;
3099 int i;
3100{
3101 return p[i];
3102}
3103static char *f (char * (*g) (char **, int), char **p, ...)
3104{
3105 char *s;
3106 va_list v;
3107 va_start (v,p);
3108 s = g (p, va_arg (v,int));
3109 va_end (v);
3110 return s;
3111}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003112
3113/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3114 function prototypes and stuff, but not '\xHH' hex character constants.
3115 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3118 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003120int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3123 inside strings and character constants. */
3124#define FOO(x) 'x'
3125int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3126
Skip Montanaro6dead952003-09-25 14:50:04 +00003127int test (int i, double x);
3128struct s1 {int (*f) (int a);};
3129struct s2 {int (*f) (double a);};
3130int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3131int argc;
3132char **argv;
3133int
3134main ()
3135{
3136return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3137 ;
3138 return 0;
3139}
3140_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003141for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3142 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003143do
3144 CC="$ac_save_CC $ac_arg"
3145 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146if { (ac_try="$ac_compile"
3147case "(($ac_try" in
3148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3149 *) ac_try_echo=$ac_try;;
3150esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003151eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003154 grep -v '^ *+' conftest.er1 >conftest.err
3155 rm -f conftest.er1
3156 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 (exit $ac_status); } && {
3159 test -z "$ac_c_werror_flag" ||
3160 test ! -s conftest.err
3161 } && test -s conftest.$ac_objext; then
3162 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003163else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003165sed 's/^/| /' conftest.$ac_ext >&5
3166
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003167
Skip Montanaro6dead952003-09-25 14:50:04 +00003168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169
3170rm -f core conftest.err conftest.$ac_objext
3171 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003172done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003173rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003174CC=$ac_save_CC
3175
3176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177# AC_CACHE_VAL
3178case "x$ac_cv_prog_cc_c89" in
3179 x)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003180 { echo "$as_me:$LINENO: result: none needed" >&5
3181echo "${ECHO_T}none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182 xno)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003183 { echo "$as_me:$LINENO: result: unsupported" >&5
3184echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003185 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003187 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3188echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003189esac
3190
Skip Montanaro6dead952003-09-25 14:50:04 +00003191
Martin v. Löwis11437992002-04-12 09:54:03 +00003192ac_ext=c
3193ac_cpp='$CPP $CPPFLAGS'
3194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3196ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003197
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003198
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003199
3200
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003201{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3202echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003205if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003207
3208 case $withval in
3209 no) with_cxx_main=no
3210 MAINCC='$(CC)';;
3211 yes) with_cxx_main=yes
3212 MAINCC='$(CXX)';;
3213 *) with_cxx_main=yes
3214 MAINCC=$withval
3215 if test -z "$CXX"
3216 then
3217 CXX=$withval
3218 fi;;
3219 esac
3220else
3221
3222 with_cxx_main=no
3223 MAINCC='$(CC)'
3224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003227{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3228echo "${ECHO_T}$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003229
3230preset_cxx="$CXX"
3231if test -z "$CXX"
3232then
3233 case "$CC" in
3234 gcc) # Extract the first word of "g++", so it can be a program name with args.
3235set dummy g++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003238if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003239 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003240else
3241 case $CXX in
3242 [\\/]* | ?:[\\/]*)
3243 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3244 ;;
3245 *)
3246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in notfound
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
3251 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 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 +00003253 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003255 break 2
3256 fi
3257done
3258done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003260
3261 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3262 ;;
3263esac
3264fi
3265CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003266if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003267 { echo "$as_me:$LINENO: result: $CXX" >&5
3268echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003270 { echo "$as_me:$LINENO: result: no" >&5
3271echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003274 ;;
3275 cc) # Extract the first word of "c++", so it can be a program name with args.
3276set dummy c++; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003277{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3278echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003279if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003280 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003281else
3282 case $CXX in
3283 [\\/]* | ?:[\\/]*)
3284 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3285 ;;
3286 *)
3287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in notfound
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293 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 +00003294 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003296 break 2
3297 fi
3298done
3299done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003300IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003301
3302 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3303 ;;
3304esac
3305fi
3306CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003307if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003308 { echo "$as_me:$LINENO: result: $CXX" >&5
3309echo "${ECHO_T}$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003310else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003311 { echo "$as_me:$LINENO: result: no" >&5
3312echo "${ECHO_T}no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003315 ;;
3316 esac
3317 if test "$CXX" = "notfound"
3318 then
3319 CXX=""
3320 fi
3321fi
3322if test -z "$CXX"
3323then
3324 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3325do
3326 # Extract the first word of "$ac_prog", so it can be a program name with args.
3327set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003328{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003330if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003331 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332else
3333 if test -n "$CXX"; then
3334 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3335else
3336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337for as_dir in $PATH
3338do
3339 IFS=$as_save_IFS
3340 test -z "$as_dir" && as_dir=.
3341 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003342 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 +00003343 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003344 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003345 break 2
3346 fi
3347done
3348done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003350
3351fi
3352fi
3353CXX=$ac_cv_prog_CXX
3354if test -n "$CXX"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003355 { echo "$as_me:$LINENO: result: $CXX" >&5
3356echo "${ECHO_T}$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003358 { echo "$as_me:$LINENO: result: no" >&5
3359echo "${ECHO_T}no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360fi
3361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003363 test -n "$CXX" && break
3364done
3365test -n "$CXX" || CXX="notfound"
3366
3367 if test "$CXX" = "notfound"
3368 then
3369 CXX=""
3370 fi
3371fi
3372if test "$preset_cxx" != "$CXX"
3373then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003374 { echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375
3376 By default, distutils will build C++ extension modules with \"$CXX\".
3377 If this is not intended, then set CXX on the configure command line.
3378 " >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003379echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003380
3381 By default, distutils will build C++ extension modules with \"$CXX\".
3382 If this is not intended, then set CXX on the configure command line.
3383 " >&2;}
3384fi
3385
3386
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003387# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003388
3389ac_ext=c
3390ac_cpp='$CPP $CPPFLAGS'
3391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3393ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003394{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3395echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396# On Suns, sometimes $CPP names a directory.
3397if test -n "$CPP" && test -d "$CPP"; then
3398 CPP=
3399fi
3400if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003402 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404 # Double quotes because CPP needs to be expanded
3405 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3406 do
3407 ac_preproc_ok=false
3408for ac_c_preproc_warn_flag in '' yes
3409do
3410 # Use a header file that comes with gcc, so configuring glibc
3411 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003412 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3413 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003414 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003415 # not just through cpp. "Syntax error" is here to catch this case.
3416 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003417/* confdefs.h. */
3418_ACEOF
3419cat confdefs.h >>conftest.$ac_ext
3420cat >>conftest.$ac_ext <<_ACEOF
3421/* end confdefs.h. */
3422#ifdef __STDC__
3423# include <limits.h>
3424#else
3425# include <assert.h>
3426#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003427 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003428_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429if { (ac_try="$ac_cpp conftest.$ac_ext"
3430case "(($ac_try" in
3431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3432 *) ac_try_echo=$ac_try;;
3433esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003436 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003437 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003438 rm -f conftest.er1
3439 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003441 (exit $ac_status); } >/dev/null && {
3442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3443 test ! -s conftest.err
3444 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003445 :
3446else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003448sed 's/^/| /' conftest.$ac_ext >&5
3449
Martin v. Löwis11437992002-04-12 09:54:03 +00003450 # Broken: fails on valid input.
3451continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453
Martin v. Löwis11437992002-04-12 09:54:03 +00003454rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003456 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003457 # can be detected and how.
3458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003459/* confdefs.h. */
3460_ACEOF
3461cat confdefs.h >>conftest.$ac_ext
3462cat >>conftest.$ac_ext <<_ACEOF
3463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003464#include <ac_nonexistent.h>
3465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466if { (ac_try="$ac_cpp conftest.$ac_ext"
3467case "(($ac_try" in
3468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469 *) ac_try_echo=$ac_try;;
3470esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003473 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003474 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003475 rm -f conftest.er1
3476 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 (exit $ac_status); } >/dev/null && {
3479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3480 test ! -s conftest.err
3481 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003482 # Broken: success on invalid input.
3483continue
3484else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003486sed 's/^/| /' conftest.$ac_ext >&5
3487
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 # Passes both tests.
3489ac_preproc_ok=:
3490break
3491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492
Martin v. Löwis11437992002-04-12 09:54:03 +00003493rm -f conftest.err conftest.$ac_ext
3494
3495done
3496# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3497rm -f conftest.err conftest.$ac_ext
3498if $ac_preproc_ok; then
3499 break
3500fi
3501
3502 done
3503 ac_cv_prog_CPP=$CPP
3504
3505fi
3506 CPP=$ac_cv_prog_CPP
3507else
3508 ac_cv_prog_CPP=$CPP
3509fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003510{ echo "$as_me:$LINENO: result: $CPP" >&5
3511echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003512ac_preproc_ok=false
3513for ac_c_preproc_warn_flag in '' yes
3514do
3515 # Use a header file that comes with gcc, so configuring glibc
3516 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003517 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3518 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003519 # On the NeXT, cc -E runs the code through the compiler's parser,
3520 # not just through cpp. "Syntax error" is here to catch this case.
3521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003522/* confdefs.h. */
3523_ACEOF
3524cat confdefs.h >>conftest.$ac_ext
3525cat >>conftest.$ac_ext <<_ACEOF
3526/* end confdefs.h. */
3527#ifdef __STDC__
3528# include <limits.h>
3529#else
3530# include <assert.h>
3531#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003532 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003534if { (ac_try="$ac_cpp conftest.$ac_ext"
3535case "(($ac_try" in
3536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3537 *) ac_try_echo=$ac_try;;
3538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 rm -f conftest.er1
3544 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 (exit $ac_status); } >/dev/null && {
3547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3548 test ! -s conftest.err
3549 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003550 :
3551else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003553sed 's/^/| /' conftest.$ac_ext >&5
3554
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 # Broken: fails on valid input.
3556continue
3557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558
Martin v. Löwis11437992002-04-12 09:54:03 +00003559rm -f conftest.err conftest.$ac_ext
3560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003562 # can be detected and how.
3563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003564/* confdefs.h. */
3565_ACEOF
3566cat confdefs.h >>conftest.$ac_ext
3567cat >>conftest.$ac_ext <<_ACEOF
3568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003569#include <ac_nonexistent.h>
3570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571if { (ac_try="$ac_cpp conftest.$ac_ext"
3572case "(($ac_try" in
3573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3574 *) ac_try_echo=$ac_try;;
3575esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003579 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003580 rm -f conftest.er1
3581 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583 (exit $ac_status); } >/dev/null && {
3584 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3585 test ! -s conftest.err
3586 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 # Broken: success on invalid input.
3588continue
3589else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003591sed 's/^/| /' conftest.$ac_ext >&5
3592
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 # Passes both tests.
3594ac_preproc_ok=:
3595break
3596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597
Martin v. Löwis11437992002-04-12 09:54:03 +00003598rm -f conftest.err conftest.$ac_ext
3599
3600done
3601# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3602rm -f conftest.err conftest.$ac_ext
3603if $ac_preproc_ok; then
3604 :
3605else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003606 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003607See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003608echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003609See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003610 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
3613ac_ext=c
3614ac_cpp='$CPP $CPPFLAGS'
3615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3617ac_compiler_gnu=$ac_cv_c_compiler_gnu
3618
3619
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003620{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3621echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003623 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003624else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003625 # Extract the first word of "grep ggrep" to use in msg output
3626if test -z "$GREP"; then
3627set dummy grep ggrep; ac_prog_name=$2
3628if test "${ac_cv_path_GREP+set}" = set; then
3629 echo $ECHO_N "(cached) $ECHO_C" >&6
3630else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 ac_path_GREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003632# Loop through the user's path and test for each of PROGNAME-LIST
3633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003634for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
3638 for ac_prog in grep ggrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003639 for ac_exec_ext in '' $ac_executable_extensions; do
3640 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3641 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3642 # Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 # Check for GNU $ac_path_GREP
3644case `"$ac_path_GREP" --version 2>&1` in
3645*GNU*)
3646 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3647*)
3648 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003649 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650 while :
3651 do
3652 cat "conftest.in" "conftest.in" >"conftest.tmp"
3653 mv "conftest.tmp" "conftest.in"
3654 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003655 echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3657 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3658 ac_count=`expr $ac_count + 1`
3659 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3660 # Best one so far, save it but keep looking for a better one
3661 ac_cv_path_GREP="$ac_path_GREP"
3662 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664 # 10*(2^10) chars as input seems more than enough
3665 test $ac_count -gt 10 && break
3666 done
3667 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3668esac
3669
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003670
3671 $ac_path_GREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672 done
3673done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003674
3675done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003677
3678
3679fi
3680
3681GREP="$ac_cv_path_GREP"
3682if test -z "$GREP"; then
3683 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3684echo "$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 +00003685 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003686fi
3687
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688else
3689 ac_cv_path_GREP=$GREP
3690fi
3691
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003694{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3695echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696 GREP="$ac_cv_path_GREP"
3697
3698
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003699{ echo "$as_me:$LINENO: checking for egrep" >&5
3700echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003702 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703else
3704 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3705 then ac_cv_path_EGREP="$GREP -E"
3706 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003707 # Extract the first word of "egrep" to use in msg output
3708if test -z "$EGREP"; then
3709set dummy egrep; ac_prog_name=$2
3710if test "${ac_cv_path_EGREP+set}" = set; then
3711 echo $ECHO_N "(cached) $ECHO_C" >&6
3712else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713 ac_path_EGREP_found=false
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003714# Loop through the user's path and test for each of PROGNAME-LIST
3715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003716for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
3720 for ac_prog in egrep; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003721 for ac_exec_ext in '' $ac_executable_extensions; do
3722 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3723 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3724 # Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 # Check for GNU $ac_path_EGREP
3726case `"$ac_path_EGREP" --version 2>&1` in
3727*GNU*)
3728 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3729*)
3730 ac_count=0
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003731 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732 while :
3733 do
3734 cat "conftest.in" "conftest.in" >"conftest.tmp"
3735 mv "conftest.tmp" "conftest.in"
3736 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003737 echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3739 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3740 ac_count=`expr $ac_count + 1`
3741 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3742 # Best one so far, save it but keep looking for a better one
3743 ac_cv_path_EGREP="$ac_path_EGREP"
3744 ac_path_EGREP_max=$ac_count
3745 fi
3746 # 10*(2^10) chars as input seems more than enough
3747 test $ac_count -gt 10 && break
3748 done
3749 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3750esac
3751
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003752
3753 $ac_path_EGREP_found && break 3
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754 done
3755done
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003756
3757done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758IFS=$as_save_IFS
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003759
3760
3761fi
3762
3763EGREP="$ac_cv_path_EGREP"
3764if test -z "$EGREP"; then
3765 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3766echo "$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 +00003767 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003768fi
3769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770else
3771 ac_cv_path_EGREP=$EGREP
3772fi
3773
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775 fi
3776fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003777{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3778echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003780
3781
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003782
3783{ echo "$as_me:$LINENO: checking for AIX" >&5
3784echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3785cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00003786/* confdefs.h. */
3787_ACEOF
3788cat confdefs.h >>conftest.$ac_ext
3789cat >>conftest.$ac_ext <<_ACEOF
3790/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003791#ifdef _AIX
3792 yes
Antoine Pitrou20327222009-05-24 20:39:11 +00003793#endif
3794
Antoine Pitrou20327222009-05-24 20:39:11 +00003795_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3797 $EGREP "yes" >/dev/null 2>&1; then
3798 { echo "$as_me:$LINENO: result: yes" >&5
3799echo "${ECHO_T}yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003800cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003801#define _ALL_SOURCE 1
3802_ACEOF
3803
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003804else
3805 { echo "$as_me:$LINENO: result: no" >&5
3806echo "${ECHO_T}no" >&6; }
3807fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00003808rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003809
3810
3811
3812# Check for unsupported systems
3813case $ac_sys_system/$ac_sys_release in
3814atheos*|Linux*/1*)
3815 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3816 echo See README for details.
3817 exit 1;;
3818esac
3819
3820
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003821{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3822echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003823
3824# Check whether --with-suffix was given.
3825if test "${with_suffix+set}" = set; then
3826 withval=$with_suffix;
3827 case $withval in
3828 no) EXEEXT=;;
3829 yes) EXEEXT=.exe;;
3830 *) EXEEXT=$withval;;
3831 esac
3832fi
3833
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003834{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3835echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003836
3837# Test whether we're running on a non-case-sensitive system, in which
3838# case we give a warning if no ext is given
3839
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003840{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3841echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003842if test ! -d CaseSensitiveTestDir; then
3843mkdir CaseSensitiveTestDir
3844fi
3845
3846if test -d casesensitivetestdir
3847then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003848 { echo "$as_me:$LINENO: result: yes" >&5
3849echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003850 BUILDEXEEXT=.exe
3851else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003852 { echo "$as_me:$LINENO: result: no" >&5
3853echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003854 BUILDEXEEXT=$EXEEXT
3855fi
3856rmdir CaseSensitiveTestDir
3857
3858case $MACHDEP in
3859bsdos*)
3860 case $CC in
3861 gcc) CC="$CC -D_HAVE_BSDI";;
3862 esac;;
3863esac
3864
3865case $ac_sys_system in
3866hp*|HP*)
3867 case $CC in
3868 cc|*/cc) CC="$CC -Ae";;
3869 esac;;
3870Monterey*)
3871 case $CC in
3872 cc) CC="$CC -Wl,-Bexport";;
3873 esac;;
3874SunOS*)
3875 # Some functions have a prototype only with that define, e.g. confstr
3876
3877cat >>confdefs.h <<\_ACEOF
3878#define __EXTENSIONS__ 1
3879_ACEOF
3880
3881 ;;
3882esac
3883
3884
3885
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003886{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3887echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003888if test -z "$LIBRARY"
3889then
3890 LIBRARY='libpython$(VERSION).a'
3891fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003892{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3893echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003894
3895# LDLIBRARY is the name of the library to link against (as opposed to the
3896# name of the library into which to insert object files). BLDLIBRARY is also
3897# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3898# is blank as the main program is not linked directly against LDLIBRARY.
3899# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3900# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3901# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3902# DLLLIBRARY is the shared (i.e., DLL) library.
3903#
3904# RUNSHARED is used to run shared python without installed libraries
3905#
3906# INSTSONAME is the name of the shared library that will be use to install
3907# on the system - some systems like version suffix, others don't
3908
3909
3910
3911
3912
3913
3914LDLIBRARY="$LIBRARY"
3915BLDLIBRARY='$(LDLIBRARY)'
3916INSTSONAME='$(LDLIBRARY)'
3917DLLLIBRARY=''
3918LDLIBRARYDIR=''
3919RUNSHARED=''
3920
3921# LINKCC is the command that links the python executable -- default is $(CC).
3922# If CXX is set, and if it is needed to link a main function that was
3923# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3924# python might then depend on the C++ runtime
3925# This is altered for AIX in order to build the export list before
3926# linking.
3927
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003928{ echo "$as_me:$LINENO: checking LINKCC" >&5
3929echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003930if test -z "$LINKCC"
3931then
3932 LINKCC='$(PURIFY) $(MAINCC)'
3933 case $ac_sys_system in
3934 AIX*)
3935 exp_extra="\"\""
3936 if test $ac_sys_release -ge 5 -o \
3937 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3938 exp_extra="."
3939 fi
3940 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
3941 Monterey64*)
3942 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
3943 QNX*)
3944 # qcc must be used because the other compilers do not
3945 # support -N.
3946 LINKCC=qcc;;
3947 esac
3948fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003949{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3950echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003951
3952# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
3953# make sure we default having it set to "no": this is used by
3954# distutils.unixccompiler to know if it should add --enable-new-dtags
3955# to linker command lines, and failing to detect GNU ld simply results
3956# in the same bahaviour as before.
3957
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003958{ echo "$as_me:$LINENO: checking for GNU ld" >&5
3959echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003960ac_prog=ld
3961if test "$GCC" = yes; then
3962 ac_prog=`$CC -print-prog-name=ld`
3963fi
3964case `"$ac_prog" -V 2>&1 < /dev/null` in
3965 *GNU*)
3966 GNULD=yes;;
3967 *)
3968 GNULD=no;;
3969esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003970{ echo "$as_me:$LINENO: result: $GNULD" >&5
3971echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003972
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003973{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3974echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003975# Check whether --enable-shared was given.
3976if test "${enable_shared+set}" = set; then
3977 enableval=$enable_shared;
3978fi
3979
3980
3981if test -z "$enable_shared"
3982then
3983 case $ac_sys_system in
3984 CYGWIN* | atheos*)
3985 enable_shared="yes";;
3986 *)
3987 enable_shared="no";;
3988 esac
3989fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003990{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3991echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003992
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003993{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3994echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003995# Check whether --enable-profiling was given.
3996if test "${enable_profiling+set}" = set; then
3997 enableval=$enable_profiling; ac_save_cc="$CC"
3998 CC="$CC -pg"
3999 if test "$cross_compiling" = yes; then
4000 ac_enable_profiling="no"
4001else
4002 cat >conftest.$ac_ext <<_ACEOF
4003/* confdefs.h. */
4004_ACEOF
4005cat confdefs.h >>conftest.$ac_ext
4006cat >>conftest.$ac_ext <<_ACEOF
4007/* end confdefs.h. */
4008int main() { return 0; }
4009_ACEOF
4010rm -f conftest$ac_exeext
4011if { (ac_try="$ac_link"
4012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004017 (eval "$ac_link") 2>&5
4018 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4021 { (case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004026 (eval "$ac_try") 2>&5
4027 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004029 (exit $ac_status); }; }; then
4030 ac_enable_profiling="yes"
4031else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004032 echo "$as_me: program exited with status $ac_status" >&5
4033echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004034sed 's/^/| /' conftest.$ac_ext >&5
4035
4036( exit $ac_status )
4037ac_enable_profiling="no"
4038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4040fi
4041
4042
4043 CC="$ac_save_cc"
4044fi
4045
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004046{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4047echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004048
4049case "$ac_enable_profiling" in
4050 "yes")
4051 BASECFLAGS="-pg $BASECFLAGS"
4052 LDFLAGS="-pg $LDFLAGS"
4053 ;;
4054esac
4055
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004056{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4057echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004058
4059# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4060# library that we build, but we do not want to link against it (we
4061# will find it with a -framework option). For this reason there is an
4062# extra variable BLDLIBRARY against which Python and the extension
4063# modules are linked, BLDLIBRARY. This is normally the same as
4064# LDLIBRARY, but empty for MacOSX framework builds.
4065if test "$enable_framework"
4066then
4067 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4068 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4069 BLDLIBRARY=''
4070else
4071 BLDLIBRARY='$(LDLIBRARY)'
4072fi
4073
4074# Other platforms follow
4075if test $enable_shared = "yes"; then
4076
4077cat >>confdefs.h <<\_ACEOF
4078#define Py_ENABLE_SHARED 1
4079_ACEOF
4080
4081 case $ac_sys_system in
4082 CYGWIN*)
4083 LDLIBRARY='libpython$(VERSION).dll.a'
4084 DLLLIBRARY='libpython$(VERSION).dll'
4085 ;;
4086 SunOS*)
4087 LDLIBRARY='libpython$(VERSION).so'
4088 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4089 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4090 INSTSONAME="$LDLIBRARY".$SOVERSION
4091 ;;
4092 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4093 LDLIBRARY='libpython$(VERSION).so'
4094 BLDLIBRARY='-L. -lpython$(VERSION)'
4095 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4096 case $ac_sys_system in
4097 FreeBSD*)
4098 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4099 ;;
4100 esac
4101 INSTSONAME="$LDLIBRARY".$SOVERSION
4102 ;;
4103 hp*|HP*)
4104 case `uname -m` in
4105 ia64)
4106 LDLIBRARY='libpython$(VERSION).so'
4107 ;;
4108 *)
4109 LDLIBRARY='libpython$(VERSION).sl'
4110 ;;
4111 esac
4112 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4113 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4114 ;;
4115 OSF*)
4116 LDLIBRARY='libpython$(VERSION).so'
4117 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4118 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4119 ;;
4120 atheos*)
4121 LDLIBRARY='libpython$(VERSION).so'
4122 BLDLIBRARY='-L. -lpython$(VERSION)'
4123 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4124 ;;
4125 Darwin*)
4126 LDLIBRARY='libpython$(VERSION).dylib'
4127 BLDLIBRARY='-L. -lpython$(VERSION)'
4128 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4129 ;;
4130
4131 esac
4132else # shared is disabled
4133 case $ac_sys_system in
4134 CYGWIN*)
4135 BLDLIBRARY='$(LIBRARY)'
4136 LDLIBRARY='libpython$(VERSION).dll.a'
4137 ;;
4138 esac
4139fi
4140
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004141{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4142echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004143
4144if test -n "$ac_tool_prefix"; then
4145 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4146set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004147{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004149if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004150 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004151else
4152 if test -n "$RANLIB"; then
4153 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4154else
4155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4156for as_dir in $PATH
4157do
4158 IFS=$as_save_IFS
4159 test -z "$as_dir" && as_dir=.
4160 for ac_exec_ext in '' $ac_executable_extensions; do
4161 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4162 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004163 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004164 break 2
4165 fi
4166done
4167done
4168IFS=$as_save_IFS
4169
4170fi
4171fi
4172RANLIB=$ac_cv_prog_RANLIB
4173if test -n "$RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004174 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4175echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004176else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004177 { echo "$as_me:$LINENO: result: no" >&5
4178echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004179fi
4180
4181
4182fi
4183if test -z "$ac_cv_prog_RANLIB"; then
4184 ac_ct_RANLIB=$RANLIB
4185 # Extract the first word of "ranlib", so it can be a program name with args.
4186set dummy ranlib; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004189if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004190 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004191else
4192 if test -n "$ac_ct_RANLIB"; then
4193 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4194else
4195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4196for as_dir in $PATH
4197do
4198 IFS=$as_save_IFS
4199 test -z "$as_dir" && as_dir=.
4200 for ac_exec_ext in '' $ac_executable_extensions; do
4201 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4202 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004203 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004204 break 2
4205 fi
4206done
4207done
4208IFS=$as_save_IFS
4209
4210fi
4211fi
4212ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4213if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004214 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4215echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004216else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004217 { echo "$as_me:$LINENO: result: no" >&5
4218echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004219fi
4220
4221 if test "x$ac_ct_RANLIB" = x; then
4222 RANLIB=":"
4223 else
4224 case $cross_compiling:$ac_tool_warned in
4225yes:)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004226{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4227whose name does not start with the host triplet. If you think this
4228configuration is useful to you, please write to autoconf@gnu.org." >&5
4229echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4230whose name does not start with the host triplet. If you think this
4231configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004232ac_tool_warned=yes ;;
4233esac
4234 RANLIB=$ac_ct_RANLIB
4235 fi
4236else
4237 RANLIB="$ac_cv_prog_RANLIB"
4238fi
4239
4240
4241for ac_prog in ar aal
4242do
4243 # Extract the first word of "$ac_prog", so it can be a program name with args.
4244set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004245{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004247if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004248 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004249else
4250 if test -n "$AR"; then
4251 ac_cv_prog_AR="$AR" # Let the user override the test.
4252else
4253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4254for as_dir in $PATH
4255do
4256 IFS=$as_save_IFS
4257 test -z "$as_dir" && as_dir=.
4258 for ac_exec_ext in '' $ac_executable_extensions; do
4259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4260 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004262 break 2
4263 fi
4264done
4265done
4266IFS=$as_save_IFS
4267
4268fi
4269fi
4270AR=$ac_cv_prog_AR
4271if test -n "$AR"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004272 { echo "$as_me:$LINENO: result: $AR" >&5
4273echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004274else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004275 { echo "$as_me:$LINENO: result: no" >&5
4276echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004277fi
4278
4279
4280 test -n "$AR" && break
4281done
4282test -n "$AR" || AR="ar"
4283
4284
4285# tweak ARFLAGS only if the user didn't set it on the command line
4286
4287if test -z "$ARFLAGS"
4288then
4289 ARFLAGS="rc"
4290fi
4291
4292
4293# Extract the first word of "svnversion", so it can be a program name with args.
4294set dummy svnversion; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004295{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004297if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004298 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004299else
4300 if test -n "$SVNVERSION"; then
4301 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4302else
4303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306 IFS=$as_save_IFS
4307 test -z "$as_dir" && as_dir=.
4308 for ac_exec_ext in '' $ac_executable_extensions; do
4309 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4310 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004311 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004312 break 2
4313 fi
4314done
4315done
4316IFS=$as_save_IFS
4317
4318 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4319fi
4320fi
4321SVNVERSION=$ac_cv_prog_SVNVERSION
4322if test -n "$SVNVERSION"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004323 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4324echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004325else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004326 { echo "$as_me:$LINENO: result: no" >&5
4327echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004328fi
4329
4330
4331if test $SVNVERSION = found
4332then
4333 SVNVERSION="svnversion \$(srcdir)"
4334else
4335 SVNVERSION="echo Unversioned directory"
4336fi
4337
4338case $MACHDEP in
4339bsdos*|hp*|HP*)
4340 # install -d does not work on BSDI or HP-UX
4341 if test -z "$INSTALL"
4342 then
4343 INSTALL="${srcdir}/install-sh -c"
4344 fi
4345esac
4346ac_aux_dir=
4347for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4348 if test -f "$ac_dir/install-sh"; then
4349 ac_aux_dir=$ac_dir
4350 ac_install_sh="$ac_aux_dir/install-sh -c"
4351 break
4352 elif test -f "$ac_dir/install.sh"; then
4353 ac_aux_dir=$ac_dir
4354 ac_install_sh="$ac_aux_dir/install.sh -c"
4355 break
4356 elif test -f "$ac_dir/shtool"; then
4357 ac_aux_dir=$ac_dir
4358 ac_install_sh="$ac_aux_dir/shtool install -c"
4359 break
4360 fi
4361done
4362if test -z "$ac_aux_dir"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004363 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4364echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004365 { (exit 1); exit 1; }; }
4366fi
4367
4368# These three variables are undocumented and unsupported,
4369# and are intended to be withdrawn in a future Autoconf release.
4370# They can cause serious problems if a builder's source tree is in a directory
4371# whose full name contains unusual characters.
4372ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4373ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4374ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4375
4376
4377# Find a good install program. We prefer a C program (faster),
4378# so one script is as good as another. But avoid the broken or
4379# incompatible versions:
4380# SysV /etc/install, /usr/sbin/install
4381# SunOS /usr/etc/install
4382# IRIX /sbin/install
4383# AIX /bin/install
4384# AmigaOS /C/install, which installs bootblocks on floppy discs
4385# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4386# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4387# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4388# OS/2's system install, which has a completely different semantic
4389# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004390{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4391echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004392if test -z "$INSTALL"; then
4393if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004394 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004395else
4396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399 IFS=$as_save_IFS
4400 test -z "$as_dir" && as_dir=.
4401 # Account for people who put trailing slashes in PATH elements.
4402case $as_dir/ in
4403 ./ | .// | /cC/* | \
4404 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4405 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4406 /usr/ucb/* ) ;;
4407 *)
4408 # OSF1 and SCO ODT 3.0 have their own names for install.
4409 # Don't use installbsd from OSF since it installs stuff as root
4410 # by default.
4411 for ac_prog in ginstall scoinst install; do
4412 for ac_exec_ext in '' $ac_executable_extensions; do
4413 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4414 if test $ac_prog = install &&
4415 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4416 # AIX install. It has an incompatible calling convention.
4417 :
4418 elif test $ac_prog = install &&
4419 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4420 # program-specific install script used by HP pwplus--don't use.
4421 :
4422 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004423 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4424 break 3
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004425 fi
4426 fi
4427 done
4428 done
4429 ;;
4430esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004431done
4432IFS=$as_save_IFS
4433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004434
4435fi
4436 if test "${ac_cv_path_install+set}" = set; then
4437 INSTALL=$ac_cv_path_install
4438 else
4439 # As a last resort, use the slow shell script. Don't cache a
4440 # value for INSTALL within a source directory, because that will
4441 # break other packages using the cache if that directory is
4442 # removed, or if the value is a relative name.
4443 INSTALL=$ac_install_sh
4444 fi
4445fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004446{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4447echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004448
4449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4450# It thinks the first close brace ends the variable substitution.
4451test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4452
4453test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4454
4455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4456
4457
4458# Not every filesystem supports hard links
4459
4460if test -z "$LN" ; then
4461 case $ac_sys_system in
4462 CYGWIN*) LN="ln -s";;
4463 atheos*) LN="ln -s";;
4464 *) LN=ln;;
4465 esac
4466fi
4467
4468# Check for --with-pydebug
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004469{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4470echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004471
4472# Check whether --with-pydebug was given.
4473if test "${with_pydebug+set}" = set; then
4474 withval=$with_pydebug;
4475if test "$withval" != no
4476then
4477
4478cat >>confdefs.h <<\_ACEOF
4479#define Py_DEBUG 1
4480_ACEOF
4481
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004482 { echo "$as_me:$LINENO: result: yes" >&5
4483echo "${ECHO_T}yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004484 Py_DEBUG='true'
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004485else { echo "$as_me:$LINENO: result: no" >&5
4486echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004487fi
4488else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004489 { echo "$as_me:$LINENO: result: no" >&5
4490echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004491fi
4492
4493
4494# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4495# merged with this chunk of code?
4496
4497# Optimizer/debugger flags
4498# ------------------------
4499# (The following bit of code is complicated enough - please keep things
4500# indented properly. Just pretend you're editing Python code. ;-)
4501
4502# There are two parallel sets of case statements below, one that checks to
4503# see if OPT was set and one that does BASECFLAGS setting based upon
4504# compiler and platform. BASECFLAGS tweaks need to be made even if the
4505# user set OPT.
4506
4507# tweak OPT based on compiler and platform, only if the user didn't set
4508# it on the command line
4509
4510if test -z "$OPT"
4511then
4512 case $GCC in
4513 yes)
4514 if test "$CC" != 'g++' ; then
4515 STRICT_PROTO="-Wstrict-prototypes"
4516 fi
4517 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4518 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4519 WRAP="-fwrapv"
4520 fi
4521 case $ac_cv_prog_cc_g in
4522 yes)
4523 if test "$Py_DEBUG" = 'true' ; then
4524 # Optimization messes up debuggers, so turn it off for
4525 # debug builds.
4526 OPT="-g -Wall $STRICT_PROTO"
4527 else
4528 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4529 fi
4530 ;;
4531 *)
4532 OPT="-O3 -Wall $STRICT_PROTO"
4533 ;;
4534 esac
4535 case $ac_sys_system in
4536 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4537 ;;
4538 esac
4539 ;;
4540
4541 *)
4542 OPT="-O"
4543 ;;
4544 esac
4545
4546 # The current (beta) Monterey compiler dies with optimizations
4547 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
4548 case $ac_sys_system in
4549 Monterey*)
4550 OPT=""
4551 ;;
4552 esac
4553
4554fi
4555
4556
4557
4558# The -arch flags for universal builds on OSX
4559UNIVERSAL_ARCH_FLAGS=
4560
4561
4562# tweak BASECFLAGS based on compiler and platform
4563case $GCC in
4564yes)
4565 # Python violates C99 rules, by casting between incompatible
4566 # pointer types. GCC may generate bad code as a result of that,
4567 # so use -fno-strict-aliasing if supported.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004568 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4569echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004570 ac_save_cc="$CC"
4571 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004572 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4573 echo $ECHO_N "(cached) $ECHO_C" >&6
4574else
4575 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004576 ac_cv_no_strict_aliasing_ok=no
4577else
4578 cat >conftest.$ac_ext <<_ACEOF
4579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
4584int main() { return 0; }
4585_ACEOF
4586rm -f conftest$ac_exeext
4587if { (ac_try="$ac_link"
4588case "(($ac_try" in
4589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4590 *) ac_try_echo=$ac_try;;
4591esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004593 (eval "$ac_link") 2>&5
4594 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004596 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4597 { (case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004602 (eval "$ac_try") 2>&5
4603 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004605 (exit $ac_status); }; }; then
4606 ac_cv_no_strict_aliasing_ok=yes
4607else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004608 echo "$as_me: program exited with status $ac_status" >&5
4609echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004610sed 's/^/| /' conftest.$ac_ext >&5
4611
4612( exit $ac_status )
4613ac_cv_no_strict_aliasing_ok=no
4614fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4616fi
4617
4618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00004619fi
4620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004621 CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004622 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4623echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004624 if test $ac_cv_no_strict_aliasing_ok = yes
4625 then
4626 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4627 fi
4628
4629 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4630 # support. Without this, treatment of subnormals doesn't follow
4631 # the standard.
4632 case $ac_sys_machine in
4633 alpha*)
4634 BASECFLAGS="$BASECFLAGS -mieee"
4635 ;;
4636 esac
4637
4638 case $ac_sys_system in
4639 SCO_SV*)
4640 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4641 ;;
4642 # is there any other compiler on Darwin besides gcc?
4643 Darwin*)
4644 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4645 # used to be here, but non-Apple gcc doesn't accept them.
4646
4647
4648 if test "${enable_universalsdk}"; then
4649 UNIVERSAL_ARCH_FLAGS=""
4650 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4651 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4652 ARCH_RUN_32BIT=""
4653
4654 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4655 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004656 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004657
4658 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4659 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4660 ARCH_RUN_32BIT="arch -i386 -ppc"
4661
4662 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004663 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4664echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004665 { (exit 1); exit 1; }; }
4666
4667 fi
4668
4669
4670 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4671 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4672 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4673 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4674 fi
4675 fi
4676
4677 # Calculate the right deployment target for this build.
4678 #
4679 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4680 if test ${cur_target} '>' 10.2; then
4681 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00004682 if test ${enable_universalsdk}; then
4683 if test "${UNIVERSAL_ARCHS}" = "all"; then
4684 # Ensure that the default platform for a
4685 # 4-way universal build is OSX 10.5,
4686 # that's the first OS release where
4687 # 4-way builds make sense.
4688 cur_target='10.5'
4689 fi
4690 else
4691 if test `arch` = "i386"; then
4692 # On Intel macs default to a deployment
4693 # target of 10.4, that's the first OSX
4694 # release with Intel support.
4695 cur_target="10.4"
4696 fi
4697 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698 fi
4699 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4700
4701 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4702 # environment with a value that is the same as what we'll use
4703 # in the Makefile to ensure that we'll get the same compiler
4704 # environment during configure and build time.
4705 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4706 export MACOSX_DEPLOYMENT_TARGET
4707 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4708
4709 ;;
4710 OSF*)
4711 BASECFLAGS="$BASECFLAGS -mieee"
4712 ;;
4713 esac
4714 ;;
4715
4716*)
4717 case $ac_sys_system in
4718 OpenUNIX*|UnixWare*)
4719 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4720 ;;
4721 OSF*)
4722 BASECFLAGS="$BASECFLAGS -ieee -std"
4723 ;;
4724 SCO_SV*)
4725 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4726 ;;
4727 esac
4728 ;;
4729esac
4730
4731if test "$Py_DEBUG" = 'true'; then
4732 :
4733else
4734 OPT="-DNDEBUG $OPT"
4735fi
4736
4737if test "$ac_arch_flags"
4738then
4739 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4740fi
4741
4742# disable check for icc since it seems to pass, but generates a warning
4743if test "$CC" = icc
4744then
4745 ac_cv_opt_olimit_ok=no
4746fi
4747
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004748{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4749echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004750if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004751 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752else
4753 ac_save_cc="$CC"
4754CC="$CC -OPT:Olimit=0"
4755if test "$cross_compiling" = yes; then
4756 ac_cv_opt_olimit_ok=no
4757else
4758 cat >conftest.$ac_ext <<_ACEOF
4759/* confdefs.h. */
4760_ACEOF
4761cat confdefs.h >>conftest.$ac_ext
4762cat >>conftest.$ac_ext <<_ACEOF
4763/* end confdefs.h. */
4764int main() { return 0; }
4765_ACEOF
4766rm -f conftest$ac_exeext
4767if { (ac_try="$ac_link"
4768case "(($ac_try" in
4769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4770 *) ac_try_echo=$ac_try;;
4771esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004773 (eval "$ac_link") 2>&5
4774 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004776 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4777 { (case "(($ac_try" in
4778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4779 *) ac_try_echo=$ac_try;;
4780esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782 (eval "$ac_try") 2>&5
4783 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004785 (exit $ac_status); }; }; then
4786 ac_cv_opt_olimit_ok=yes
4787else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004788 echo "$as_me: program exited with status $ac_status" >&5
4789echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004790sed 's/^/| /' conftest.$ac_ext >&5
4791
4792( exit $ac_status )
4793ac_cv_opt_olimit_ok=no
4794fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4796fi
4797
4798
4799CC="$ac_save_cc"
4800fi
4801
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004802{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4803echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004804if test $ac_cv_opt_olimit_ok = yes; then
4805 case $ac_sys_system in
4806 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4807 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4808 # environment?
4809 Darwin*)
4810 ;;
4811 *)
4812 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4813 ;;
4814 esac
4815else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004816 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4817echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004818 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004819 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004820else
4821 ac_save_cc="$CC"
4822 CC="$CC -Olimit 1500"
4823 if test "$cross_compiling" = yes; then
4824 ac_cv_olimit_ok=no
4825else
4826 cat >conftest.$ac_ext <<_ACEOF
4827/* confdefs.h. */
4828_ACEOF
4829cat confdefs.h >>conftest.$ac_ext
4830cat >>conftest.$ac_ext <<_ACEOF
4831/* end confdefs.h. */
4832int main() { return 0; }
4833_ACEOF
4834rm -f conftest$ac_exeext
4835if { (ac_try="$ac_link"
4836case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004840eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004841 (eval "$ac_link") 2>&5
4842 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4845 { (case "(($ac_try" in
4846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4847 *) ac_try_echo=$ac_try;;
4848esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004849eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004850 (eval "$ac_try") 2>&5
4851 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004853 (exit $ac_status); }; }; then
4854 ac_cv_olimit_ok=yes
4855else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004856 echo "$as_me: program exited with status $ac_status" >&5
4857echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004858sed 's/^/| /' conftest.$ac_ext >&5
4859
4860( exit $ac_status )
4861ac_cv_olimit_ok=no
4862fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4864fi
4865
4866
4867 CC="$ac_save_cc"
4868fi
4869
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004870 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4871echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 if test $ac_cv_olimit_ok = yes; then
4873 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4874 fi
4875fi
4876
4877# Check whether GCC supports PyArg_ParseTuple format
4878if test "$GCC" = "yes"
4879then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004880 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4881echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882 save_CFLAGS=$CFLAGS
4883 CFLAGS="$CFLAGS -Werror"
4884 cat >conftest.$ac_ext <<_ACEOF
4885/* confdefs.h. */
4886_ACEOF
4887cat confdefs.h >>conftest.$ac_ext
4888cat >>conftest.$ac_ext <<_ACEOF
4889/* end confdefs.h. */
4890
4891 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4892
4893int
4894main ()
4895{
4896
4897 ;
4898 return 0;
4899}
4900_ACEOF
4901rm -f conftest.$ac_objext
4902if { (ac_try="$ac_compile"
4903case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004908 (eval "$ac_compile") 2>conftest.er1
4909 ac_status=$?
4910 grep -v '^ *+' conftest.er1 >conftest.err
4911 rm -f conftest.er1
4912 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914 (exit $ac_status); } && {
4915 test -z "$ac_c_werror_flag" ||
4916 test ! -s conftest.err
4917 } && test -s conftest.$ac_objext; then
4918
4919cat >>confdefs.h <<\_ACEOF
4920#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4921_ACEOF
4922
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004923 { echo "$as_me:$LINENO: result: yes" >&5
4924echo "${ECHO_T}yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004926 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004927sed 's/^/| /' conftest.$ac_ext >&5
4928
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004929 { echo "$as_me:$LINENO: result: no" >&5
4930echo "${ECHO_T}no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004931
4932fi
4933
4934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4935 CFLAGS=$save_CFLAGS
4936fi
4937
4938# On some compilers, pthreads are available without further options
4939# (e.g. MacOS X). On some of these systems, the compiler will not
4940# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4941# So we have to see first whether pthreads are available without
4942# options before we can check whether -Kpthread improves anything.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004943{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4944echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004946 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947else
4948 if test "$cross_compiling" = yes; then
4949 ac_cv_pthread_is_default=no
4950else
4951 cat >conftest.$ac_ext <<_ACEOF
4952/* confdefs.h. */
4953_ACEOF
4954cat confdefs.h >>conftest.$ac_ext
4955cat >>conftest.$ac_ext <<_ACEOF
4956/* end confdefs.h. */
4957
4958#include <pthread.h>
4959
4960void* routine(void* p){return NULL;}
4961
4962int main(){
4963 pthread_t p;
4964 if(pthread_create(&p,NULL,routine,NULL)!=0)
4965 return 1;
4966 (void)pthread_detach(p);
4967 return 0;
4968}
4969
4970_ACEOF
4971rm -f conftest$ac_exeext
4972if { (ac_try="$ac_link"
4973case "(($ac_try" in
4974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4975 *) ac_try_echo=$ac_try;;
4976esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 (eval "$ac_link") 2>&5
4979 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4982 { (case "(($ac_try" in
4983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4984 *) ac_try_echo=$ac_try;;
4985esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004987 (eval "$ac_try") 2>&5
4988 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004990 (exit $ac_status); }; }; then
4991
4992 ac_cv_pthread_is_default=yes
4993 ac_cv_kthread=no
4994 ac_cv_pthread=no
4995
4996else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004997 echo "$as_me: program exited with status $ac_status" >&5
4998echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999sed 's/^/| /' conftest.$ac_ext >&5
5000
5001( exit $ac_status )
5002ac_cv_pthread_is_default=no
5003fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5005fi
5006
5007
5008
5009fi
5010
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005011{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5012echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013
5014
5015if test $ac_cv_pthread_is_default = yes
5016then
5017 ac_cv_kpthread=no
5018else
5019# -Kpthread, if available, provides the right #defines
5020# and linker options to make pthread_create available
5021# Some compilers won't report that they do not support -Kpthread,
5022# so we need to run a program to see whether it really made the
5023# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005024{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5025echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005027 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005028else
5029 ac_save_cc="$CC"
5030CC="$CC -Kpthread"
5031if test "$cross_compiling" = yes; then
5032 ac_cv_kpthread=no
5033else
5034 cat >conftest.$ac_ext <<_ACEOF
5035/* confdefs.h. */
5036_ACEOF
5037cat confdefs.h >>conftest.$ac_ext
5038cat >>conftest.$ac_ext <<_ACEOF
5039/* end confdefs.h. */
5040
5041#include <pthread.h>
5042
5043void* routine(void* p){return NULL;}
5044
5045int main(){
5046 pthread_t p;
5047 if(pthread_create(&p,NULL,routine,NULL)!=0)
5048 return 1;
5049 (void)pthread_detach(p);
5050 return 0;
5051}
5052
5053_ACEOF
5054rm -f conftest$ac_exeext
5055if { (ac_try="$ac_link"
5056case "(($ac_try" in
5057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5058 *) ac_try_echo=$ac_try;;
5059esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005061 (eval "$ac_link") 2>&5
5062 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5065 { (case "(($ac_try" in
5066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5067 *) ac_try_echo=$ac_try;;
5068esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070 (eval "$ac_try") 2>&5
5071 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005073 (exit $ac_status); }; }; then
5074 ac_cv_kpthread=yes
5075else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005076 echo "$as_me: program exited with status $ac_status" >&5
5077echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078sed 's/^/| /' conftest.$ac_ext >&5
5079
5080( exit $ac_status )
5081ac_cv_kpthread=no
5082fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5084fi
5085
5086
5087CC="$ac_save_cc"
5088fi
5089
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005090{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5091echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005092fi
5093
5094if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5095then
5096# -Kthread, if available, provides the right #defines
5097# and linker options to make pthread_create available
5098# Some compilers won't report that they do not support -Kthread,
5099# so we need to run a program to see whether it really made the
5100# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005101{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5102echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005103if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005104 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105else
5106 ac_save_cc="$CC"
5107CC="$CC -Kthread"
5108if test "$cross_compiling" = yes; then
5109 ac_cv_kthread=no
5110else
5111 cat >conftest.$ac_ext <<_ACEOF
5112/* confdefs.h. */
5113_ACEOF
5114cat confdefs.h >>conftest.$ac_ext
5115cat >>conftest.$ac_ext <<_ACEOF
5116/* end confdefs.h. */
5117
5118#include <pthread.h>
5119
5120void* routine(void* p){return NULL;}
5121
5122int main(){
5123 pthread_t p;
5124 if(pthread_create(&p,NULL,routine,NULL)!=0)
5125 return 1;
5126 (void)pthread_detach(p);
5127 return 0;
5128}
5129
5130_ACEOF
5131rm -f conftest$ac_exeext
5132if { (ac_try="$ac_link"
5133case "(($ac_try" in
5134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5135 *) ac_try_echo=$ac_try;;
5136esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005138 (eval "$ac_link") 2>&5
5139 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5142 { (case "(($ac_try" in
5143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5144 *) ac_try_echo=$ac_try;;
5145esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147 (eval "$ac_try") 2>&5
5148 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150 (exit $ac_status); }; }; then
5151 ac_cv_kthread=yes
5152else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005153 echo "$as_me: program exited with status $ac_status" >&5
5154echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155sed 's/^/| /' conftest.$ac_ext >&5
5156
5157( exit $ac_status )
5158ac_cv_kthread=no
5159fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5161fi
5162
5163
5164CC="$ac_save_cc"
5165fi
5166
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005167{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5168echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005169fi
5170
5171if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5172then
5173# -pthread, if available, provides the right #defines
5174# and linker options to make pthread_create available
5175# Some compilers won't report that they do not support -pthread,
5176# so we need to run a program to see whether it really made the
5177# function available.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005178{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5179echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005180if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005181 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182else
5183 ac_save_cc="$CC"
5184CC="$CC -pthread"
5185if test "$cross_compiling" = yes; then
5186 ac_cv_pthread=no
5187else
5188 cat >conftest.$ac_ext <<_ACEOF
5189/* confdefs.h. */
5190_ACEOF
5191cat confdefs.h >>conftest.$ac_ext
5192cat >>conftest.$ac_ext <<_ACEOF
5193/* end confdefs.h. */
5194
5195#include <pthread.h>
5196
5197void* routine(void* p){return NULL;}
5198
5199int main(){
5200 pthread_t p;
5201 if(pthread_create(&p,NULL,routine,NULL)!=0)
5202 return 1;
5203 (void)pthread_detach(p);
5204 return 0;
5205}
5206
5207_ACEOF
5208rm -f conftest$ac_exeext
5209if { (ac_try="$ac_link"
5210case "(($ac_try" in
5211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5212 *) ac_try_echo=$ac_try;;
5213esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005215 (eval "$ac_link") 2>&5
5216 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5219 { (case "(($ac_try" in
5220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5221 *) ac_try_echo=$ac_try;;
5222esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224 (eval "$ac_try") 2>&5
5225 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227 (exit $ac_status); }; }; then
5228 ac_cv_pthread=yes
5229else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005230 echo "$as_me: program exited with status $ac_status" >&5
5231echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232sed 's/^/| /' conftest.$ac_ext >&5
5233
5234( exit $ac_status )
5235ac_cv_pthread=no
5236fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5238fi
5239
5240
5241CC="$ac_save_cc"
5242fi
5243
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005244{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5245echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005246fi
5247
5248# If we have set a CC compiler flag for thread support then
5249# check if it works for CXX, too.
5250ac_cv_cxx_thread=no
5251if test ! -z "$CXX"
5252then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005253{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5254echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255ac_save_cxx="$CXX"
5256
5257if test "$ac_cv_kpthread" = "yes"
5258then
5259 CXX="$CXX -Kpthread"
5260 ac_cv_cxx_thread=yes
5261elif test "$ac_cv_kthread" = "yes"
5262then
5263 CXX="$CXX -Kthread"
5264 ac_cv_cxx_thread=yes
5265elif test "$ac_cv_pthread" = "yes"
5266then
5267 CXX="$CXX -pthread"
5268 ac_cv_cxx_thread=yes
5269fi
5270
5271if test $ac_cv_cxx_thread = yes
5272then
5273 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5274 $CXX -c conftest.$ac_ext 2>&5
5275 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5276 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5277 then
5278 ac_cv_cxx_thread=yes
5279 else
5280 ac_cv_cxx_thread=no
5281 fi
5282 rm -fr conftest*
5283fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005284{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5285echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005286fi
5287CXX="$ac_save_cxx"
5288
5289
5290# checks for header files
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005291{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5292echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005294 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005295else
5296 cat >conftest.$ac_ext <<_ACEOF
5297/* confdefs.h. */
5298_ACEOF
5299cat confdefs.h >>conftest.$ac_ext
5300cat >>conftest.$ac_ext <<_ACEOF
5301/* end confdefs.h. */
5302#include <stdlib.h>
5303#include <stdarg.h>
5304#include <string.h>
5305#include <float.h>
5306
5307int
5308main ()
5309{
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315rm -f conftest.$ac_objext
5316if { (ac_try="$ac_compile"
5317case "(($ac_try" in
5318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5319 *) ac_try_echo=$ac_try;;
5320esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 (eval "$ac_compile") 2>conftest.er1
5323 ac_status=$?
5324 grep -v '^ *+' conftest.er1 >conftest.err
5325 rm -f conftest.er1
5326 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328 (exit $ac_status); } && {
5329 test -z "$ac_c_werror_flag" ||
5330 test ! -s conftest.err
5331 } && test -s conftest.$ac_objext; then
5332 ac_cv_header_stdc=yes
5333else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005334 echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335sed 's/^/| /' conftest.$ac_ext >&5
5336
5337 ac_cv_header_stdc=no
5338fi
5339
5340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5341
5342if test $ac_cv_header_stdc = yes; then
5343 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5344 cat >conftest.$ac_ext <<_ACEOF
5345/* confdefs.h. */
5346_ACEOF
5347cat confdefs.h >>conftest.$ac_ext
5348cat >>conftest.$ac_ext <<_ACEOF
5349/* end confdefs.h. */
5350#include <string.h>
5351
5352_ACEOF
5353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5354 $EGREP "memchr" >/dev/null 2>&1; then
5355 :
5356else
5357 ac_cv_header_stdc=no
5358fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005359rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360
5361fi
5362
5363if test $ac_cv_header_stdc = yes; then
5364 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5365 cat >conftest.$ac_ext <<_ACEOF
5366/* confdefs.h. */
5367_ACEOF
5368cat confdefs.h >>conftest.$ac_ext
5369cat >>conftest.$ac_ext <<_ACEOF
5370/* end confdefs.h. */
5371#include <stdlib.h>
5372
5373_ACEOF
5374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5375 $EGREP "free" >/dev/null 2>&1; then
5376 :
5377else
5378 ac_cv_header_stdc=no
5379fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005380rm -f -r conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382fi
5383
5384if test $ac_cv_header_stdc = yes; then
5385 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5386 if test "$cross_compiling" = yes; then
5387 :
5388else
5389 cat >conftest.$ac_ext <<_ACEOF
5390/* confdefs.h. */
5391_ACEOF
5392cat confdefs.h >>conftest.$ac_ext
5393cat >>conftest.$ac_ext <<_ACEOF
5394/* end confdefs.h. */
5395#include <ctype.h>
5396#include <stdlib.h>
5397#if ((' ' & 0x0FF) == 0x020)
5398# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5399# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5400#else
5401# define ISLOWER(c) \
5402 (('a' <= (c) && (c) <= 'i') \
5403 || ('j' <= (c) && (c) <= 'r') \
5404 || ('s' <= (c) && (c) <= 'z'))
5405# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5406#endif
5407
5408#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5409int
5410main ()
5411{
5412 int i;
5413 for (i = 0; i < 256; i++)
5414 if (XOR (islower (i), ISLOWER (i))
5415 || toupper (i) != TOUPPER (i))
5416 return 2;
5417 return 0;
5418}
5419_ACEOF
5420rm -f conftest$ac_exeext
5421if { (ac_try="$ac_link"
5422case "(($ac_try" in
5423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424 *) ac_try_echo=$ac_try;;
5425esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427 (eval "$ac_link") 2>&5
5428 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5431 { (case "(($ac_try" in
5432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5433 *) ac_try_echo=$ac_try;;
5434esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 (eval "$ac_try") 2>&5
5437 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 (exit $ac_status); }; }; then
5440 :
5441else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005442 echo "$as_me: program exited with status $ac_status" >&5
5443echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444sed 's/^/| /' conftest.$ac_ext >&5
5445
5446( exit $ac_status )
5447ac_cv_header_stdc=no
5448fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5450fi
5451
5452
5453fi
5454fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005455{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5456echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457if test $ac_cv_header_stdc = yes; then
5458
5459cat >>confdefs.h <<\_ACEOF
5460#define STDC_HEADERS 1
5461_ACEOF
5462
5463fi
5464
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005465# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5476 inttypes.h stdint.h unistd.h
5477do
5478as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5479{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5480echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5481if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5482 echo $ECHO_N "(cached) $ECHO_C" >&6
5483else
5484 cat >conftest.$ac_ext <<_ACEOF
5485/* confdefs.h. */
5486_ACEOF
5487cat confdefs.h >>conftest.$ac_ext
5488cat >>conftest.$ac_ext <<_ACEOF
5489/* end confdefs.h. */
5490$ac_includes_default
5491
5492#include <$ac_header>
5493_ACEOF
5494rm -f conftest.$ac_objext
5495if { (ac_try="$ac_compile"
5496case "(($ac_try" in
5497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5498 *) ac_try_echo=$ac_try;;
5499esac
5500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5501 (eval "$ac_compile") 2>conftest.er1
5502 ac_status=$?
5503 grep -v '^ *+' conftest.er1 >conftest.err
5504 rm -f conftest.er1
5505 cat conftest.err >&5
5506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5507 (exit $ac_status); } && {
5508 test -z "$ac_c_werror_flag" ||
5509 test ! -s conftest.err
5510 } && test -s conftest.$ac_objext; then
5511 eval "$as_ac_Header=yes"
5512else
5513 echo "$as_me: failed program was:" >&5
5514sed 's/^/| /' conftest.$ac_ext >&5
5515
5516 eval "$as_ac_Header=no"
5517fi
5518
5519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5520fi
5521ac_res=`eval echo '${'$as_ac_Header'}'`
5522 { echo "$as_me:$LINENO: result: $ac_res" >&5
5523echo "${ECHO_T}$ac_res" >&6; }
5524if test `eval echo '${'$as_ac_Header'}'` = yes; then
5525 cat >>confdefs.h <<_ACEOF
5526#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5527_ACEOF
5528
5529fi
5530
5531done
5532
5533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534
Martin v. Löwis11437992002-04-12 09:54:03 +00005535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
Anthony Baxter8a560de2004-10-13 15:30:56 +00005570
Martin v. Löwisc3001752005-01-23 09:27:24 +00005571
Martin v. Löwis11017b12006-01-14 18:12:57 +00005572
Thomas Wouters477c8d52006-05-27 19:21:47 +00005573
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005574
5575
5576
5577
5578
5579
5580
5581
Thomas Wouters89f507f2006-12-13 04:49:30 +00005582
Christian Heimes043d6f62008-01-07 17:19:16 +00005583
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005584
5585
Christian Heimesbbe741d2008-03-28 10:53:29 +00005586
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005587
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005588for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5589fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00005590ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00005591shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005592unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00005593sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5594sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005595sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00005596sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00005597sys/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 +00005598sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00005599bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005600do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005601as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005602if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005603 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5604echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005605if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005606 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005607fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005608ac_res=`eval echo '${'$as_ac_Header'}'`
5609 { echo "$as_me:$LINENO: result: $ac_res" >&5
5610echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005611else
Martin v. Löwis11437992002-04-12 09:54:03 +00005612 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005613{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5614echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005616/* confdefs.h. */
5617_ACEOF
5618cat confdefs.h >>conftest.$ac_ext
5619cat >>conftest.$ac_ext <<_ACEOF
5620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005621$ac_includes_default
5622#include <$ac_header>
5623_ACEOF
5624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005625if { (ac_try="$ac_compile"
5626case "(($ac_try" in
5627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5628 *) ac_try_echo=$ac_try;;
5629esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005633 grep -v '^ *+' conftest.er1 >conftest.err
5634 rm -f conftest.er1
5635 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005637 (exit $ac_status); } && {
5638 test -z "$ac_c_werror_flag" ||
5639 test ! -s conftest.err
5640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005641 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005642else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005644sed 's/^/| /' conftest.$ac_ext >&5
5645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005646 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005648
5649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005650{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5651echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005652
5653# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005654{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5655echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005657/* confdefs.h. */
5658_ACEOF
5659cat confdefs.h >>conftest.$ac_ext
5660cat >>conftest.$ac_ext <<_ACEOF
5661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005662#include <$ac_header>
5663_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005664if { (ac_try="$ac_cpp conftest.$ac_ext"
5665case "(($ac_try" in
5666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5667 *) ac_try_echo=$ac_try;;
5668esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005670 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005671 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005672 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 rm -f conftest.er1
5674 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005676 (exit $ac_status); } >/dev/null && {
5677 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5678 test ! -s conftest.err
5679 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005680 ac_header_preproc=yes
5681else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005683sed 's/^/| /' conftest.$ac_ext >&5
5684
Martin v. Löwis11437992002-04-12 09:54:03 +00005685 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005687
Martin v. Löwis11437992002-04-12 09:54:03 +00005688rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005689{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5690echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005691
5692# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005693case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5694 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005695 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5696echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5697 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5698echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005699 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005700 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005701 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005702 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5703echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5704 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5705echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5706 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5707echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5708 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5709echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5710 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5711echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5712 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5713echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005714 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00005715## -------------------------------------- ##
5716## Report this to http://bugs.python.org/ ##
5717## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005718_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005719 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005720 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005721esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005722{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5723echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005724if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005725 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005726else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005727 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005729ac_res=`eval echo '${'$as_ac_Header'}'`
5730 { echo "$as_me:$LINENO: result: $ac_res" >&5
5731echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005732
5733fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005734if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005736#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005737_ACEOF
5738
5739fi
5740
Guido van Rossum627b2d71993-12-24 10:39:16 +00005741done
5742
Martin v. Löwis11437992002-04-12 09:54:03 +00005743
5744
5745
5746
5747
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005748ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005749for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005750 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5751{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5752echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005753if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005754 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005755else
Martin v. Löwis11437992002-04-12 09:54:03 +00005756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005757/* confdefs.h. */
5758_ACEOF
5759cat confdefs.h >>conftest.$ac_ext
5760cat >>conftest.$ac_ext <<_ACEOF
5761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762#include <sys/types.h>
5763#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005764
Martin v. Löwis11437992002-04-12 09:54:03 +00005765int
5766main ()
5767{
5768if ((DIR *) 0)
5769return 0;
5770 ;
5771 return 0;
5772}
5773_ACEOF
5774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005775if { (ac_try="$ac_compile"
5776case "(($ac_try" in
5777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5778 *) ac_try_echo=$ac_try;;
5779esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005783 grep -v '^ *+' conftest.er1 >conftest.err
5784 rm -f conftest.er1
5785 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005787 (exit $ac_status); } && {
5788 test -z "$ac_c_werror_flag" ||
5789 test ! -s conftest.err
5790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005791 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005792else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005794sed 's/^/| /' conftest.$ac_ext >&5
5795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005796 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005798
5799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005800fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005801ac_res=`eval echo '${'$as_ac_Header'}'`
5802 { echo "$as_me:$LINENO: result: $ac_res" >&5
5803echo "${ECHO_T}$ac_res" >&6; }
5804if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005805 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005806#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005807_ACEOF
5808
5809ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812done
5813# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5814if test $ac_header_dirent = dirent.h; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005815 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5816echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005817if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005818 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005819else
Martin v. Löwis11437992002-04-12 09:54:03 +00005820 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005822/* confdefs.h. */
5823_ACEOF
5824cat confdefs.h >>conftest.$ac_ext
5825cat >>conftest.$ac_ext <<_ACEOF
5826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005828/* Override any GCC internal prototype to avoid an error.
5829 Use char because int might match the return type of a GCC
5830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831#ifdef __cplusplus
5832extern "C"
5833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005834char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005835int
5836main ()
5837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005838return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 ;
5840 return 0;
5841}
5842_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005843for ac_lib in '' dir; do
5844 if test -z "$ac_lib"; then
5845 ac_res="none required"
5846 else
5847 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005848 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005849 fi
5850 rm -f conftest.$ac_objext conftest$ac_exeext
5851if { (ac_try="$ac_link"
5852case "(($ac_try" in
5853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5854 *) ac_try_echo=$ac_try;;
5855esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005857 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005858 ac_status=$?
5859 grep -v '^ *+' conftest.er1 >conftest.err
5860 rm -f conftest.er1
5861 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005863 (exit $ac_status); } && {
5864 test -z "$ac_c_werror_flag" ||
5865 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005866 } && test -s conftest$ac_exeext &&
5867 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005868 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005869else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005870 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005871sed 's/^/| /' conftest.$ac_ext >&5
5872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005873
Thomas Wouters477c8d52006-05-27 19:21:47 +00005874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005875
5876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5877 conftest$ac_exeext
5878 if test "${ac_cv_search_opendir+set}" = set; then
5879 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005881done
5882if test "${ac_cv_search_opendir+set}" = set; then
5883 :
5884else
5885 ac_cv_search_opendir=no
5886fi
5887rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005888LIBS=$ac_func_search_save_LIBS
5889fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005890{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5891echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005892ac_res=$ac_cv_search_opendir
5893if test "$ac_res" != no; then
5894 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005895
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005897
Michael W. Hudson54241132001-12-07 15:38:26 +00005898else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005899 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5900echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005901if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005902 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005903else
5904 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005906/* confdefs.h. */
5907_ACEOF
5908cat confdefs.h >>conftest.$ac_ext
5909cat >>conftest.$ac_ext <<_ACEOF
5910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005912/* Override any GCC internal prototype to avoid an error.
5913 Use char because int might match the return type of a GCC
5914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005915#ifdef __cplusplus
5916extern "C"
5917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005918char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005919int
5920main ()
5921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005922return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005923 ;
5924 return 0;
5925}
5926_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005927for ac_lib in '' x; do
5928 if test -z "$ac_lib"; then
5929 ac_res="none required"
5930 else
5931 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005933 fi
5934 rm -f conftest.$ac_objext conftest$ac_exeext
5935if { (ac_try="$ac_link"
5936case "(($ac_try" in
5937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5938 *) ac_try_echo=$ac_try;;
5939esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005941 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005942 ac_status=$?
5943 grep -v '^ *+' conftest.er1 >conftest.err
5944 rm -f conftest.er1
5945 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005947 (exit $ac_status); } && {
5948 test -z "$ac_c_werror_flag" ||
5949 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005950 } && test -s conftest$ac_exeext &&
5951 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005952 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00005953else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005954 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005955sed 's/^/| /' conftest.$ac_ext >&5
5956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005957
Thomas Wouters477c8d52006-05-27 19:21:47 +00005958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005959
5960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5961 conftest$ac_exeext
5962 if test "${ac_cv_search_opendir+set}" = set; then
5963 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005965done
5966if test "${ac_cv_search_opendir+set}" = set; then
5967 :
5968else
5969 ac_cv_search_opendir=no
5970fi
5971rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005972LIBS=$ac_func_search_save_LIBS
5973fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005974{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5975echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005976ac_res=$ac_cv_search_opendir
5977if test "$ac_res" != no; then
5978 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980fi
5981
5982fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005983
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005984{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5985echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005986if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00005987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005988else
5989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005990/* confdefs.h. */
5991_ACEOF
5992cat confdefs.h >>conftest.$ac_ext
5993cat >>conftest.$ac_ext <<_ACEOF
5994/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005996int
5997main ()
5998{
5999return makedev(0, 0);
6000 ;
6001 return 0;
6002}
6003_ACEOF
6004rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006005if { (ac_try="$ac_link"
6006case "(($ac_try" in
6007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6008 *) ac_try_echo=$ac_try;;
6009esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006011 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006013 grep -v '^ *+' conftest.er1 >conftest.err
6014 rm -f conftest.er1
6015 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006017 (exit $ac_status); } && {
6018 test -z "$ac_c_werror_flag" ||
6019 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006020 } && test -s conftest$ac_exeext &&
6021 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006022 ac_cv_header_sys_types_h_makedev=yes
6023else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006025sed 's/^/| /' conftest.$ac_ext >&5
6026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006027 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006029
6030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032
6033fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006034{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6035echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036
6037if test $ac_cv_header_sys_types_h_makedev = no; then
6038if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006039 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6040echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006041if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006042 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006043fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006044{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6045echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046else
6047 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006048{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6049echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006050cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006051/* confdefs.h. */
6052_ACEOF
6053cat confdefs.h >>conftest.$ac_ext
6054cat >>conftest.$ac_ext <<_ACEOF
6055/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056$ac_includes_default
6057#include <sys/mkdev.h>
6058_ACEOF
6059rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006060if { (ac_try="$ac_compile"
6061case "(($ac_try" in
6062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6063 *) ac_try_echo=$ac_try;;
6064esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006068 grep -v '^ *+' conftest.er1 >conftest.err
6069 rm -f conftest.er1
6070 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006072 (exit $ac_status); } && {
6073 test -z "$ac_c_werror_flag" ||
6074 test ! -s conftest.err
6075 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006076 ac_header_compiler=yes
6077else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006079sed 's/^/| /' conftest.$ac_ext >&5
6080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083
6084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006085{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6086echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006087
6088# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006089{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6090echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006092/* confdefs.h. */
6093_ACEOF
6094cat confdefs.h >>conftest.$ac_ext
6095cat >>conftest.$ac_ext <<_ACEOF
6096/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097#include <sys/mkdev.h>
6098_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099if { (ac_try="$ac_cpp conftest.$ac_ext"
6100case "(($ac_try" in
6101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6102 *) ac_try_echo=$ac_try;;
6103esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006107 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108 rm -f conftest.er1
6109 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111 (exit $ac_status); } >/dev/null && {
6112 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6113 test ! -s conftest.err
6114 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115 ac_header_preproc=yes
6116else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006117 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006118sed 's/^/| /' conftest.$ac_ext >&5
6119
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006120 ac_header_preproc=no
6121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006122
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006124{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6125echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006126
6127# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006128case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6129 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006130 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6131echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6132 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6133echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006134 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006135 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006137 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6138echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6139 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6140echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6141 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6142echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6143 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6144echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6145 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6146echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6147 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6148echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006149 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006150## -------------------------------------- ##
6151## Report this to http://bugs.python.org/ ##
6152## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006153_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006154 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006155 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006157{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6158echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006159if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006160 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006161else
6162 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6163fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006164{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6165echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166
6167fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006168if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169
6170cat >>confdefs.h <<\_ACEOF
6171#define MAJOR_IN_MKDEV 1
6172_ACEOF
6173
6174fi
6175
6176
6177
6178 if test $ac_cv_header_sys_mkdev_h = no; then
6179 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006180 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6181echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006182if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006183 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006184fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006185{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6186echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006187else
6188 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006189{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6190echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006192/* confdefs.h. */
6193_ACEOF
6194cat confdefs.h >>conftest.$ac_ext
6195cat >>conftest.$ac_ext <<_ACEOF
6196/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197$ac_includes_default
6198#include <sys/sysmacros.h>
6199_ACEOF
6200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201if { (ac_try="$ac_compile"
6202case "(($ac_try" in
6203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6204 *) ac_try_echo=$ac_try;;
6205esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006207 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006209 grep -v '^ *+' conftest.er1 >conftest.err
6210 rm -f conftest.er1
6211 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006213 (exit $ac_status); } && {
6214 test -z "$ac_c_werror_flag" ||
6215 test ! -s conftest.err
6216 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217 ac_header_compiler=yes
6218else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006220sed 's/^/| /' conftest.$ac_ext >&5
6221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006222 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224
6225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006226{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6227echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228
6229# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006230{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6231echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006238#include <sys/sysmacros.h>
6239_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006240if { (ac_try="$ac_cpp conftest.$ac_ext"
6241case "(($ac_try" in
6242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6243 *) ac_try_echo=$ac_try;;
6244esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006248 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006249 rm -f conftest.er1
6250 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006252 (exit $ac_status); } >/dev/null && {
6253 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6254 test ! -s conftest.err
6255 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256 ac_header_preproc=yes
6257else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006258 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006259sed 's/^/| /' conftest.$ac_ext >&5
6260
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006261 ac_header_preproc=no
6262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006263
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006264rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006265{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6266echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267
6268# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6270 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006271 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6272echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6273 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6274echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006275 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006276 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006277 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006278 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6279echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6280 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6281echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6282 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6283echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6284 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6285echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6286 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6287echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6288 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6289echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006290 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006291## -------------------------------------- ##
6292## Report this to http://bugs.python.org/ ##
6293## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006294_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006295 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006296 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006297esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006298{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6299echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006300if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006301 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006302else
6303 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6304fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006305{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6306echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307
6308fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006309if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310
6311cat >>confdefs.h <<\_ACEOF
6312#define MAJOR_IN_SYSMACROS 1
6313_ACEOF
6314
6315fi
6316
6317
6318 fi
6319fi
6320
Michael W. Hudson54241132001-12-07 15:38:26 +00006321
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006322# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006323
6324for ac_header in term.h
6325do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006326as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6327{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6328echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006331else
6332 cat >conftest.$ac_ext <<_ACEOF
6333/* confdefs.h. */
6334_ACEOF
6335cat confdefs.h >>conftest.$ac_ext
6336cat >>conftest.$ac_ext <<_ACEOF
6337/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006338
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006339#ifdef HAVE_CURSES_H
6340#include <curses.h>
6341#endif
6342
6343
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006344#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006345_ACEOF
6346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347if { (ac_try="$ac_compile"
6348case "(($ac_try" in
6349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6350 *) ac_try_echo=$ac_try;;
6351esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354 ac_status=$?
6355 grep -v '^ *+' conftest.er1 >conftest.err
6356 rm -f conftest.er1
6357 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006359 (exit $ac_status); } && {
6360 test -z "$ac_c_werror_flag" ||
6361 test ! -s conftest.err
6362 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006363 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006364else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006365 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006366sed 's/^/| /' conftest.$ac_ext >&5
6367
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006368 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006370
6371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006372fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006373ac_res=`eval echo '${'$as_ac_Header'}'`
6374 { echo "$as_me:$LINENO: result: $ac_res" >&5
6375echo "${ECHO_T}$ac_res" >&6; }
6376if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006377 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006378#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006379_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006380
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006381fi
6382
6383done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006384
6385
Martin v. Löwis11017b12006-01-14 18:12:57 +00006386# On Linux, netlink.h requires asm/types.h
6387
6388for ac_header in linux/netlink.h
6389do
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006390as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6391{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6392echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006393if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006394 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006395else
6396 cat >conftest.$ac_ext <<_ACEOF
6397/* confdefs.h. */
6398_ACEOF
6399cat confdefs.h >>conftest.$ac_ext
6400cat >>conftest.$ac_ext <<_ACEOF
6401/* end confdefs.h. */
6402
6403#ifdef HAVE_ASM_TYPES_H
6404#include <asm/types.h>
6405#endif
6406#ifdef HAVE_SYS_SOCKET_H
6407#include <sys/socket.h>
6408#endif
6409
6410
6411#include <$ac_header>
6412_ACEOF
6413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414if { (ac_try="$ac_compile"
6415case "(($ac_try" in
6416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6417 *) ac_try_echo=$ac_try;;
6418esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006421 ac_status=$?
6422 grep -v '^ *+' conftest.er1 >conftest.err
6423 rm -f conftest.er1
6424 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 (exit $ac_status); } && {
6427 test -z "$ac_c_werror_flag" ||
6428 test ! -s conftest.err
6429 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006430 eval "$as_ac_Header=yes"
6431else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006432 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006433sed 's/^/| /' conftest.$ac_ext >&5
6434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006437
6438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006439fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006440ac_res=`eval echo '${'$as_ac_Header'}'`
6441 { echo "$as_me:$LINENO: result: $ac_res" >&5
6442echo "${ECHO_T}$ac_res" >&6; }
6443if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006444 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006445#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006446_ACEOF
6447
6448fi
6449
6450done
6451
6452
Guido van Rossum627b2d71993-12-24 10:39:16 +00006453# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006454was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006455{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6456echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006458/* confdefs.h. */
6459_ACEOF
6460cat confdefs.h >>conftest.$ac_ext
6461cat >>conftest.$ac_ext <<_ACEOF
6462/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006467 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006468 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469else
Martin v. Löwis11437992002-04-12 09:54:03 +00006470
6471
6472cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006474_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006475
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006476
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006478rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006479
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006480{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6481echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006482
Neal Norwitz11690112002-07-30 01:08:28 +00006483# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006484{ echo "$as_me:$LINENO: checking for makedev" >&5
6485echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006486cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006487/* confdefs.h. */
6488_ACEOF
6489cat confdefs.h >>conftest.$ac_ext
6490cat >>conftest.$ac_ext <<_ACEOF
6491/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006492#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006493int
6494main ()
6495{
6496 makedev(0, 0)
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502if { (ac_try="$ac_link"
6503case "(($ac_try" in
6504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6505 *) ac_try_echo=$ac_try;;
6506esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006508 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006509 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 grep -v '^ *+' conftest.er1 >conftest.err
6511 rm -f conftest.er1
6512 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006514 (exit $ac_status); } && {
6515 test -z "$ac_c_werror_flag" ||
6516 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006517 } && test -s conftest$ac_exeext &&
6518 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006519 ac_cv_has_makedev=yes
6520else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006522sed 's/^/| /' conftest.$ac_ext >&5
6523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006526
6527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006528 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006529if test "$ac_cv_has_makedev" = "no"; then
6530 # we didn't link, try if _OSF_SOURCE will allow us to link
6531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006532/* confdefs.h. */
6533_ACEOF
6534cat confdefs.h >>conftest.$ac_ext
6535cat >>conftest.$ac_ext <<_ACEOF
6536/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006537
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006538#define _OSF_SOURCE 1
6539#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006540
Neal Norwitz11690112002-07-30 01:08:28 +00006541int
6542main ()
6543{
6544 makedev(0, 0)
6545 ;
6546 return 0;
6547}
6548_ACEOF
6549rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550if { (ac_try="$ac_link"
6551case "(($ac_try" in
6552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553 *) ac_try_echo=$ac_try;;
6554esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006556 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006558 grep -v '^ *+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 (exit $ac_status); } && {
6563 test -z "$ac_c_werror_flag" ||
6564 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006565 } && test -s conftest$ac_exeext &&
6566 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006567 ac_cv_has_makedev=yes
6568else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006572 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574
6575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006576 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006577 if test "$ac_cv_has_makedev" = "yes"; then
6578
6579cat >>confdefs.h <<\_ACEOF
6580#define _OSF_SOURCE 1
6581_ACEOF
6582
6583 fi
6584fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006585{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6586echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006587if test "$ac_cv_has_makedev" = "yes"; then
6588
6589cat >>confdefs.h <<\_ACEOF
6590#define HAVE_MAKEDEV 1
6591_ACEOF
6592
6593fi
6594
Martin v. Löwis399a6892002-10-04 10:22:02 +00006595# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6596# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6597# defined, but the compiler does not support pragma redefine_extname,
6598# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6599# structures (such as rlimit64) without declaring them. As a
6600# work-around, disable LFS on such configurations
6601
6602use_lfs=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006603{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6604echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006606/* confdefs.h. */
6607_ACEOF
6608cat confdefs.h >>conftest.$ac_ext
6609cat >>conftest.$ac_ext <<_ACEOF
6610/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006611
6612#define _LARGEFILE_SOURCE 1
6613#define _FILE_OFFSET_BITS 64
6614#include <sys/resource.h>
6615
Martin v. Löwis399a6892002-10-04 10:22:02 +00006616int
6617main ()
6618{
6619struct rlimit foo;
6620 ;
6621 return 0;
6622}
6623_ACEOF
6624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625if { (ac_try="$ac_compile"
6626case "(($ac_try" in
6627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6628 *) ac_try_echo=$ac_try;;
6629esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006633 grep -v '^ *+' conftest.er1 >conftest.err
6634 rm -f conftest.er1
6635 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637 (exit $ac_status); } && {
6638 test -z "$ac_c_werror_flag" ||
6639 test ! -s conftest.err
6640 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006641 sol_lfs_bug=no
6642else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006644sed 's/^/| /' conftest.$ac_ext >&5
6645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006648
6649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006650{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6651echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006652if test "$sol_lfs_bug" = "yes"; then
6653 use_lfs=no
6654fi
6655
6656if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006657# Two defines needed to enable largefile support on various platforms
6658# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006659
Martin v. Löwis11437992002-04-12 09:54:03 +00006660cat >>confdefs.h <<\_ACEOF
6661#define _LARGEFILE_SOURCE 1
6662_ACEOF
6663
6664
6665cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006666#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006667_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006668
Martin v. Löwis399a6892002-10-04 10:22:02 +00006669fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006670
Guido van Rossum84e7b241996-08-19 21:59:00 +00006671# Add some code to confdefs.h so that the test for off_t works on SCO
6672cat >> confdefs.h <<\EOF
6673#if defined(SCO_DS)
6674#undef _OFF_T
6675#endif
6676EOF
6677
Guido van Rossumef2255b2000-03-10 22:30:29 +00006678# Type availability checks
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006679{ echo "$as_me:$LINENO: checking for mode_t" >&5
6680echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006681if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006682 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006683else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684 cat >conftest.$ac_ext <<_ACEOF
6685/* confdefs.h. */
6686_ACEOF
6687cat confdefs.h >>conftest.$ac_ext
6688cat >>conftest.$ac_ext <<_ACEOF
6689/* end confdefs.h. */
6690$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006691typedef mode_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692int
6693main ()
6694{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006695if ((ac__type_new_ *) 0)
6696 return 0;
6697if (sizeof (ac__type_new_))
6698 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699 ;
6700 return 0;
6701}
6702_ACEOF
6703rm -f conftest.$ac_objext
6704if { (ac_try="$ac_compile"
6705case "(($ac_try" in
6706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6707 *) ac_try_echo=$ac_try;;
6708esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710 (eval "$ac_compile") 2>conftest.er1
6711 ac_status=$?
6712 grep -v '^ *+' conftest.er1 >conftest.err
6713 rm -f conftest.er1
6714 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716 (exit $ac_status); } && {
6717 test -z "$ac_c_werror_flag" ||
6718 test ! -s conftest.err
6719 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006720 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006721else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006723sed 's/^/| /' conftest.$ac_ext >&5
6724
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006725 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006727
6728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006729fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006730{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6731echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6732if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006733 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006734else
Martin v. Löwis11437992002-04-12 09:54:03 +00006735
6736cat >>confdefs.h <<_ACEOF
6737#define mode_t int
6738_ACEOF
6739
6740fi
6741
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006742{ echo "$as_me:$LINENO: checking for off_t" >&5
6743echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006744if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006745 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006746else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 cat >conftest.$ac_ext <<_ACEOF
6748/* confdefs.h. */
6749_ACEOF
6750cat confdefs.h >>conftest.$ac_ext
6751cat >>conftest.$ac_ext <<_ACEOF
6752/* end confdefs.h. */
6753$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006754typedef off_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755int
6756main ()
6757{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006758if ((ac__type_new_ *) 0)
6759 return 0;
6760if (sizeof (ac__type_new_))
6761 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762 ;
6763 return 0;
6764}
6765_ACEOF
6766rm -f conftest.$ac_objext
6767if { (ac_try="$ac_compile"
6768case "(($ac_try" in
6769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6770 *) ac_try_echo=$ac_try;;
6771esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773 (eval "$ac_compile") 2>conftest.er1
6774 ac_status=$?
6775 grep -v '^ *+' conftest.er1 >conftest.err
6776 rm -f conftest.er1
6777 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779 (exit $ac_status); } && {
6780 test -z "$ac_c_werror_flag" ||
6781 test ! -s conftest.err
6782 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006783 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006784else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006786sed 's/^/| /' conftest.$ac_ext >&5
6787
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006788 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006790
6791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006792fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006793{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6794echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6795if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006796 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006797else
Martin v. Löwis11437992002-04-12 09:54:03 +00006798
6799cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006801_ACEOF
6802
6803fi
6804
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006805{ echo "$as_me:$LINENO: checking for pid_t" >&5
6806echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006807if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006808 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006809else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810 cat >conftest.$ac_ext <<_ACEOF
6811/* confdefs.h. */
6812_ACEOF
6813cat confdefs.h >>conftest.$ac_ext
6814cat >>conftest.$ac_ext <<_ACEOF
6815/* end confdefs.h. */
6816$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006817typedef pid_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818int
6819main ()
6820{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006821if ((ac__type_new_ *) 0)
6822 return 0;
6823if (sizeof (ac__type_new_))
6824 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825 ;
6826 return 0;
6827}
6828_ACEOF
6829rm -f conftest.$ac_objext
6830if { (ac_try="$ac_compile"
6831case "(($ac_try" in
6832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6833 *) ac_try_echo=$ac_try;;
6834esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 (eval "$ac_compile") 2>conftest.er1
6837 ac_status=$?
6838 grep -v '^ *+' conftest.er1 >conftest.err
6839 rm -f conftest.er1
6840 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842 (exit $ac_status); } && {
6843 test -z "$ac_c_werror_flag" ||
6844 test ! -s conftest.err
6845 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006846 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006847else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006849sed 's/^/| /' conftest.$ac_ext >&5
6850
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006851 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006853
6854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006855fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006856{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6857echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6858if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006859 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006860else
Martin v. Löwis11437992002-04-12 09:54:03 +00006861
6862cat >>confdefs.h <<_ACEOF
6863#define pid_t int
6864_ACEOF
6865
6866fi
6867
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006868{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6869echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006870if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006871 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006872else
6873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006879#include <sys/types.h>
6880#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006881
Martin v. Löwis11437992002-04-12 09:54:03 +00006882int
6883main ()
6884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006885return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 ;
6887 return 0;
6888}
6889_ACEOF
6890rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006891if { (ac_try="$ac_compile"
6892case "(($ac_try" in
6893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6894 *) ac_try_echo=$ac_try;;
6895esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006899 grep -v '^ *+' conftest.er1 >conftest.err
6900 rm -f conftest.er1
6901 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903 (exit $ac_status); } && {
6904 test -z "$ac_c_werror_flag" ||
6905 test ! -s conftest.err
6906 } && test -s conftest.$ac_objext; then
6907 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006909 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006910sed 's/^/| /' conftest.$ac_ext >&5
6911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006912 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914
6915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006916fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006917{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6918echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006919
Martin v. Löwis11437992002-04-12 09:54:03 +00006920cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006921#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006922_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006923
Michael W. Hudson54241132001-12-07 15:38:26 +00006924
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006925{ echo "$as_me:$LINENO: checking for size_t" >&5
6926echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006927if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930 cat >conftest.$ac_ext <<_ACEOF
6931/* confdefs.h. */
6932_ACEOF
6933cat confdefs.h >>conftest.$ac_ext
6934cat >>conftest.$ac_ext <<_ACEOF
6935/* end confdefs.h. */
6936$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006937typedef size_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938int
6939main ()
6940{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006941if ((ac__type_new_ *) 0)
6942 return 0;
6943if (sizeof (ac__type_new_))
6944 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945 ;
6946 return 0;
6947}
6948_ACEOF
6949rm -f conftest.$ac_objext
6950if { (ac_try="$ac_compile"
6951case "(($ac_try" in
6952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6953 *) ac_try_echo=$ac_try;;
6954esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956 (eval "$ac_compile") 2>conftest.er1
6957 ac_status=$?
6958 grep -v '^ *+' conftest.er1 >conftest.err
6959 rm -f conftest.er1
6960 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962 (exit $ac_status); } && {
6963 test -z "$ac_c_werror_flag" ||
6964 test ! -s conftest.err
6965 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006966 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006967else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006969sed 's/^/| /' conftest.$ac_ext >&5
6970
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006971 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973
6974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006975fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006976{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6977echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
6978if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006979 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980else
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
6982cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006984_ACEOF
6985
6986fi
6987
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006988{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6989echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006990if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00006991 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006992else
6993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006994/* confdefs.h. */
6995_ACEOF
6996cat confdefs.h >>conftest.$ac_ext
6997cat >>conftest.$ac_ext <<_ACEOF
6998/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007000
7001_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007003 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004 ac_cv_type_uid_t=yes
7005else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006 ac_cv_type_uid_t=no
7007fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007008rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007010fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007011{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7012echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007013if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014
Martin v. Löwis11437992002-04-12 09:54:03 +00007015cat >>confdefs.h <<\_ACEOF
7016#define uid_t int
7017_ACEOF
7018
7019
7020cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007022_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023
7024fi
7025
Mark Dickinsonbd792642009-03-18 20:06:12 +00007026
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007027 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7028echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007029if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007030 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007031else
7032 ac_cv_c_uint32_t=no
7033 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7034 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7035 cat >conftest.$ac_ext <<_ACEOF
7036/* confdefs.h. */
7037_ACEOF
7038cat confdefs.h >>conftest.$ac_ext
7039cat >>conftest.$ac_ext <<_ACEOF
7040/* end confdefs.h. */
7041$ac_includes_default
7042int
7043main ()
7044{
7045static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7046test_array [0] = 0
7047
7048 ;
7049 return 0;
7050}
7051_ACEOF
7052rm -f conftest.$ac_objext
7053if { (ac_try="$ac_compile"
7054case "(($ac_try" in
7055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7056 *) ac_try_echo=$ac_try;;
7057esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007059 (eval "$ac_compile") 2>conftest.er1
7060 ac_status=$?
7061 grep -v '^ *+' conftest.er1 >conftest.err
7062 rm -f conftest.er1
7063 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007065 (exit $ac_status); } && {
7066 test -z "$ac_c_werror_flag" ||
7067 test ! -s conftest.err
7068 } && test -s conftest.$ac_objext; then
7069 case $ac_type in
7070 uint32_t) ac_cv_c_uint32_t=yes ;;
7071 *) ac_cv_c_uint32_t=$ac_type ;;
7072esac
7073
7074else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007075 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007076sed 's/^/| /' conftest.$ac_ext >&5
7077
7078
7079fi
7080
7081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7082 test "$ac_cv_c_uint32_t" != no && break
7083 done
7084fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007085{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7086echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007087 case $ac_cv_c_uint32_t in #(
7088 no|yes) ;; #(
7089 *)
7090
7091cat >>confdefs.h <<\_ACEOF
7092#define _UINT32_T 1
7093_ACEOF
7094
7095
7096cat >>confdefs.h <<_ACEOF
7097#define uint32_t $ac_cv_c_uint32_t
7098_ACEOF
7099;;
7100 esac
7101
7102
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007103 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7104echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007105if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007106 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007107else
7108 ac_cv_c_uint64_t=no
7109 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7110 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7111 cat >conftest.$ac_ext <<_ACEOF
7112/* confdefs.h. */
7113_ACEOF
7114cat confdefs.h >>conftest.$ac_ext
7115cat >>conftest.$ac_ext <<_ACEOF
7116/* end confdefs.h. */
7117$ac_includes_default
7118int
7119main ()
7120{
7121static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7122test_array [0] = 0
7123
7124 ;
7125 return 0;
7126}
7127_ACEOF
7128rm -f conftest.$ac_objext
7129if { (ac_try="$ac_compile"
7130case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007135 (eval "$ac_compile") 2>conftest.er1
7136 ac_status=$?
7137 grep -v '^ *+' conftest.er1 >conftest.err
7138 rm -f conftest.er1
7139 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007141 (exit $ac_status); } && {
7142 test -z "$ac_c_werror_flag" ||
7143 test ! -s conftest.err
7144 } && test -s conftest.$ac_objext; then
7145 case $ac_type in
7146 uint64_t) ac_cv_c_uint64_t=yes ;;
7147 *) ac_cv_c_uint64_t=$ac_type ;;
7148esac
7149
7150else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007151 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007152sed 's/^/| /' conftest.$ac_ext >&5
7153
7154
7155fi
7156
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158 test "$ac_cv_c_uint64_t" != no && break
7159 done
7160fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007161{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7162echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007163 case $ac_cv_c_uint64_t in #(
7164 no|yes) ;; #(
7165 *)
7166
7167cat >>confdefs.h <<\_ACEOF
7168#define _UINT64_T 1
7169_ACEOF
7170
7171
7172cat >>confdefs.h <<_ACEOF
7173#define uint64_t $ac_cv_c_uint64_t
7174_ACEOF
7175;;
7176 esac
7177
7178
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007179 { echo "$as_me:$LINENO: checking for int32_t" >&5
7180echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007181if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007182 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007183else
7184 ac_cv_c_int32_t=no
7185 for ac_type in 'int32_t' 'int' 'long int' \
7186 'long long int' 'short int' 'signed char'; do
7187 cat >conftest.$ac_ext <<_ACEOF
7188/* confdefs.h. */
7189_ACEOF
7190cat confdefs.h >>conftest.$ac_ext
7191cat >>conftest.$ac_ext <<_ACEOF
7192/* end confdefs.h. */
7193$ac_includes_default
7194int
7195main ()
7196{
7197static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7198test_array [0] = 0
7199
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
7205if { (ac_try="$ac_compile"
7206case "(($ac_try" in
7207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7208 *) ac_try_echo=$ac_try;;
7209esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007211 (eval "$ac_compile") 2>conftest.er1
7212 ac_status=$?
7213 grep -v '^ *+' conftest.er1 >conftest.err
7214 rm -f conftest.er1
7215 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007217 (exit $ac_status); } && {
7218 test -z "$ac_c_werror_flag" ||
7219 test ! -s conftest.err
7220 } && test -s conftest.$ac_objext; then
7221 cat >conftest.$ac_ext <<_ACEOF
7222/* confdefs.h. */
7223_ACEOF
7224cat confdefs.h >>conftest.$ac_ext
7225cat >>conftest.$ac_ext <<_ACEOF
7226/* end confdefs.h. */
7227$ac_includes_default
7228int
7229main ()
7230{
7231static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007232 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007233test_array [0] = 0
7234
7235 ;
7236 return 0;
7237}
7238_ACEOF
7239rm -f conftest.$ac_objext
7240if { (ac_try="$ac_compile"
7241case "(($ac_try" in
7242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7243 *) ac_try_echo=$ac_try;;
7244esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007246 (eval "$ac_compile") 2>conftest.er1
7247 ac_status=$?
7248 grep -v '^ *+' conftest.er1 >conftest.err
7249 rm -f conftest.er1
7250 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007252 (exit $ac_status); } && {
7253 test -z "$ac_c_werror_flag" ||
7254 test ! -s conftest.err
7255 } && test -s conftest.$ac_objext; then
7256 :
7257else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007258 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007259sed 's/^/| /' conftest.$ac_ext >&5
7260
7261 case $ac_type in
7262 int32_t) ac_cv_c_int32_t=yes ;;
7263 *) ac_cv_c_int32_t=$ac_type ;;
7264esac
7265
7266fi
7267
7268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7269else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007270 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007271sed 's/^/| /' conftest.$ac_ext >&5
7272
7273
7274fi
7275
7276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7277 test "$ac_cv_c_int32_t" != no && break
7278 done
7279fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007280{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7281echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007282 case $ac_cv_c_int32_t in #(
7283 no|yes) ;; #(
7284 *)
7285
7286cat >>confdefs.h <<_ACEOF
7287#define int32_t $ac_cv_c_int32_t
7288_ACEOF
7289;;
7290 esac
7291
7292
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007293 { echo "$as_me:$LINENO: checking for int64_t" >&5
7294echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007295if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007296 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007297else
7298 ac_cv_c_int64_t=no
7299 for ac_type in 'int64_t' 'int' 'long int' \
7300 'long long int' 'short int' 'signed char'; do
7301 cat >conftest.$ac_ext <<_ACEOF
7302/* confdefs.h. */
7303_ACEOF
7304cat confdefs.h >>conftest.$ac_ext
7305cat >>conftest.$ac_ext <<_ACEOF
7306/* end confdefs.h. */
7307$ac_includes_default
7308int
7309main ()
7310{
7311static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7312test_array [0] = 0
7313
7314 ;
7315 return 0;
7316}
7317_ACEOF
7318rm -f conftest.$ac_objext
7319if { (ac_try="$ac_compile"
7320case "(($ac_try" in
7321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7322 *) ac_try_echo=$ac_try;;
7323esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007325 (eval "$ac_compile") 2>conftest.er1
7326 ac_status=$?
7327 grep -v '^ *+' conftest.er1 >conftest.err
7328 rm -f conftest.er1
7329 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007331 (exit $ac_status); } && {
7332 test -z "$ac_c_werror_flag" ||
7333 test ! -s conftest.err
7334 } && test -s conftest.$ac_objext; then
7335 cat >conftest.$ac_ext <<_ACEOF
7336/* confdefs.h. */
7337_ACEOF
7338cat confdefs.h >>conftest.$ac_ext
7339cat >>conftest.$ac_ext <<_ACEOF
7340/* end confdefs.h. */
7341$ac_includes_default
7342int
7343main ()
7344{
7345static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007346 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007347test_array [0] = 0
7348
7349 ;
7350 return 0;
7351}
7352_ACEOF
7353rm -f conftest.$ac_objext
7354if { (ac_try="$ac_compile"
7355case "(($ac_try" in
7356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7357 *) ac_try_echo=$ac_try;;
7358esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007360 (eval "$ac_compile") 2>conftest.er1
7361 ac_status=$?
7362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest.$ac_objext; then
7370 :
7371else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007372 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007373sed 's/^/| /' conftest.$ac_ext >&5
7374
7375 case $ac_type in
7376 int64_t) ac_cv_c_int64_t=yes ;;
7377 *) ac_cv_c_int64_t=$ac_type ;;
7378esac
7379
7380fi
7381
7382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7383else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007384 echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007385sed 's/^/| /' conftest.$ac_ext >&5
7386
7387
7388fi
7389
7390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7391 test "$ac_cv_c_int64_t" != no && break
7392 done
7393fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007394{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7395echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007396 case $ac_cv_c_int64_t in #(
7397 no|yes) ;; #(
7398 *)
7399
7400cat >>confdefs.h <<_ACEOF
7401#define int64_t $ac_cv_c_int64_t
7402_ACEOF
7403;;
7404 esac
7405
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007406{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7407echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007408if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007410else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411 cat >conftest.$ac_ext <<_ACEOF
7412/* confdefs.h. */
7413_ACEOF
7414cat confdefs.h >>conftest.$ac_ext
7415cat >>conftest.$ac_ext <<_ACEOF
7416/* end confdefs.h. */
7417$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007418typedef ssize_t ac__type_new_;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419int
7420main ()
7421{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007422if ((ac__type_new_ *) 0)
7423 return 0;
7424if (sizeof (ac__type_new_))
7425 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007426 ;
7427 return 0;
7428}
7429_ACEOF
7430rm -f conftest.$ac_objext
7431if { (ac_try="$ac_compile"
7432case "(($ac_try" in
7433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7434 *) ac_try_echo=$ac_try;;
7435esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437 (eval "$ac_compile") 2>conftest.er1
7438 ac_status=$?
7439 grep -v '^ *+' conftest.er1 >conftest.err
7440 rm -f conftest.er1
7441 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007443 (exit $ac_status); } && {
7444 test -z "$ac_c_werror_flag" ||
7445 test ! -s conftest.err
7446 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007447 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007448else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007449 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450sed 's/^/| /' conftest.$ac_ext >&5
7451
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007452 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007454
7455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007457{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7458echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7459if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007460
7461cat >>confdefs.h <<\_ACEOF
7462#define HAVE_SSIZE_T 1
7463_ACEOF
7464
7465fi
7466
Jack Jansendd19cf82001-12-06 22:36:17 +00007467
Michael W. Hudson54241132001-12-07 15:38:26 +00007468# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007469# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007470{ echo "$as_me:$LINENO: checking for int" >&5
7471echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7472if test "${ac_cv_type_int+set}" = set; then
7473 echo $ECHO_N "(cached) $ECHO_C" >&6
7474else
7475 cat >conftest.$ac_ext <<_ACEOF
7476/* confdefs.h. */
7477_ACEOF
7478cat confdefs.h >>conftest.$ac_ext
7479cat >>conftest.$ac_ext <<_ACEOF
7480/* end confdefs.h. */
7481$ac_includes_default
7482typedef int ac__type_new_;
7483int
7484main ()
7485{
7486if ((ac__type_new_ *) 0)
7487 return 0;
7488if (sizeof (ac__type_new_))
7489 return 0;
7490 ;
7491 return 0;
7492}
7493_ACEOF
7494rm -f conftest.$ac_objext
7495if { (ac_try="$ac_compile"
7496case "(($ac_try" in
7497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7498 *) ac_try_echo=$ac_try;;
7499esac
7500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7501 (eval "$ac_compile") 2>conftest.er1
7502 ac_status=$?
7503 grep -v '^ *+' conftest.er1 >conftest.err
7504 rm -f conftest.er1
7505 cat conftest.err >&5
7506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7507 (exit $ac_status); } && {
7508 test -z "$ac_c_werror_flag" ||
7509 test ! -s conftest.err
7510 } && test -s conftest.$ac_objext; then
7511 ac_cv_type_int=yes
7512else
7513 echo "$as_me: failed program was:" >&5
7514sed 's/^/| /' conftest.$ac_ext >&5
7515
7516 ac_cv_type_int=no
7517fi
7518
7519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7520fi
7521{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7522echo "${ECHO_T}$ac_cv_type_int" >&6; }
7523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007524# The cast to long int works around a bug in the HP C Compiler
7525# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7526# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7527# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007528{ echo "$as_me:$LINENO: checking size of int" >&5
7529echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007530if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007531 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007532else
Martin v. Löwis11437992002-04-12 09:54:03 +00007533 if test "$cross_compiling" = yes; then
7534 # Depending upon the size, compute the lo and hi bounds.
7535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007536/* confdefs.h. */
7537_ACEOF
7538cat confdefs.h >>conftest.$ac_ext
7539cat >>conftest.$ac_ext <<_ACEOF
7540/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007541$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007542 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007543int
7544main ()
7545{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007546static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007547test_array [0] = 0
7548
7549 ;
7550 return 0;
7551}
7552_ACEOF
7553rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554if { (ac_try="$ac_compile"
7555case "(($ac_try" in
7556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7557 *) ac_try_echo=$ac_try;;
7558esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007562 grep -v '^ *+' conftest.er1 >conftest.err
7563 rm -f conftest.er1
7564 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007566 (exit $ac_status); } && {
7567 test -z "$ac_c_werror_flag" ||
7568 test ! -s conftest.err
7569 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 ac_lo=0 ac_mid=0
7571 while :; do
7572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007573/* confdefs.h. */
7574_ACEOF
7575cat confdefs.h >>conftest.$ac_ext
7576cat >>conftest.$ac_ext <<_ACEOF
7577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007578$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007579 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007580int
7581main ()
7582{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007583static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007584test_array [0] = 0
7585
7586 ;
7587 return 0;
7588}
7589_ACEOF
7590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591if { (ac_try="$ac_compile"
7592case "(($ac_try" in
7593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7594 *) ac_try_echo=$ac_try;;
7595esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007599 grep -v '^ *+' conftest.er1 >conftest.err
7600 rm -f conftest.er1
7601 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 (exit $ac_status); } && {
7604 test -z "$ac_c_werror_flag" ||
7605 test ! -s conftest.err
7606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 ac_hi=$ac_mid; break
7608else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007609 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007610sed 's/^/| /' conftest.$ac_ext >&5
7611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 ac_lo=`expr $ac_mid + 1`
7613 if test $ac_lo -le $ac_mid; then
7614 ac_lo= ac_hi=
7615 break
7616 fi
7617 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619
7620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007621 done
7622else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007624sed 's/^/| /' conftest.$ac_ext >&5
7625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007627/* confdefs.h. */
7628_ACEOF
7629cat confdefs.h >>conftest.$ac_ext
7630cat >>conftest.$ac_ext <<_ACEOF
7631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007632$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007633 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007637static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007638test_array [0] = 0
7639
7640 ;
7641 return 0;
7642}
7643_ACEOF
7644rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645if { (ac_try="$ac_compile"
7646case "(($ac_try" in
7647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7648 *) ac_try_echo=$ac_try;;
7649esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007661 ac_hi=-1 ac_mid=-1
7662 while :; do
7663 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007664/* confdefs.h. */
7665_ACEOF
7666cat confdefs.h >>conftest.$ac_ext
7667cat >>conftest.$ac_ext <<_ACEOF
7668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007669$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007670 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007671int
7672main ()
7673{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007674static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007675test_array [0] = 0
7676
7677 ;
7678 return 0;
7679}
7680_ACEOF
7681rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682if { (ac_try="$ac_compile"
7683case "(($ac_try" in
7684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7685 *) ac_try_echo=$ac_try;;
7686esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007689 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007690 grep -v '^ *+' conftest.er1 >conftest.err
7691 rm -f conftest.er1
7692 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694 (exit $ac_status); } && {
7695 test -z "$ac_c_werror_flag" ||
7696 test ! -s conftest.err
7697 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007698 ac_lo=$ac_mid; break
7699else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007701sed 's/^/| /' conftest.$ac_ext >&5
7702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 ac_hi=`expr '(' $ac_mid ')' - 1`
7704 if test $ac_mid -le $ac_hi; then
7705 ac_lo= ac_hi=
7706 break
7707 fi
7708 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710
7711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007712 done
7713else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007715sed 's/^/| /' conftest.$ac_ext >&5
7716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719
7720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722
7723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007724# Binary search between lo and hi bounds.
7725while test "x$ac_lo" != "x$ac_hi"; do
7726 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7727 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007728/* confdefs.h. */
7729_ACEOF
7730cat confdefs.h >>conftest.$ac_ext
7731cat >>conftest.$ac_ext <<_ACEOF
7732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007733$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007734 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007735int
7736main ()
7737{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007739test_array [0] = 0
7740
7741 ;
7742 return 0;
7743}
7744_ACEOF
7745rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746if { (ac_try="$ac_compile"
7747case "(($ac_try" in
7748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7749 *) ac_try_echo=$ac_try;;
7750esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007754 grep -v '^ *+' conftest.er1 >conftest.err
7755 rm -f conftest.er1
7756 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 (exit $ac_status); } && {
7759 test -z "$ac_c_werror_flag" ||
7760 test ! -s conftest.err
7761 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 ac_hi=$ac_mid
7763else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007765sed 's/^/| /' conftest.$ac_ext >&5
7766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769
7770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007771done
7772case $ac_lo in
7773?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007775 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007776See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007777echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007778See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007779 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780 else
7781 ac_cv_sizeof_int=0
7782 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007783esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007784else
Martin v. Löwis11437992002-04-12 09:54:03 +00007785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007786/* confdefs.h. */
7787_ACEOF
7788cat confdefs.h >>conftest.$ac_ext
7789cat >>conftest.$ac_ext <<_ACEOF
7790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007791$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007792 typedef int ac__type_sizeof_;
7793static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7794static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007795#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007796#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007797int
7798main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007799{
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
7801 FILE *f = fopen ("conftest.val", "w");
7802 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007804 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007806 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007807 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007809 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 }
7811 else
7812 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007814 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007816 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
7820 ;
7821 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007822}
Martin v. Löwis11437992002-04-12 09:54:03 +00007823_ACEOF
7824rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825if { (ac_try="$ac_link"
7826case "(($ac_try" in
7827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7828 *) ac_try_echo=$ac_try;;
7829esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007832 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 { (case "(($ac_try" in
7836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7837 *) ac_try_echo=$ac_try;;
7838esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 (exit $ac_status); }; }; then
7844 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007845else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007846 echo "$as_me: program exited with status $ac_status" >&5
7847echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007848sed 's/^/| /' conftest.$ac_ext >&5
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007852 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007853See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007854echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007855See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007856 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857 else
7858 ac_cv_sizeof_int=0
7859 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861rm -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 +00007862fi
7863rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007864fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007865{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7866echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867
7868
7869
Martin v. Löwis11437992002-04-12 09:54:03 +00007870cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007871#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007872_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007873
7874
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007875{ echo "$as_me:$LINENO: checking for long" >&5
7876echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7877if test "${ac_cv_type_long+set}" = set; then
7878 echo $ECHO_N "(cached) $ECHO_C" >&6
7879else
7880 cat >conftest.$ac_ext <<_ACEOF
7881/* confdefs.h. */
7882_ACEOF
7883cat confdefs.h >>conftest.$ac_ext
7884cat >>conftest.$ac_ext <<_ACEOF
7885/* end confdefs.h. */
7886$ac_includes_default
7887typedef long ac__type_new_;
7888int
7889main ()
7890{
7891if ((ac__type_new_ *) 0)
7892 return 0;
7893if (sizeof (ac__type_new_))
7894 return 0;
7895 ;
7896 return 0;
7897}
7898_ACEOF
7899rm -f conftest.$ac_objext
7900if { (ac_try="$ac_compile"
7901case "(($ac_try" in
7902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7903 *) ac_try_echo=$ac_try;;
7904esac
7905eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7906 (eval "$ac_compile") 2>conftest.er1
7907 ac_status=$?
7908 grep -v '^ *+' conftest.er1 >conftest.err
7909 rm -f conftest.er1
7910 cat conftest.err >&5
7911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7912 (exit $ac_status); } && {
7913 test -z "$ac_c_werror_flag" ||
7914 test ! -s conftest.err
7915 } && test -s conftest.$ac_objext; then
7916 ac_cv_type_long=yes
7917else
7918 echo "$as_me: failed program was:" >&5
7919sed 's/^/| /' conftest.$ac_ext >&5
7920
7921 ac_cv_type_long=no
7922fi
7923
7924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7925fi
7926{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7927echo "${ECHO_T}$ac_cv_type_long" >&6; }
7928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007929# The cast to long int works around a bug in the HP C Compiler
7930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7932# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007933{ echo "$as_me:$LINENO: checking size of long" >&5
7934echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007935if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007936 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007937else
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 if test "$cross_compiling" = yes; then
7939 # Depending upon the size, compute the lo and hi bounds.
7940cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007941/* confdefs.h. */
7942_ACEOF
7943cat confdefs.h >>conftest.$ac_ext
7944cat >>conftest.$ac_ext <<_ACEOF
7945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007947 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007948int
7949main ()
7950{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007951static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007952test_array [0] = 0
7953
7954 ;
7955 return 0;
7956}
7957_ACEOF
7958rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959if { (ac_try="$ac_compile"
7960case "(($ac_try" in
7961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7962 *) ac_try_echo=$ac_try;;
7963esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007967 grep -v '^ *+' conftest.er1 >conftest.err
7968 rm -f conftest.er1
7969 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 (exit $ac_status); } && {
7972 test -z "$ac_c_werror_flag" ||
7973 test ! -s conftest.err
7974 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007975 ac_lo=0 ac_mid=0
7976 while :; do
7977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* confdefs.h. */
7979_ACEOF
7980cat confdefs.h >>conftest.$ac_ext
7981cat >>conftest.$ac_ext <<_ACEOF
7982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007984 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007985int
7986main ()
7987{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00007988static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007989test_array [0] = 0
7990
7991 ;
7992 return 0;
7993}
7994_ACEOF
7995rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996if { (ac_try="$ac_compile"
7997case "(($ac_try" in
7998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7999 *) ac_try_echo=$ac_try;;
8000esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008004 grep -v '^ *+' conftest.er1 >conftest.err
8005 rm -f conftest.er1
8006 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 (exit $ac_status); } && {
8009 test -z "$ac_c_werror_flag" ||
8010 test ! -s conftest.err
8011 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008012 ac_hi=$ac_mid; break
8013else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008015sed 's/^/| /' conftest.$ac_ext >&5
8016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 ac_lo=`expr $ac_mid + 1`
8018 if test $ac_lo -le $ac_mid; then
8019 ac_lo= ac_hi=
8020 break
8021 fi
8022 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024
8025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 done
8027else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008029sed 's/^/| /' conftest.$ac_ext >&5
8030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* confdefs.h. */
8033_ACEOF
8034cat confdefs.h >>conftest.$ac_ext
8035cat >>conftest.$ac_ext <<_ACEOF
8036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008038 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008039int
8040main ()
8041{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008043test_array [0] = 0
8044
8045 ;
8046 return 0;
8047}
8048_ACEOF
8049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050if { (ac_try="$ac_compile"
8051case "(($ac_try" in
8052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8053 *) ac_try_echo=$ac_try;;
8054esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008058 grep -v '^ *+' conftest.er1 >conftest.err
8059 rm -f conftest.er1
8060 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 (exit $ac_status); } && {
8063 test -z "$ac_c_werror_flag" ||
8064 test ! -s conftest.err
8065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ac_hi=-1 ac_mid=-1
8067 while :; do
8068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008069/* confdefs.h. */
8070_ACEOF
8071cat confdefs.h >>conftest.$ac_ext
8072cat >>conftest.$ac_ext <<_ACEOF
8073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008074$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008075 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008076int
8077main ()
8078{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008080test_array [0] = 0
8081
8082 ;
8083 return 0;
8084}
8085_ACEOF
8086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008087if { (ac_try="$ac_compile"
8088case "(($ac_try" in
8089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8090 *) ac_try_echo=$ac_try;;
8091esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008095 grep -v '^ *+' conftest.er1 >conftest.err
8096 rm -f conftest.er1
8097 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 (exit $ac_status); } && {
8100 test -z "$ac_c_werror_flag" ||
8101 test ! -s conftest.err
8102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008103 ac_lo=$ac_mid; break
8104else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008106sed 's/^/| /' conftest.$ac_ext >&5
8107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 ac_hi=`expr '(' $ac_mid ')' - 1`
8109 if test $ac_mid -le $ac_hi; then
8110 ac_lo= ac_hi=
8111 break
8112 fi
8113 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115
8116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008117 done
8118else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008120sed 's/^/| /' conftest.$ac_ext >&5
8121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008124
8125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127
8128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008129# Binary search between lo and hi bounds.
8130while test "x$ac_lo" != "x$ac_hi"; do
8131 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008133/* confdefs.h. */
8134_ACEOF
8135cat confdefs.h >>conftest.$ac_ext
8136cat >>conftest.$ac_ext <<_ACEOF
8137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008138$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008139 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008140int
8141main ()
8142{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008143static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008144test_array [0] = 0
8145
8146 ;
8147 return 0;
8148}
8149_ACEOF
8150rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151if { (ac_try="$ac_compile"
8152case "(($ac_try" in
8153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8154 *) ac_try_echo=$ac_try;;
8155esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008159 grep -v '^ *+' conftest.er1 >conftest.err
8160 rm -f conftest.er1
8161 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163 (exit $ac_status); } && {
8164 test -z "$ac_c_werror_flag" ||
8165 test ! -s conftest.err
8166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008167 ac_hi=$ac_mid
8168else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008170sed 's/^/| /' conftest.$ac_ext >&5
8171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174
8175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008176done
8177case $ac_lo in
8178?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008180 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008181See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008182echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008183See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008184 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008185 else
8186 ac_cv_sizeof_long=0
8187 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008188esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008189else
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* confdefs.h. */
8192_ACEOF
8193cat confdefs.h >>conftest.$ac_ext
8194cat >>conftest.$ac_ext <<_ACEOF
8195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008196$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008197 typedef long ac__type_sizeof_;
8198static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8199static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008200#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008201#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008202int
8203main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008204{
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
8206 FILE *f = fopen ("conftest.val", "w");
8207 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008208 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008209 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008211 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008212 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008214 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 }
8216 else
8217 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008219 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008221 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008224
8225 ;
8226 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008227}
Martin v. Löwis11437992002-04-12 09:54:03 +00008228_ACEOF
8229rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230if { (ac_try="$ac_link"
8231case "(($ac_try" in
8232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8233 *) ac_try_echo=$ac_try;;
8234esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008236 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008237 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240 { (case "(($ac_try" in
8241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8242 *) ac_try_echo=$ac_try;;
8243esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008246 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 (exit $ac_status); }; }; then
8249 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008250else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008251 echo "$as_me: program exited with status $ac_status" >&5
8252echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008253sed 's/^/| /' conftest.$ac_ext >&5
8254
Martin v. Löwis11437992002-04-12 09:54:03 +00008255( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008257 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008258See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008259echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008260See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008261 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 else
8263 ac_cv_sizeof_long=0
8264 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008266rm -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 +00008267fi
8268rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008269fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008270{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8271echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272
8273
8274
Martin v. Löwis11437992002-04-12 09:54:03 +00008275cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008276#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008277_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008278
8279
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008280{ echo "$as_me:$LINENO: checking for void *" >&5
8281echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8282if test "${ac_cv_type_void_p+set}" = set; then
8283 echo $ECHO_N "(cached) $ECHO_C" >&6
8284else
8285 cat >conftest.$ac_ext <<_ACEOF
8286/* confdefs.h. */
8287_ACEOF
8288cat confdefs.h >>conftest.$ac_ext
8289cat >>conftest.$ac_ext <<_ACEOF
8290/* end confdefs.h. */
8291$ac_includes_default
8292typedef void * ac__type_new_;
8293int
8294main ()
8295{
8296if ((ac__type_new_ *) 0)
8297 return 0;
8298if (sizeof (ac__type_new_))
8299 return 0;
8300 ;
8301 return 0;
8302}
8303_ACEOF
8304rm -f conftest.$ac_objext
8305if { (ac_try="$ac_compile"
8306case "(($ac_try" in
8307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8308 *) ac_try_echo=$ac_try;;
8309esac
8310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8311 (eval "$ac_compile") 2>conftest.er1
8312 ac_status=$?
8313 grep -v '^ *+' conftest.er1 >conftest.err
8314 rm -f conftest.er1
8315 cat conftest.err >&5
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); } && {
8318 test -z "$ac_c_werror_flag" ||
8319 test ! -s conftest.err
8320 } && test -s conftest.$ac_objext; then
8321 ac_cv_type_void_p=yes
8322else
8323 echo "$as_me: failed program was:" >&5
8324sed 's/^/| /' conftest.$ac_ext >&5
8325
8326 ac_cv_type_void_p=no
8327fi
8328
8329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8330fi
8331{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8332echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334# The cast to long int works around a bug in the HP C Compiler
8335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8337# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008338{ echo "$as_me:$LINENO: checking size of void *" >&5
8339echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008340if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008341 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008342else
Martin v. Löwis11437992002-04-12 09:54:03 +00008343 if test "$cross_compiling" = yes; then
8344 # Depending upon the size, compute the lo and hi bounds.
8345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008346/* confdefs.h. */
8347_ACEOF
8348cat confdefs.h >>conftest.$ac_ext
8349cat >>conftest.$ac_ext <<_ACEOF
8350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008351$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008352 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008353int
8354main ()
8355{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008356static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008357test_array [0] = 0
8358
8359 ;
8360 return 0;
8361}
8362_ACEOF
8363rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364if { (ac_try="$ac_compile"
8365case "(($ac_try" in
8366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8367 *) ac_try_echo=$ac_try;;
8368esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008372 grep -v '^ *+' conftest.er1 >conftest.err
8373 rm -f conftest.er1
8374 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376 (exit $ac_status); } && {
8377 test -z "$ac_c_werror_flag" ||
8378 test ! -s conftest.err
8379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008380 ac_lo=0 ac_mid=0
8381 while :; do
8382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008383/* confdefs.h. */
8384_ACEOF
8385cat confdefs.h >>conftest.$ac_ext
8386cat >>conftest.$ac_ext <<_ACEOF
8387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008388$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008389 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008390int
8391main ()
8392{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008393static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008394test_array [0] = 0
8395
8396 ;
8397 return 0;
8398}
8399_ACEOF
8400rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008401if { (ac_try="$ac_compile"
8402case "(($ac_try" in
8403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8404 *) ac_try_echo=$ac_try;;
8405esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008409 grep -v '^ *+' conftest.er1 >conftest.err
8410 rm -f conftest.er1
8411 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413 (exit $ac_status); } && {
8414 test -z "$ac_c_werror_flag" ||
8415 test ! -s conftest.err
8416 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008417 ac_hi=$ac_mid; break
8418else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008420sed 's/^/| /' conftest.$ac_ext >&5
8421
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 ac_lo=`expr $ac_mid + 1`
8423 if test $ac_lo -le $ac_mid; then
8424 ac_lo= ac_hi=
8425 break
8426 fi
8427 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429
8430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 done
8432else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008434sed 's/^/| /' conftest.$ac_ext >&5
8435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008437/* confdefs.h. */
8438_ACEOF
8439cat confdefs.h >>conftest.$ac_ext
8440cat >>conftest.$ac_ext <<_ACEOF
8441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008442$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008443 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008444int
8445main ()
8446{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008448test_array [0] = 0
8449
8450 ;
8451 return 0;
8452}
8453_ACEOF
8454rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455if { (ac_try="$ac_compile"
8456case "(($ac_try" in
8457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8458 *) ac_try_echo=$ac_try;;
8459esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008463 grep -v '^ *+' conftest.er1 >conftest.err
8464 rm -f conftest.er1
8465 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 (exit $ac_status); } && {
8468 test -z "$ac_c_werror_flag" ||
8469 test ! -s conftest.err
8470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_hi=-1 ac_mid=-1
8472 while :; do
8473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008474/* confdefs.h. */
8475_ACEOF
8476cat confdefs.h >>conftest.$ac_ext
8477cat >>conftest.$ac_ext <<_ACEOF
8478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008479$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008480 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008481int
8482main ()
8483{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008485test_array [0] = 0
8486
8487 ;
8488 return 0;
8489}
8490_ACEOF
8491rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492if { (ac_try="$ac_compile"
8493case "(($ac_try" in
8494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8495 *) ac_try_echo=$ac_try;;
8496esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008500 grep -v '^ *+' conftest.er1 >conftest.err
8501 rm -f conftest.er1
8502 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504 (exit $ac_status); } && {
8505 test -z "$ac_c_werror_flag" ||
8506 test ! -s conftest.err
8507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_lo=$ac_mid; break
8509else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008511sed 's/^/| /' conftest.$ac_ext >&5
8512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513 ac_hi=`expr '(' $ac_mid ')' - 1`
8514 if test $ac_mid -le $ac_hi; then
8515 ac_lo= ac_hi=
8516 break
8517 fi
8518 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520
8521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008522 done
8523else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008525sed 's/^/| /' conftest.$ac_ext >&5
8526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529
8530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532
8533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534# Binary search between lo and hi bounds.
8535while test "x$ac_lo" != "x$ac_hi"; do
8536 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8537 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008538/* confdefs.h. */
8539_ACEOF
8540cat confdefs.h >>conftest.$ac_ext
8541cat >>conftest.$ac_ext <<_ACEOF
8542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008543$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008544 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008545int
8546main ()
8547{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008548static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008549test_array [0] = 0
8550
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556if { (ac_try="$ac_compile"
8557case "(($ac_try" in
8558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559 *) ac_try_echo=$ac_try;;
8560esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008564 grep -v '^ *+' conftest.er1 >conftest.err
8565 rm -f conftest.er1
8566 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568 (exit $ac_status); } && {
8569 test -z "$ac_c_werror_flag" ||
8570 test ! -s conftest.err
8571 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_hi=$ac_mid
8573else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008575sed 's/^/| /' conftest.$ac_ext >&5
8576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579
8580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008581done
8582case $ac_lo in
8583?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008585 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008586See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008587echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008588See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008589 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008590 else
8591 ac_cv_sizeof_void_p=0
8592 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008593esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008594else
Martin v. Löwis11437992002-04-12 09:54:03 +00008595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008596/* confdefs.h. */
8597_ACEOF
8598cat confdefs.h >>conftest.$ac_ext
8599cat >>conftest.$ac_ext <<_ACEOF
8600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008601$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008602 typedef void * ac__type_sizeof_;
8603static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8604static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008605#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008606#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008607int
8608main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008609{
Martin v. Löwis11437992002-04-12 09:54:03 +00008610
8611 FILE *f = fopen ("conftest.val", "w");
8612 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008614 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008617 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008618 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008619 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 }
8621 else
8622 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008624 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008626 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008628 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008629
8630 ;
8631 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008632}
Martin v. Löwis11437992002-04-12 09:54:03 +00008633_ACEOF
8634rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635if { (ac_try="$ac_link"
8636case "(($ac_try" in
8637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8638 *) ac_try_echo=$ac_try;;
8639esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 { (case "(($ac_try" in
8646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8647 *) ac_try_echo=$ac_try;;
8648esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008651 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 (exit $ac_status); }; }; then
8654 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008655else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008656 echo "$as_me: program exited with status $ac_status" >&5
8657echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008658sed 's/^/| /' conftest.$ac_ext >&5
8659
Martin v. Löwis11437992002-04-12 09:54:03 +00008660( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008661if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008662 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008663See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008664echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008665See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008666 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667 else
8668 ac_cv_sizeof_void_p=0
8669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671rm -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 +00008672fi
8673rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008674fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008675{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8676echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677
8678
8679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008681#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008682_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008683
8684
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008685{ echo "$as_me:$LINENO: checking for short" >&5
8686echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8687if test "${ac_cv_type_short+set}" = set; then
8688 echo $ECHO_N "(cached) $ECHO_C" >&6
8689else
8690 cat >conftest.$ac_ext <<_ACEOF
8691/* confdefs.h. */
8692_ACEOF
8693cat confdefs.h >>conftest.$ac_ext
8694cat >>conftest.$ac_ext <<_ACEOF
8695/* end confdefs.h. */
8696$ac_includes_default
8697typedef short ac__type_new_;
8698int
8699main ()
8700{
8701if ((ac__type_new_ *) 0)
8702 return 0;
8703if (sizeof (ac__type_new_))
8704 return 0;
8705 ;
8706 return 0;
8707}
8708_ACEOF
8709rm -f conftest.$ac_objext
8710if { (ac_try="$ac_compile"
8711case "(($ac_try" in
8712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8713 *) ac_try_echo=$ac_try;;
8714esac
8715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8716 (eval "$ac_compile") 2>conftest.er1
8717 ac_status=$?
8718 grep -v '^ *+' conftest.er1 >conftest.err
8719 rm -f conftest.er1
8720 cat conftest.err >&5
8721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722 (exit $ac_status); } && {
8723 test -z "$ac_c_werror_flag" ||
8724 test ! -s conftest.err
8725 } && test -s conftest.$ac_objext; then
8726 ac_cv_type_short=yes
8727else
8728 echo "$as_me: failed program was:" >&5
8729sed 's/^/| /' conftest.$ac_ext >&5
8730
8731 ac_cv_type_short=no
8732fi
8733
8734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8735fi
8736{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8737echo "${ECHO_T}$ac_cv_type_short" >&6; }
8738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739# The cast to long int works around a bug in the HP C Compiler
8740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8742# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008743{ echo "$as_me:$LINENO: checking size of short" >&5
8744echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008745if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008746 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008747else
Martin v. Löwis11437992002-04-12 09:54:03 +00008748 if test "$cross_compiling" = yes; then
8749 # Depending upon the size, compute the lo and hi bounds.
8750cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008751/* confdefs.h. */
8752_ACEOF
8753cat confdefs.h >>conftest.$ac_ext
8754cat >>conftest.$ac_ext <<_ACEOF
8755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008756$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008757 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008758int
8759main ()
8760{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008761static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008762test_array [0] = 0
8763
8764 ;
8765 return 0;
8766}
8767_ACEOF
8768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769if { (ac_try="$ac_compile"
8770case "(($ac_try" in
8771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8772 *) ac_try_echo=$ac_try;;
8773esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008777 grep -v '^ *+' conftest.er1 >conftest.err
8778 rm -f conftest.er1
8779 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781 (exit $ac_status); } && {
8782 test -z "$ac_c_werror_flag" ||
8783 test ! -s conftest.err
8784 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 ac_lo=0 ac_mid=0
8786 while :; do
8787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008788/* confdefs.h. */
8789_ACEOF
8790cat confdefs.h >>conftest.$ac_ext
8791cat >>conftest.$ac_ext <<_ACEOF
8792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008793$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008794 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008795int
8796main ()
8797{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008799test_array [0] = 0
8800
8801 ;
8802 return 0;
8803}
8804_ACEOF
8805rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806if { (ac_try="$ac_compile"
8807case "(($ac_try" in
8808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8809 *) ac_try_echo=$ac_try;;
8810esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008814 grep -v '^ *+' conftest.er1 >conftest.err
8815 rm -f conftest.er1
8816 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818 (exit $ac_status); } && {
8819 test -z "$ac_c_werror_flag" ||
8820 test ! -s conftest.err
8821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ac_hi=$ac_mid; break
8823else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008824 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008825sed 's/^/| /' conftest.$ac_ext >&5
8826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827 ac_lo=`expr $ac_mid + 1`
8828 if test $ac_lo -le $ac_mid; then
8829 ac_lo= ac_hi=
8830 break
8831 fi
8832 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834
8835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008836 done
8837else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008839sed 's/^/| /' conftest.$ac_ext >&5
8840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* confdefs.h. */
8843_ACEOF
8844cat confdefs.h >>conftest.$ac_ext
8845cat >>conftest.$ac_ext <<_ACEOF
8846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008847$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008848 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008853test_array [0] = 0
8854
8855 ;
8856 return 0;
8857}
8858_ACEOF
8859rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860if { (ac_try="$ac_compile"
8861case "(($ac_try" in
8862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8863 *) ac_try_echo=$ac_try;;
8864esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008868 grep -v '^ *+' conftest.er1 >conftest.err
8869 rm -f conftest.er1
8870 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872 (exit $ac_status); } && {
8873 test -z "$ac_c_werror_flag" ||
8874 test ! -s conftest.err
8875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 ac_hi=-1 ac_mid=-1
8877 while :; do
8878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008879/* confdefs.h. */
8880_ACEOF
8881cat confdefs.h >>conftest.$ac_ext
8882cat >>conftest.$ac_ext <<_ACEOF
8883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008884$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008885 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008890test_array [0] = 0
8891
8892 ;
8893 return 0;
8894}
8895_ACEOF
8896rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897if { (ac_try="$ac_compile"
8898case "(($ac_try" in
8899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8900 *) ac_try_echo=$ac_try;;
8901esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008905 grep -v '^ *+' conftest.er1 >conftest.err
8906 rm -f conftest.er1
8907 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008909 (exit $ac_status); } && {
8910 test -z "$ac_c_werror_flag" ||
8911 test ! -s conftest.err
8912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_lo=$ac_mid; break
8914else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008916sed 's/^/| /' conftest.$ac_ext >&5
8917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918 ac_hi=`expr '(' $ac_mid ')' - 1`
8919 if test $ac_mid -le $ac_hi; then
8920 ac_lo= ac_hi=
8921 break
8922 fi
8923 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925
8926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 done
8928else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008930sed 's/^/| /' conftest.$ac_ext >&5
8931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934
8935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937
8938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008939# Binary search between lo and hi bounds.
8940while test "x$ac_lo" != "x$ac_hi"; do
8941 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* confdefs.h. */
8944_ACEOF
8945cat confdefs.h >>conftest.$ac_ext
8946cat >>conftest.$ac_ext <<_ACEOF
8947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008948$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008949 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008950int
8951main ()
8952{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008953static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008954test_array [0] = 0
8955
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961if { (ac_try="$ac_compile"
8962case "(($ac_try" in
8963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8964 *) ac_try_echo=$ac_try;;
8965esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008969 grep -v '^ *+' conftest.er1 >conftest.err
8970 rm -f conftest.er1
8971 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973 (exit $ac_status); } && {
8974 test -z "$ac_c_werror_flag" ||
8975 test ! -s conftest.err
8976 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 ac_hi=$ac_mid
8978else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008980sed 's/^/| /' conftest.$ac_ext >&5
8981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984
8985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008986done
8987case $ac_lo in
8988?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008989'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008990 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008991See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008992echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008993See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00008994 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995 else
8996 ac_cv_sizeof_short=0
8997 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008998esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008999else
Martin v. Löwis11437992002-04-12 09:54:03 +00009000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009001/* confdefs.h. */
9002_ACEOF
9003cat confdefs.h >>conftest.$ac_ext
9004cat >>conftest.$ac_ext <<_ACEOF
9005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009006$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009007 typedef short ac__type_sizeof_;
9008static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9009static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009010#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009011#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009012int
9013main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009014{
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
9016 FILE *f = fopen ("conftest.val", "w");
9017 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009018 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009019 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009022 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009024 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 }
9026 else
9027 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009029 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009030 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009031 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009034
9035 ;
9036 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009037}
Martin v. Löwis11437992002-04-12 09:54:03 +00009038_ACEOF
9039rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040if { (ac_try="$ac_link"
9041case "(($ac_try" in
9042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9043 *) ac_try_echo=$ac_try;;
9044esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050 { (case "(($ac_try" in
9051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9052 *) ac_try_echo=$ac_try;;
9053esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009056 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 (exit $ac_status); }; }; then
9059 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009060else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009061 echo "$as_me: program exited with status $ac_status" >&5
9062echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009063sed 's/^/| /' conftest.$ac_ext >&5
9064
Martin v. Löwis11437992002-04-12 09:54:03 +00009065( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009066if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009067 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009068See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009069echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009070See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009071 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072 else
9073 ac_cv_sizeof_short=0
9074 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076rm -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 +00009077fi
9078rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009079fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009080{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9081echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009082
9083
9084
Martin v. Löwis11437992002-04-12 09:54:03 +00009085cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009086#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009088
9089
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009090{ echo "$as_me:$LINENO: checking for float" >&5
9091echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9092if test "${ac_cv_type_float+set}" = set; then
9093 echo $ECHO_N "(cached) $ECHO_C" >&6
9094else
9095 cat >conftest.$ac_ext <<_ACEOF
9096/* confdefs.h. */
9097_ACEOF
9098cat confdefs.h >>conftest.$ac_ext
9099cat >>conftest.$ac_ext <<_ACEOF
9100/* end confdefs.h. */
9101$ac_includes_default
9102typedef float ac__type_new_;
9103int
9104main ()
9105{
9106if ((ac__type_new_ *) 0)
9107 return 0;
9108if (sizeof (ac__type_new_))
9109 return 0;
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114rm -f conftest.$ac_objext
9115if { (ac_try="$ac_compile"
9116case "(($ac_try" in
9117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9118 *) ac_try_echo=$ac_try;;
9119esac
9120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9121 (eval "$ac_compile") 2>conftest.er1
9122 ac_status=$?
9123 grep -v '^ *+' conftest.er1 >conftest.err
9124 rm -f conftest.er1
9125 cat conftest.err >&5
9126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9127 (exit $ac_status); } && {
9128 test -z "$ac_c_werror_flag" ||
9129 test ! -s conftest.err
9130 } && test -s conftest.$ac_objext; then
9131 ac_cv_type_float=yes
9132else
9133 echo "$as_me: failed program was:" >&5
9134sed 's/^/| /' conftest.$ac_ext >&5
9135
9136 ac_cv_type_float=no
9137fi
9138
9139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9140fi
9141{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9142echo "${ECHO_T}$ac_cv_type_float" >&6; }
9143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144# The cast to long int works around a bug in the HP C Compiler
9145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9147# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009148{ echo "$as_me:$LINENO: checking size of float" >&5
9149echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009150if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009151 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009152else
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 if test "$cross_compiling" = yes; then
9154 # Depending upon the size, compute the lo and hi bounds.
9155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009156/* confdefs.h. */
9157_ACEOF
9158cat confdefs.h >>conftest.$ac_ext
9159cat >>conftest.$ac_ext <<_ACEOF
9160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009161$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009162 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009163int
9164main ()
9165{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009166static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009167test_array [0] = 0
9168
9169 ;
9170 return 0;
9171}
9172_ACEOF
9173rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174if { (ac_try="$ac_compile"
9175case "(($ac_try" in
9176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9177 *) ac_try_echo=$ac_try;;
9178esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009182 grep -v '^ *+' conftest.er1 >conftest.err
9183 rm -f conftest.er1
9184 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009186 (exit $ac_status); } && {
9187 test -z "$ac_c_werror_flag" ||
9188 test ! -s conftest.err
9189 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ac_lo=0 ac_mid=0
9191 while :; do
9192 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009193/* confdefs.h. */
9194_ACEOF
9195cat confdefs.h >>conftest.$ac_ext
9196cat >>conftest.$ac_ext <<_ACEOF
9197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009198$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009199 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009200int
9201main ()
9202{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009204test_array [0] = 0
9205
9206 ;
9207 return 0;
9208}
9209_ACEOF
9210rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211if { (ac_try="$ac_compile"
9212case "(($ac_try" in
9213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9214 *) ac_try_echo=$ac_try;;
9215esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009219 grep -v '^ *+' conftest.er1 >conftest.err
9220 rm -f conftest.er1
9221 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223 (exit $ac_status); } && {
9224 test -z "$ac_c_werror_flag" ||
9225 test ! -s conftest.err
9226 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 ac_hi=$ac_mid; break
9228else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009229 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009230sed 's/^/| /' conftest.$ac_ext >&5
9231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232 ac_lo=`expr $ac_mid + 1`
9233 if test $ac_lo -le $ac_mid; then
9234 ac_lo= ac_hi=
9235 break
9236 fi
9237 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239
9240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 done
9242else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009244sed 's/^/| /' conftest.$ac_ext >&5
9245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* confdefs.h. */
9248_ACEOF
9249cat confdefs.h >>conftest.$ac_ext
9250cat >>conftest.$ac_ext <<_ACEOF
9251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009252$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009253 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009254int
9255main ()
9256{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009258test_array [0] = 0
9259
9260 ;
9261 return 0;
9262}
9263_ACEOF
9264rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265if { (ac_try="$ac_compile"
9266case "(($ac_try" in
9267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9268 *) ac_try_echo=$ac_try;;
9269esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009273 grep -v '^ *+' conftest.er1 >conftest.err
9274 rm -f conftest.er1
9275 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277 (exit $ac_status); } && {
9278 test -z "$ac_c_werror_flag" ||
9279 test ! -s conftest.err
9280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_hi=-1 ac_mid=-1
9282 while :; do
9283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* confdefs.h. */
9285_ACEOF
9286cat confdefs.h >>conftest.$ac_ext
9287cat >>conftest.$ac_ext <<_ACEOF
9288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009289$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009290 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009291int
9292main ()
9293{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009295test_array [0] = 0
9296
9297 ;
9298 return 0;
9299}
9300_ACEOF
9301rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302if { (ac_try="$ac_compile"
9303case "(($ac_try" in
9304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9305 *) ac_try_echo=$ac_try;;
9306esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009310 grep -v '^ *+' conftest.er1 >conftest.err
9311 rm -f conftest.er1
9312 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009314 (exit $ac_status); } && {
9315 test -z "$ac_c_werror_flag" ||
9316 test ! -s conftest.err
9317 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009318 ac_lo=$ac_mid; break
9319else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009321sed 's/^/| /' conftest.$ac_ext >&5
9322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323 ac_hi=`expr '(' $ac_mid ')' - 1`
9324 if test $ac_mid -le $ac_hi; then
9325 ac_lo= ac_hi=
9326 break
9327 fi
9328 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330
9331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 done
9333else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009335sed 's/^/| /' conftest.$ac_ext >&5
9336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009337 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339
9340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009342
9343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009344# Binary search between lo and hi bounds.
9345while test "x$ac_lo" != "x$ac_hi"; do
9346 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* confdefs.h. */
9349_ACEOF
9350cat confdefs.h >>conftest.$ac_ext
9351cat >>conftest.$ac_ext <<_ACEOF
9352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009353$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009354 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009355int
9356main ()
9357{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009358static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009359test_array [0] = 0
9360
9361 ;
9362 return 0;
9363}
9364_ACEOF
9365rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366if { (ac_try="$ac_compile"
9367case "(($ac_try" in
9368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9369 *) ac_try_echo=$ac_try;;
9370esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009374 grep -v '^ *+' conftest.er1 >conftest.err
9375 rm -f conftest.er1
9376 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009378 (exit $ac_status); } && {
9379 test -z "$ac_c_werror_flag" ||
9380 test ! -s conftest.err
9381 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 ac_hi=$ac_mid
9383else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009384 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009385sed 's/^/| /' conftest.$ac_ext >&5
9386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389
9390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009391done
9392case $ac_lo in
9393?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009395 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009396See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009397echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009398See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009399 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009400 else
9401 ac_cv_sizeof_float=0
9402 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009403esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* confdefs.h. */
9407_ACEOF
9408cat confdefs.h >>conftest.$ac_ext
9409cat >>conftest.$ac_ext <<_ACEOF
9410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009412 typedef float ac__type_sizeof_;
9413static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9414static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009415#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009416#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009417int
9418main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009419{
Martin v. Löwis11437992002-04-12 09:54:03 +00009420
9421 FILE *f = fopen ("conftest.val", "w");
9422 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009424 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009427 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009429 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009430 }
9431 else
9432 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009434 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009436 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440 ;
9441 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009442}
Martin v. Löwis11437992002-04-12 09:54:03 +00009443_ACEOF
9444rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445if { (ac_try="$ac_link"
9446case "(($ac_try" in
9447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9448 *) ac_try_echo=$ac_try;;
9449esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455 { (case "(($ac_try" in
9456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9457 *) ac_try_echo=$ac_try;;
9458esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009461 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 (exit $ac_status); }; }; then
9464 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009465else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009466 echo "$as_me: program exited with status $ac_status" >&5
9467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009468sed 's/^/| /' conftest.$ac_ext >&5
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009472 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009473See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009474echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009475See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009476 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009477 else
9478 ac_cv_sizeof_float=0
9479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009481rm -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 +00009482fi
9483rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009484fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009485{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9486echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487
9488
9489
Martin v. Löwis11437992002-04-12 09:54:03 +00009490cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009491#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009492_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009493
9494
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009495{ echo "$as_me:$LINENO: checking for double" >&5
9496echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9497if test "${ac_cv_type_double+set}" = set; then
9498 echo $ECHO_N "(cached) $ECHO_C" >&6
9499else
9500 cat >conftest.$ac_ext <<_ACEOF
9501/* confdefs.h. */
9502_ACEOF
9503cat confdefs.h >>conftest.$ac_ext
9504cat >>conftest.$ac_ext <<_ACEOF
9505/* end confdefs.h. */
9506$ac_includes_default
9507typedef double ac__type_new_;
9508int
9509main ()
9510{
9511if ((ac__type_new_ *) 0)
9512 return 0;
9513if (sizeof (ac__type_new_))
9514 return 0;
9515 ;
9516 return 0;
9517}
9518_ACEOF
9519rm -f conftest.$ac_objext
9520if { (ac_try="$ac_compile"
9521case "(($ac_try" in
9522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9523 *) ac_try_echo=$ac_try;;
9524esac
9525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9526 (eval "$ac_compile") 2>conftest.er1
9527 ac_status=$?
9528 grep -v '^ *+' conftest.er1 >conftest.err
9529 rm -f conftest.er1
9530 cat conftest.err >&5
9531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9532 (exit $ac_status); } && {
9533 test -z "$ac_c_werror_flag" ||
9534 test ! -s conftest.err
9535 } && test -s conftest.$ac_objext; then
9536 ac_cv_type_double=yes
9537else
9538 echo "$as_me: failed program was:" >&5
9539sed 's/^/| /' conftest.$ac_ext >&5
9540
9541 ac_cv_type_double=no
9542fi
9543
9544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9545fi
9546{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9547echo "${ECHO_T}$ac_cv_type_double" >&6; }
9548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549# The cast to long int works around a bug in the HP C Compiler
9550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9552# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009553{ echo "$as_me:$LINENO: checking size of double" >&5
9554echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009555if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009556 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009557else
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 if test "$cross_compiling" = yes; then
9559 # Depending upon the size, compute the lo and hi bounds.
9560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* confdefs.h. */
9562_ACEOF
9563cat confdefs.h >>conftest.$ac_ext
9564cat >>conftest.$ac_ext <<_ACEOF
9565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009567 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009568int
9569main ()
9570{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009571static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009572test_array [0] = 0
9573
9574 ;
9575 return 0;
9576}
9577_ACEOF
9578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579if { (ac_try="$ac_compile"
9580case "(($ac_try" in
9581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582 *) ac_try_echo=$ac_try;;
9583esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009587 grep -v '^ *+' conftest.er1 >conftest.err
9588 rm -f conftest.er1
9589 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009591 (exit $ac_status); } && {
9592 test -z "$ac_c_werror_flag" ||
9593 test ! -s conftest.err
9594 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 ac_lo=0 ac_mid=0
9596 while :; do
9597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009598/* confdefs.h. */
9599_ACEOF
9600cat confdefs.h >>conftest.$ac_ext
9601cat >>conftest.$ac_ext <<_ACEOF
9602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009603$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009604 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009605int
9606main ()
9607{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009608static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009609test_array [0] = 0
9610
9611 ;
9612 return 0;
9613}
9614_ACEOF
9615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616if { (ac_try="$ac_compile"
9617case "(($ac_try" in
9618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9619 *) ac_try_echo=$ac_try;;
9620esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009624 grep -v '^ *+' conftest.er1 >conftest.err
9625 rm -f conftest.er1
9626 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 (exit $ac_status); } && {
9629 test -z "$ac_c_werror_flag" ||
9630 test ! -s conftest.err
9631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 ac_hi=$ac_mid; break
9633else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009635sed 's/^/| /' conftest.$ac_ext >&5
9636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 ac_lo=`expr $ac_mid + 1`
9638 if test $ac_lo -le $ac_mid; then
9639 ac_lo= ac_hi=
9640 break
9641 fi
9642 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644
9645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 done
9647else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009649sed 's/^/| /' conftest.$ac_ext >&5
9650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* confdefs.h. */
9653_ACEOF
9654cat confdefs.h >>conftest.$ac_ext
9655cat >>conftest.$ac_ext <<_ACEOF
9656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009657$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009658 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009663test_array [0] = 0
9664
9665 ;
9666 return 0;
9667}
9668_ACEOF
9669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670if { (ac_try="$ac_compile"
9671case "(($ac_try" in
9672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9673 *) ac_try_echo=$ac_try;;
9674esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009678 grep -v '^ *+' conftest.er1 >conftest.err
9679 rm -f conftest.er1
9680 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682 (exit $ac_status); } && {
9683 test -z "$ac_c_werror_flag" ||
9684 test ! -s conftest.err
9685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ac_hi=-1 ac_mid=-1
9687 while :; do
9688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009689/* confdefs.h. */
9690_ACEOF
9691cat confdefs.h >>conftest.$ac_ext
9692cat >>conftest.$ac_ext <<_ACEOF
9693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009694$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009695 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009696int
9697main ()
9698{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009700test_array [0] = 0
9701
9702 ;
9703 return 0;
9704}
9705_ACEOF
9706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707if { (ac_try="$ac_compile"
9708case "(($ac_try" in
9709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9710 *) ac_try_echo=$ac_try;;
9711esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009715 grep -v '^ *+' conftest.er1 >conftest.err
9716 rm -f conftest.er1
9717 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719 (exit $ac_status); } && {
9720 test -z "$ac_c_werror_flag" ||
9721 test ! -s conftest.err
9722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 ac_lo=$ac_mid; break
9724else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009726sed 's/^/| /' conftest.$ac_ext >&5
9727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 ac_hi=`expr '(' $ac_mid ')' - 1`
9729 if test $ac_mid -le $ac_hi; then
9730 ac_lo= ac_hi=
9731 break
9732 fi
9733 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735
9736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 done
9738else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009740sed 's/^/| /' conftest.$ac_ext >&5
9741
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009742 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744
9745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747
9748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009749# Binary search between lo and hi bounds.
9750while test "x$ac_lo" != "x$ac_hi"; do
9751 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* confdefs.h. */
9754_ACEOF
9755cat confdefs.h >>conftest.$ac_ext
9756cat >>conftest.$ac_ext <<_ACEOF
9757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009758$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009759 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009760int
9761main ()
9762{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009764test_array [0] = 0
9765
9766 ;
9767 return 0;
9768}
9769_ACEOF
9770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771if { (ac_try="$ac_compile"
9772case "(($ac_try" in
9773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9774 *) ac_try_echo=$ac_try;;
9775esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009779 grep -v '^ *+' conftest.er1 >conftest.err
9780 rm -f conftest.er1
9781 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783 (exit $ac_status); } && {
9784 test -z "$ac_c_werror_flag" ||
9785 test ! -s conftest.err
9786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_hi=$ac_mid
9788else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009790sed 's/^/| /' conftest.$ac_ext >&5
9791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009796done
9797case $ac_lo in
9798?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009800 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009801See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009802echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009803See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009804 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805 else
9806 ac_cv_sizeof_double=0
9807 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009808esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009809else
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009811/* confdefs.h. */
9812_ACEOF
9813cat confdefs.h >>conftest.$ac_ext
9814cat >>conftest.$ac_ext <<_ACEOF
9815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009816$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009817 typedef double ac__type_sizeof_;
9818static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9819static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009820#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009821#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009822int
9823main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009824{
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
9826 FILE *f = fopen ("conftest.val", "w");
9827 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009829 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009832 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009834 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 }
9836 else
9837 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009839 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009840 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009841 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009844
9845 ;
9846 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009847}
Martin v. Löwis11437992002-04-12 09:54:03 +00009848_ACEOF
9849rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850if { (ac_try="$ac_link"
9851case "(($ac_try" in
9852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9853 *) ac_try_echo=$ac_try;;
9854esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009857 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 { (case "(($ac_try" in
9861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9862 *) ac_try_echo=$ac_try;;
9863esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009868 (exit $ac_status); }; }; then
9869 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009870else
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009871 echo "$as_me: program exited with status $ac_status" >&5
9872echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009873sed 's/^/| /' conftest.$ac_ext >&5
9874
Martin v. Löwis11437992002-04-12 09:54:03 +00009875( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009877 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009878See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009879echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009880See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009881 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 else
9883 ac_cv_sizeof_double=0
9884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886rm -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 +00009887fi
9888rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009889fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009890{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9891echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892
9893
9894
Martin v. Löwis11437992002-04-12 09:54:03 +00009895cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009896#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009897_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009898
9899
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009900{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9901echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9902if test "${ac_cv_type_fpos_t+set}" = set; then
9903 echo $ECHO_N "(cached) $ECHO_C" >&6
9904else
9905 cat >conftest.$ac_ext <<_ACEOF
9906/* confdefs.h. */
9907_ACEOF
9908cat confdefs.h >>conftest.$ac_ext
9909cat >>conftest.$ac_ext <<_ACEOF
9910/* end confdefs.h. */
9911$ac_includes_default
9912typedef fpos_t ac__type_new_;
9913int
9914main ()
9915{
9916if ((ac__type_new_ *) 0)
9917 return 0;
9918if (sizeof (ac__type_new_))
9919 return 0;
9920 ;
9921 return 0;
9922}
9923_ACEOF
9924rm -f conftest.$ac_objext
9925if { (ac_try="$ac_compile"
9926case "(($ac_try" in
9927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9928 *) ac_try_echo=$ac_try;;
9929esac
9930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9931 (eval "$ac_compile") 2>conftest.er1
9932 ac_status=$?
9933 grep -v '^ *+' conftest.er1 >conftest.err
9934 rm -f conftest.er1
9935 cat conftest.err >&5
9936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); } && {
9938 test -z "$ac_c_werror_flag" ||
9939 test ! -s conftest.err
9940 } && test -s conftest.$ac_objext; then
9941 ac_cv_type_fpos_t=yes
9942else
9943 echo "$as_me: failed program was:" >&5
9944sed 's/^/| /' conftest.$ac_ext >&5
9945
9946 ac_cv_type_fpos_t=no
9947fi
9948
9949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9950fi
9951{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9952echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954# The cast to long int works around a bug in the HP C Compiler
9955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9957# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009958{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9959echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009960if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009961 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009962else
Martin v. Löwis11437992002-04-12 09:54:03 +00009963 if test "$cross_compiling" = yes; then
9964 # Depending upon the size, compute the lo and hi bounds.
9965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009966/* confdefs.h. */
9967_ACEOF
9968cat confdefs.h >>conftest.$ac_ext
9969cat >>conftest.$ac_ext <<_ACEOF
9970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009971$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009972 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009973int
9974main ()
9975{
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009976static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009977test_array [0] = 0
9978
9979 ;
9980 return 0;
9981}
9982_ACEOF
9983rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984if { (ac_try="$ac_compile"
9985case "(($ac_try" in
9986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9987 *) ac_try_echo=$ac_try;;
9988esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009992 grep -v '^ *+' conftest.er1 >conftest.err
9993 rm -f conftest.er1
9994 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 (exit $ac_status); } && {
9997 test -z "$ac_c_werror_flag" ||
9998 test ! -s conftest.err
9999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 ac_lo=0 ac_mid=0
10001 while :; do
10002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010003/* confdefs.h. */
10004_ACEOF
10005cat confdefs.h >>conftest.$ac_ext
10006cat >>conftest.$ac_ext <<_ACEOF
10007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010008$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010009 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010010int
10011main ()
10012{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010013static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010014test_array [0] = 0
10015
10016 ;
10017 return 0;
10018}
10019_ACEOF
10020rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021if { (ac_try="$ac_compile"
10022case "(($ac_try" in
10023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10024 *) ac_try_echo=$ac_try;;
10025esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010029 grep -v '^ *+' conftest.er1 >conftest.err
10030 rm -f conftest.er1
10031 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033 (exit $ac_status); } && {
10034 test -z "$ac_c_werror_flag" ||
10035 test ! -s conftest.err
10036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 ac_hi=$ac_mid; break
10038else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010040sed 's/^/| /' conftest.$ac_ext >&5
10041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042 ac_lo=`expr $ac_mid + 1`
10043 if test $ac_lo -le $ac_mid; then
10044 ac_lo= ac_hi=
10045 break
10046 fi
10047 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049
10050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 done
10052else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010054sed 's/^/| /' conftest.$ac_ext >&5
10055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* confdefs.h. */
10058_ACEOF
10059cat confdefs.h >>conftest.$ac_ext
10060cat >>conftest.$ac_ext <<_ACEOF
10061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010062$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010063 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064int
10065main ()
10066{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010068test_array [0] = 0
10069
10070 ;
10071 return 0;
10072}
10073_ACEOF
10074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075if { (ac_try="$ac_compile"
10076case "(($ac_try" in
10077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10078 *) ac_try_echo=$ac_try;;
10079esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010083 grep -v '^ *+' conftest.er1 >conftest.err
10084 rm -f conftest.er1
10085 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087 (exit $ac_status); } && {
10088 test -z "$ac_c_werror_flag" ||
10089 test ! -s conftest.err
10090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 ac_hi=-1 ac_mid=-1
10092 while :; do
10093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010094/* confdefs.h. */
10095_ACEOF
10096cat confdefs.h >>conftest.$ac_ext
10097cat >>conftest.$ac_ext <<_ACEOF
10098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010099$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010100 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010101int
10102main ()
10103{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010105test_array [0] = 0
10106
10107 ;
10108 return 0;
10109}
10110_ACEOF
10111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112if { (ac_try="$ac_compile"
10113case "(($ac_try" in
10114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10115 *) ac_try_echo=$ac_try;;
10116esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010120 grep -v '^ *+' conftest.er1 >conftest.err
10121 rm -f conftest.er1
10122 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124 (exit $ac_status); } && {
10125 test -z "$ac_c_werror_flag" ||
10126 test ! -s conftest.err
10127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ac_lo=$ac_mid; break
10129else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010131sed 's/^/| /' conftest.$ac_ext >&5
10132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133 ac_hi=`expr '(' $ac_mid ')' - 1`
10134 if test $ac_mid -le $ac_hi; then
10135 ac_lo= ac_hi=
10136 break
10137 fi
10138 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140
10141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010142 done
10143else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010145sed 's/^/| /' conftest.$ac_ext >&5
10146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149
10150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010152
10153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010154# Binary search between lo and hi bounds.
10155while test "x$ac_lo" != "x$ac_hi"; do
10156 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10157 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010158/* confdefs.h. */
10159_ACEOF
10160cat confdefs.h >>conftest.$ac_ext
10161cat >>conftest.$ac_ext <<_ACEOF
10162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010163$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010164 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010165int
10166main ()
10167{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010168static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010169test_array [0] = 0
10170
10171 ;
10172 return 0;
10173}
10174_ACEOF
10175rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176if { (ac_try="$ac_compile"
10177case "(($ac_try" in
10178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10179 *) ac_try_echo=$ac_try;;
10180esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010184 grep -v '^ *+' conftest.er1 >conftest.err
10185 rm -f conftest.er1
10186 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188 (exit $ac_status); } && {
10189 test -z "$ac_c_werror_flag" ||
10190 test ! -s conftest.err
10191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 ac_hi=$ac_mid
10193else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010195sed 's/^/| /' conftest.$ac_ext >&5
10196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199
10200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010201done
10202case $ac_lo in
10203?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010205 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010206See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010207echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010208See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010209 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210 else
10211 ac_cv_sizeof_fpos_t=0
10212 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010213esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010214else
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* confdefs.h. */
10217_ACEOF
10218cat confdefs.h >>conftest.$ac_ext
10219cat >>conftest.$ac_ext <<_ACEOF
10220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010221$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010222 typedef fpos_t ac__type_sizeof_;
10223static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10224static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010225#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010226#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010227int
10228main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010229{
Martin v. Löwis11437992002-04-12 09:54:03 +000010230
10231 FILE *f = fopen ("conftest.val", "w");
10232 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010233 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010234 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010236 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010237 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010239 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 }
10241 else
10242 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010243 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010244 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010246 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010247 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010248 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
10250 ;
10251 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010252}
Martin v. Löwis11437992002-04-12 09:54:03 +000010253_ACEOF
10254rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255if { (ac_try="$ac_link"
10256case "(($ac_try" in
10257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10258 *) ac_try_echo=$ac_try;;
10259esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010264 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265 { (case "(($ac_try" in
10266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10267 *) ac_try_echo=$ac_try;;
10268esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010271 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 (exit $ac_status); }; }; then
10274 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010275else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010276 echo "$as_me: program exited with status $ac_status" >&5
10277echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010278sed 's/^/| /' conftest.$ac_ext >&5
10279
Martin v. Löwis11437992002-04-12 09:54:03 +000010280( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010281if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010282 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010283See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010284echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010285See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010286 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 else
10288 ac_cv_sizeof_fpos_t=0
10289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291rm -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 +000010292fi
10293rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010294fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010295{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10296echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297
10298
10299
Martin v. Löwis11437992002-04-12 09:54:03 +000010300cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010301#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010302_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010303
Michael W. Hudson54241132001-12-07 15:38:26 +000010304
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010305{ echo "$as_me:$LINENO: checking for size_t" >&5
10306echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10307if test "${ac_cv_type_size_t+set}" = set; then
10308 echo $ECHO_N "(cached) $ECHO_C" >&6
10309else
10310 cat >conftest.$ac_ext <<_ACEOF
10311/* confdefs.h. */
10312_ACEOF
10313cat confdefs.h >>conftest.$ac_ext
10314cat >>conftest.$ac_ext <<_ACEOF
10315/* end confdefs.h. */
10316$ac_includes_default
10317typedef size_t ac__type_new_;
10318int
10319main ()
10320{
10321if ((ac__type_new_ *) 0)
10322 return 0;
10323if (sizeof (ac__type_new_))
10324 return 0;
10325 ;
10326 return 0;
10327}
10328_ACEOF
10329rm -f conftest.$ac_objext
10330if { (ac_try="$ac_compile"
10331case "(($ac_try" in
10332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10333 *) ac_try_echo=$ac_try;;
10334esac
10335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10336 (eval "$ac_compile") 2>conftest.er1
10337 ac_status=$?
10338 grep -v '^ *+' conftest.er1 >conftest.err
10339 rm -f conftest.er1
10340 cat conftest.err >&5
10341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10342 (exit $ac_status); } && {
10343 test -z "$ac_c_werror_flag" ||
10344 test ! -s conftest.err
10345 } && test -s conftest.$ac_objext; then
10346 ac_cv_type_size_t=yes
10347else
10348 echo "$as_me: failed program was:" >&5
10349sed 's/^/| /' conftest.$ac_ext >&5
10350
10351 ac_cv_type_size_t=no
10352fi
10353
10354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10355fi
10356{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10357echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359# The cast to long int works around a bug in the HP C Compiler
10360# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10361# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10362# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010363{ echo "$as_me:$LINENO: checking size of size_t" >&5
10364echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010365if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010367else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010368 if test "$cross_compiling" = yes; then
10369 # Depending upon the size, compute the lo and hi bounds.
10370cat >conftest.$ac_ext <<_ACEOF
10371/* confdefs.h. */
10372_ACEOF
10373cat confdefs.h >>conftest.$ac_ext
10374cat >>conftest.$ac_ext <<_ACEOF
10375/* end confdefs.h. */
10376$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010377 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010378int
10379main ()
10380{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010381static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010382test_array [0] = 0
10383
10384 ;
10385 return 0;
10386}
10387_ACEOF
10388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389if { (ac_try="$ac_compile"
10390case "(($ac_try" in
10391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10392 *) ac_try_echo=$ac_try;;
10393esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010396 ac_status=$?
10397 grep -v '^ *+' conftest.er1 >conftest.err
10398 rm -f conftest.er1
10399 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401 (exit $ac_status); } && {
10402 test -z "$ac_c_werror_flag" ||
10403 test ! -s conftest.err
10404 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010405 ac_lo=0 ac_mid=0
10406 while :; do
10407 cat >conftest.$ac_ext <<_ACEOF
10408/* confdefs.h. */
10409_ACEOF
10410cat confdefs.h >>conftest.$ac_ext
10411cat >>conftest.$ac_ext <<_ACEOF
10412/* end confdefs.h. */
10413$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010414 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010415int
10416main ()
10417{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010419test_array [0] = 0
10420
10421 ;
10422 return 0;
10423}
10424_ACEOF
10425rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426if { (ac_try="$ac_compile"
10427case "(($ac_try" in
10428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10429 *) ac_try_echo=$ac_try;;
10430esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010433 ac_status=$?
10434 grep -v '^ *+' conftest.er1 >conftest.err
10435 rm -f conftest.er1
10436 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010438 (exit $ac_status); } && {
10439 test -z "$ac_c_werror_flag" ||
10440 test ! -s conftest.err
10441 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010442 ac_hi=$ac_mid; break
10443else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010444 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010445sed 's/^/| /' conftest.$ac_ext >&5
10446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447 ac_lo=`expr $ac_mid + 1`
10448 if test $ac_lo -le $ac_mid; then
10449 ac_lo= ac_hi=
10450 break
10451 fi
10452 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454
10455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010456 done
10457else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010458 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459sed 's/^/| /' conftest.$ac_ext >&5
10460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010461 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462/* confdefs.h. */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h. */
10467$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010468 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010469int
10470main ()
10471{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010473test_array [0] = 0
10474
10475 ;
10476 return 0;
10477}
10478_ACEOF
10479rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480if { (ac_try="$ac_compile"
10481case "(($ac_try" in
10482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10483 *) ac_try_echo=$ac_try;;
10484esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010487 ac_status=$?
10488 grep -v '^ *+' conftest.er1 >conftest.err
10489 rm -f conftest.er1
10490 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492 (exit $ac_status); } && {
10493 test -z "$ac_c_werror_flag" ||
10494 test ! -s conftest.err
10495 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496 ac_hi=-1 ac_mid=-1
10497 while :; do
10498 cat >conftest.$ac_ext <<_ACEOF
10499/* confdefs.h. */
10500_ACEOF
10501cat confdefs.h >>conftest.$ac_ext
10502cat >>conftest.$ac_ext <<_ACEOF
10503/* end confdefs.h. */
10504$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010505 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010506int
10507main ()
10508{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010510test_array [0] = 0
10511
10512 ;
10513 return 0;
10514}
10515_ACEOF
10516rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517if { (ac_try="$ac_compile"
10518case "(($ac_try" in
10519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10520 *) ac_try_echo=$ac_try;;
10521esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010524 ac_status=$?
10525 grep -v '^ *+' conftest.er1 >conftest.err
10526 rm -f conftest.er1
10527 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529 (exit $ac_status); } && {
10530 test -z "$ac_c_werror_flag" ||
10531 test ! -s conftest.err
10532 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533 ac_lo=$ac_mid; break
10534else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010535 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536sed 's/^/| /' conftest.$ac_ext >&5
10537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538 ac_hi=`expr '(' $ac_mid ')' - 1`
10539 if test $ac_mid -le $ac_hi; then
10540 ac_lo= ac_hi=
10541 break
10542 fi
10543 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545
10546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010547 done
10548else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010549 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550sed 's/^/| /' conftest.$ac_ext >&5
10551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010554
10555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557
10558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010559# Binary search between lo and hi bounds.
10560while test "x$ac_lo" != "x$ac_hi"; do
10561 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10562 cat >conftest.$ac_ext <<_ACEOF
10563/* confdefs.h. */
10564_ACEOF
10565cat confdefs.h >>conftest.$ac_ext
10566cat >>conftest.$ac_ext <<_ACEOF
10567/* end confdefs.h. */
10568$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010569 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010570int
10571main ()
10572{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010573static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010574test_array [0] = 0
10575
10576 ;
10577 return 0;
10578}
10579_ACEOF
10580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581if { (ac_try="$ac_compile"
10582case "(($ac_try" in
10583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10584 *) ac_try_echo=$ac_try;;
10585esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010588 ac_status=$?
10589 grep -v '^ *+' conftest.er1 >conftest.err
10590 rm -f conftest.er1
10591 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593 (exit $ac_status); } && {
10594 test -z "$ac_c_werror_flag" ||
10595 test ! -s conftest.err
10596 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010597 ac_hi=$ac_mid
10598else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010599 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010600sed 's/^/| /' conftest.$ac_ext >&5
10601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010602 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604
10605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010606done
10607case $ac_lo in
10608?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010610 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010611See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010612echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010614 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615 else
10616 ac_cv_sizeof_size_t=0
10617 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618esac
10619else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010620 cat >conftest.$ac_ext <<_ACEOF
10621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
10626$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010627 typedef size_t ac__type_sizeof_;
10628static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10629static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630#include <stdio.h>
10631#include <stdlib.h>
10632int
10633main ()
10634{
10635
10636 FILE *f = fopen ("conftest.val", "w");
10637 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010639 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010642 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010644 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 }
10646 else
10647 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010649 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010650 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010651 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010652 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654
10655 ;
10656 return 0;
10657}
10658_ACEOF
10659rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660if { (ac_try="$ac_link"
10661case "(($ac_try" in
10662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10663 *) ac_try_echo=$ac_try;;
10664esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670 { (case "(($ac_try" in
10671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10672 *) ac_try_echo=$ac_try;;
10673esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678 (exit $ac_status); }; }; then
10679 ac_cv_sizeof_size_t=`cat conftest.val`
10680else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010681 echo "$as_me: program exited with status $ac_status" >&5
10682echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683sed 's/^/| /' conftest.$ac_ext >&5
10684
10685( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010687 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010689echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010691 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010692 else
10693 ac_cv_sizeof_size_t=0
10694 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696rm -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 +000010697fi
10698rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010700{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10701echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702
10703
10704
Martin v. Löwis18e16552006-02-15 17:27:45 +000010705cat >>confdefs.h <<_ACEOF
10706#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10707_ACEOF
10708
10709
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010710{ echo "$as_me:$LINENO: checking for pid_t" >&5
10711echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10712if test "${ac_cv_type_pid_t+set}" = set; then
10713 echo $ECHO_N "(cached) $ECHO_C" >&6
10714else
10715 cat >conftest.$ac_ext <<_ACEOF
10716/* confdefs.h. */
10717_ACEOF
10718cat confdefs.h >>conftest.$ac_ext
10719cat >>conftest.$ac_ext <<_ACEOF
10720/* end confdefs.h. */
10721$ac_includes_default
10722typedef pid_t ac__type_new_;
10723int
10724main ()
10725{
10726if ((ac__type_new_ *) 0)
10727 return 0;
10728if (sizeof (ac__type_new_))
10729 return 0;
10730 ;
10731 return 0;
10732}
10733_ACEOF
10734rm -f conftest.$ac_objext
10735if { (ac_try="$ac_compile"
10736case "(($ac_try" in
10737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10738 *) ac_try_echo=$ac_try;;
10739esac
10740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10741 (eval "$ac_compile") 2>conftest.er1
10742 ac_status=$?
10743 grep -v '^ *+' conftest.er1 >conftest.err
10744 rm -f conftest.er1
10745 cat conftest.err >&5
10746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10747 (exit $ac_status); } && {
10748 test -z "$ac_c_werror_flag" ||
10749 test ! -s conftest.err
10750 } && test -s conftest.$ac_objext; then
10751 ac_cv_type_pid_t=yes
10752else
10753 echo "$as_me: failed program was:" >&5
10754sed 's/^/| /' conftest.$ac_ext >&5
10755
10756 ac_cv_type_pid_t=no
10757fi
10758
10759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10760fi
10761{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10762echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10763
Christian Heimes400adb02008-02-01 08:12:03 +000010764# The cast to long int works around a bug in the HP C Compiler
10765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10767# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010768{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10769echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010770if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010771 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010772else
10773 if test "$cross_compiling" = yes; then
10774 # Depending upon the size, compute the lo and hi bounds.
10775cat >conftest.$ac_ext <<_ACEOF
10776/* confdefs.h. */
10777_ACEOF
10778cat confdefs.h >>conftest.$ac_ext
10779cat >>conftest.$ac_ext <<_ACEOF
10780/* end confdefs.h. */
10781$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010782 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010783int
10784main ()
10785{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010787test_array [0] = 0
10788
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext
10794if { (ac_try="$ac_compile"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010800 (eval "$ac_compile") 2>conftest.er1
10801 ac_status=$?
10802 grep -v '^ *+' conftest.er1 >conftest.err
10803 rm -f conftest.er1
10804 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010806 (exit $ac_status); } && {
10807 test -z "$ac_c_werror_flag" ||
10808 test ! -s conftest.err
10809 } && test -s conftest.$ac_objext; then
10810 ac_lo=0 ac_mid=0
10811 while :; do
10812 cat >conftest.$ac_ext <<_ACEOF
10813/* confdefs.h. */
10814_ACEOF
10815cat confdefs.h >>conftest.$ac_ext
10816cat >>conftest.$ac_ext <<_ACEOF
10817/* end confdefs.h. */
10818$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010819 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010820int
10821main ()
10822{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010823static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010824test_array [0] = 0
10825
10826 ;
10827 return 0;
10828}
10829_ACEOF
10830rm -f conftest.$ac_objext
10831if { (ac_try="$ac_compile"
10832case "(($ac_try" in
10833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10834 *) ac_try_echo=$ac_try;;
10835esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010837 (eval "$ac_compile") 2>conftest.er1
10838 ac_status=$?
10839 grep -v '^ *+' conftest.er1 >conftest.err
10840 rm -f conftest.er1
10841 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010843 (exit $ac_status); } && {
10844 test -z "$ac_c_werror_flag" ||
10845 test ! -s conftest.err
10846 } && test -s conftest.$ac_objext; then
10847 ac_hi=$ac_mid; break
10848else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010849 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010850sed 's/^/| /' conftest.$ac_ext >&5
10851
10852 ac_lo=`expr $ac_mid + 1`
10853 if test $ac_lo -le $ac_mid; then
10854 ac_lo= ac_hi=
10855 break
10856 fi
10857 ac_mid=`expr 2 '*' $ac_mid + 1`
10858fi
10859
10860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10861 done
10862else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010863 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010864sed 's/^/| /' conftest.$ac_ext >&5
10865
10866 cat >conftest.$ac_ext <<_ACEOF
10867/* confdefs.h. */
10868_ACEOF
10869cat confdefs.h >>conftest.$ac_ext
10870cat >>conftest.$ac_ext <<_ACEOF
10871/* end confdefs.h. */
10872$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010873 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010874int
10875main ()
10876{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010878test_array [0] = 0
10879
10880 ;
10881 return 0;
10882}
10883_ACEOF
10884rm -f conftest.$ac_objext
10885if { (ac_try="$ac_compile"
10886case "(($ac_try" in
10887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10888 *) ac_try_echo=$ac_try;;
10889esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010891 (eval "$ac_compile") 2>conftest.er1
10892 ac_status=$?
10893 grep -v '^ *+' conftest.er1 >conftest.err
10894 rm -f conftest.er1
10895 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010897 (exit $ac_status); } && {
10898 test -z "$ac_c_werror_flag" ||
10899 test ! -s conftest.err
10900 } && test -s conftest.$ac_objext; then
10901 ac_hi=-1 ac_mid=-1
10902 while :; do
10903 cat >conftest.$ac_ext <<_ACEOF
10904/* confdefs.h. */
10905_ACEOF
10906cat confdefs.h >>conftest.$ac_ext
10907cat >>conftest.$ac_ext <<_ACEOF
10908/* end confdefs.h. */
10909$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010910 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010911int
10912main ()
10913{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010915test_array [0] = 0
10916
10917 ;
10918 return 0;
10919}
10920_ACEOF
10921rm -f conftest.$ac_objext
10922if { (ac_try="$ac_compile"
10923case "(($ac_try" in
10924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10925 *) ac_try_echo=$ac_try;;
10926esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010928 (eval "$ac_compile") 2>conftest.er1
10929 ac_status=$?
10930 grep -v '^ *+' conftest.er1 >conftest.err
10931 rm -f conftest.er1
10932 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010934 (exit $ac_status); } && {
10935 test -z "$ac_c_werror_flag" ||
10936 test ! -s conftest.err
10937 } && test -s conftest.$ac_objext; then
10938 ac_lo=$ac_mid; break
10939else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010940 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010941sed 's/^/| /' conftest.$ac_ext >&5
10942
10943 ac_hi=`expr '(' $ac_mid ')' - 1`
10944 if test $ac_mid -le $ac_hi; then
10945 ac_lo= ac_hi=
10946 break
10947 fi
10948 ac_mid=`expr 2 '*' $ac_mid`
10949fi
10950
10951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10952 done
10953else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010954 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010955sed 's/^/| /' conftest.$ac_ext >&5
10956
10957 ac_lo= ac_hi=
10958fi
10959
10960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10961fi
10962
10963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10964# Binary search between lo and hi bounds.
10965while test "x$ac_lo" != "x$ac_hi"; do
10966 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10967 cat >conftest.$ac_ext <<_ACEOF
10968/* confdefs.h. */
10969_ACEOF
10970cat confdefs.h >>conftest.$ac_ext
10971cat >>conftest.$ac_ext <<_ACEOF
10972/* end confdefs.h. */
10973$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010974 typedef pid_t ac__type_sizeof_;
Christian Heimes400adb02008-02-01 08:12:03 +000010975int
10976main ()
10977{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010978static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010979test_array [0] = 0
10980
10981 ;
10982 return 0;
10983}
10984_ACEOF
10985rm -f conftest.$ac_objext
10986if { (ac_try="$ac_compile"
10987case "(($ac_try" in
10988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10989 *) ac_try_echo=$ac_try;;
10990esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010992 (eval "$ac_compile") 2>conftest.er1
10993 ac_status=$?
10994 grep -v '^ *+' conftest.er1 >conftest.err
10995 rm -f conftest.er1
10996 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010998 (exit $ac_status); } && {
10999 test -z "$ac_c_werror_flag" ||
11000 test ! -s conftest.err
11001 } && test -s conftest.$ac_objext; then
11002 ac_hi=$ac_mid
11003else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011004 echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011005sed 's/^/| /' conftest.$ac_ext >&5
11006
11007 ac_lo=`expr '(' $ac_mid ')' + 1`
11008fi
11009
11010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011done
11012case $ac_lo in
11013?*) ac_cv_sizeof_pid_t=$ac_lo;;
11014'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011015 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011016See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011017echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011018See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011019 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011020 else
11021 ac_cv_sizeof_pid_t=0
11022 fi ;;
11023esac
11024else
11025 cat >conftest.$ac_ext <<_ACEOF
11026/* confdefs.h. */
11027_ACEOF
11028cat confdefs.h >>conftest.$ac_ext
11029cat >>conftest.$ac_ext <<_ACEOF
11030/* end confdefs.h. */
11031$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011032 typedef pid_t ac__type_sizeof_;
11033static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11034static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011035#include <stdio.h>
11036#include <stdlib.h>
11037int
11038main ()
11039{
11040
11041 FILE *f = fopen ("conftest.val", "w");
11042 if (! f)
11043 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011044 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011045 {
11046 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011047 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011048 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011049 fprintf (f, "%ld\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011050 }
11051 else
11052 {
11053 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011054 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes400adb02008-02-01 08:12:03 +000011055 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011056 fprintf (f, "%lu\n", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011057 }
11058 return ferror (f) || fclose (f) != 0;
11059
11060 ;
11061 return 0;
11062}
11063_ACEOF
11064rm -f conftest$ac_exeext
11065if { (ac_try="$ac_link"
11066case "(($ac_try" in
11067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11068 *) ac_try_echo=$ac_try;;
11069esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011071 (eval "$ac_link") 2>&5
11072 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011074 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11075 { (case "(($ac_try" in
11076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11077 *) ac_try_echo=$ac_try;;
11078esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011080 (eval "$ac_try") 2>&5
11081 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011083 (exit $ac_status); }; }; then
11084 ac_cv_sizeof_pid_t=`cat conftest.val`
11085else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011086 echo "$as_me: program exited with status $ac_status" >&5
11087echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011088sed 's/^/| /' conftest.$ac_ext >&5
11089
11090( exit $ac_status )
11091if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011092 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011093See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011094echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011095See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011096 { (exit 77); exit 77; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011097 else
11098 ac_cv_sizeof_pid_t=0
11099 fi
11100fi
11101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11102fi
11103rm -f conftest.val
11104fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011105{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11106echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011107
11108
11109
11110cat >>confdefs.h <<_ACEOF
11111#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11112_ACEOF
11113
11114
Michael W. Hudson54241132001-12-07 15:38:26 +000011115
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011116{ echo "$as_me:$LINENO: checking for long long support" >&5
11117echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011118have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011119cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* confdefs.h. */
11121_ACEOF
11122cat confdefs.h >>conftest.$ac_ext
11123cat >>conftest.$ac_ext <<_ACEOF
11124/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126int
11127main ()
11128{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011129long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 ;
11131 return 0;
11132}
11133_ACEOF
11134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135if { (ac_try="$ac_compile"
11136case "(($ac_try" in
11137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11138 *) ac_try_echo=$ac_try;;
11139esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011143 grep -v '^ *+' conftest.er1 >conftest.err
11144 rm -f conftest.er1
11145 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147 (exit $ac_status); } && {
11148 test -z "$ac_c_werror_flag" ||
11149 test ! -s conftest.err
11150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011151
11152
11153cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011154#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011155_ACEOF
11156
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011157 have_long_long=yes
11158
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011159else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011161sed 's/^/| /' conftest.$ac_ext >&5
11162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165
11166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011167{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11168echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011169if test "$have_long_long" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011170{ echo "$as_me:$LINENO: checking for long long" >&5
11171echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11172if test "${ac_cv_type_long_long+set}" = set; then
11173 echo $ECHO_N "(cached) $ECHO_C" >&6
11174else
11175 cat >conftest.$ac_ext <<_ACEOF
11176/* confdefs.h. */
11177_ACEOF
11178cat confdefs.h >>conftest.$ac_ext
11179cat >>conftest.$ac_ext <<_ACEOF
11180/* end confdefs.h. */
11181$ac_includes_default
11182typedef long long ac__type_new_;
11183int
11184main ()
11185{
11186if ((ac__type_new_ *) 0)
11187 return 0;
11188if (sizeof (ac__type_new_))
11189 return 0;
11190 ;
11191 return 0;
11192}
11193_ACEOF
11194rm -f conftest.$ac_objext
11195if { (ac_try="$ac_compile"
11196case "(($ac_try" in
11197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11198 *) ac_try_echo=$ac_try;;
11199esac
11200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11201 (eval "$ac_compile") 2>conftest.er1
11202 ac_status=$?
11203 grep -v '^ *+' conftest.er1 >conftest.err
11204 rm -f conftest.er1
11205 cat conftest.err >&5
11206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11207 (exit $ac_status); } && {
11208 test -z "$ac_c_werror_flag" ||
11209 test ! -s conftest.err
11210 } && test -s conftest.$ac_objext; then
11211 ac_cv_type_long_long=yes
11212else
11213 echo "$as_me: failed program was:" >&5
11214sed 's/^/| /' conftest.$ac_ext >&5
11215
11216 ac_cv_type_long_long=no
11217fi
11218
11219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11220fi
11221{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11222echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224# The cast to long int works around a bug in the HP C Compiler
11225# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11226# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11227# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011228{ echo "$as_me:$LINENO: checking size of long long" >&5
11229echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011230if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011231 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011232else
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 if test "$cross_compiling" = yes; then
11234 # Depending upon the size, compute the lo and hi bounds.
11235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* confdefs.h. */
11237_ACEOF
11238cat confdefs.h >>conftest.$ac_ext
11239cat >>conftest.$ac_ext <<_ACEOF
11240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011241$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011242 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011243int
11244main ()
11245{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011246static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011247test_array [0] = 0
11248
11249 ;
11250 return 0;
11251}
11252_ACEOF
11253rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254if { (ac_try="$ac_compile"
11255case "(($ac_try" in
11256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11257 *) ac_try_echo=$ac_try;;
11258esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011262 grep -v '^ *+' conftest.er1 >conftest.err
11263 rm -f conftest.er1
11264 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266 (exit $ac_status); } && {
11267 test -z "$ac_c_werror_flag" ||
11268 test ! -s conftest.err
11269 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 ac_lo=0 ac_mid=0
11271 while :; do
11272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* confdefs.h. */
11274_ACEOF
11275cat confdefs.h >>conftest.$ac_ext
11276cat >>conftest.$ac_ext <<_ACEOF
11277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011278$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011279 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011280int
11281main ()
11282{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011283static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011284test_array [0] = 0
11285
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291if { (ac_try="$ac_compile"
11292case "(($ac_try" in
11293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11294 *) ac_try_echo=$ac_try;;
11295esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011299 grep -v '^ *+' conftest.er1 >conftest.err
11300 rm -f conftest.er1
11301 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303 (exit $ac_status); } && {
11304 test -z "$ac_c_werror_flag" ||
11305 test ! -s conftest.err
11306 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 ac_hi=$ac_mid; break
11308else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011310sed 's/^/| /' conftest.$ac_ext >&5
11311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011312 ac_lo=`expr $ac_mid + 1`
11313 if test $ac_lo -le $ac_mid; then
11314 ac_lo= ac_hi=
11315 break
11316 fi
11317 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319
11320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 done
11322else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011324sed 's/^/| /' conftest.$ac_ext >&5
11325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* confdefs.h. */
11328_ACEOF
11329cat confdefs.h >>conftest.$ac_ext
11330cat >>conftest.$ac_ext <<_ACEOF
11331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011332$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011333 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011338test_array [0] = 0
11339
11340 ;
11341 return 0;
11342}
11343_ACEOF
11344rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345if { (ac_try="$ac_compile"
11346case "(($ac_try" in
11347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11348 *) ac_try_echo=$ac_try;;
11349esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011353 grep -v '^ *+' conftest.er1 >conftest.err
11354 rm -f conftest.er1
11355 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357 (exit $ac_status); } && {
11358 test -z "$ac_c_werror_flag" ||
11359 test ! -s conftest.err
11360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_hi=-1 ac_mid=-1
11362 while :; do
11363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* confdefs.h. */
11365_ACEOF
11366cat confdefs.h >>conftest.$ac_ext
11367cat >>conftest.$ac_ext <<_ACEOF
11368/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011369$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011370 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011374static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011375test_array [0] = 0
11376
11377 ;
11378 return 0;
11379}
11380_ACEOF
11381rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382if { (ac_try="$ac_compile"
11383case "(($ac_try" in
11384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11385 *) ac_try_echo=$ac_try;;
11386esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011390 grep -v '^ *+' conftest.er1 >conftest.err
11391 rm -f conftest.er1
11392 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394 (exit $ac_status); } && {
11395 test -z "$ac_c_werror_flag" ||
11396 test ! -s conftest.err
11397 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 ac_lo=$ac_mid; break
11399else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011400 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011401sed 's/^/| /' conftest.$ac_ext >&5
11402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403 ac_hi=`expr '(' $ac_mid ')' - 1`
11404 if test $ac_mid -le $ac_hi; then
11405 ac_lo= ac_hi=
11406 break
11407 fi
11408 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410
11411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 done
11413else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011415sed 's/^/| /' conftest.$ac_ext >&5
11416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011417 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419
11420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422
11423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011424# Binary search between lo and hi bounds.
11425while test "x$ac_lo" != "x$ac_hi"; do
11426 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011428/* confdefs.h. */
11429_ACEOF
11430cat confdefs.h >>conftest.$ac_ext
11431cat >>conftest.$ac_ext <<_ACEOF
11432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011433$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011434 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011435int
11436main ()
11437{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011438static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011439test_array [0] = 0
11440
11441 ;
11442 return 0;
11443}
11444_ACEOF
11445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011446if { (ac_try="$ac_compile"
11447case "(($ac_try" in
11448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11449 *) ac_try_echo=$ac_try;;
11450esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011454 grep -v '^ *+' conftest.er1 >conftest.err
11455 rm -f conftest.er1
11456 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011458 (exit $ac_status); } && {
11459 test -z "$ac_c_werror_flag" ||
11460 test ! -s conftest.err
11461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ac_hi=$ac_mid
11463else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011465sed 's/^/| /' conftest.$ac_ext >&5
11466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011469
11470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011471done
11472case $ac_lo in
11473?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011474'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011475 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011476See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011477echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011478See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011479 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011480 else
11481 ac_cv_sizeof_long_long=0
11482 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011483esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011484else
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* confdefs.h. */
11487_ACEOF
11488cat confdefs.h >>conftest.$ac_ext
11489cat >>conftest.$ac_ext <<_ACEOF
11490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011491$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011492 typedef long long ac__type_sizeof_;
11493static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11494static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011495#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011496#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011497int
11498main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011499{
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
11501 FILE *f = fopen ("conftest.val", "w");
11502 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011504 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011506 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011507 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011509 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 }
11511 else
11512 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011514 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011516 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011519
11520 ;
11521 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011522}
Martin v. Löwis11437992002-04-12 09:54:03 +000011523_ACEOF
11524rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525if { (ac_try="$ac_link"
11526case "(($ac_try" in
11527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11528 *) ac_try_echo=$ac_try;;
11529esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011532 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535 { (case "(($ac_try" in
11536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11537 *) ac_try_echo=$ac_try;;
11538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 (exit $ac_status); }; }; then
11544 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011545else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011546 echo "$as_me: program exited with status $ac_status" >&5
11547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011548sed 's/^/| /' conftest.$ac_ext >&5
11549
Martin v. Löwis11437992002-04-12 09:54:03 +000011550( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011552 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011553See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011554echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011555See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011556 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557 else
11558 ac_cv_sizeof_long_long=0
11559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011561rm -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 +000011562fi
11563rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011564fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011565{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11566echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567
11568
11569
Martin v. Löwis11437992002-04-12 09:54:03 +000011570cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011571#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011572_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011573
Michael W. Hudson54241132001-12-07 15:38:26 +000011574
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011575fi
11576
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011577{ echo "$as_me:$LINENO: checking for long double support" >&5
11578echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011579have_long_double=no
11580cat >conftest.$ac_ext <<_ACEOF
11581/* confdefs.h. */
11582_ACEOF
11583cat confdefs.h >>conftest.$ac_ext
11584cat >>conftest.$ac_ext <<_ACEOF
11585/* end confdefs.h. */
11586
11587int
11588main ()
11589{
11590long double x; x = (long double)0;
11591 ;
11592 return 0;
11593}
11594_ACEOF
11595rm -f conftest.$ac_objext
11596if { (ac_try="$ac_compile"
11597case "(($ac_try" in
11598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11599 *) ac_try_echo=$ac_try;;
11600esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011602 (eval "$ac_compile") 2>conftest.er1
11603 ac_status=$?
11604 grep -v '^ *+' conftest.er1 >conftest.err
11605 rm -f conftest.er1
11606 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011608 (exit $ac_status); } && {
11609 test -z "$ac_c_werror_flag" ||
11610 test ! -s conftest.err
11611 } && test -s conftest.$ac_objext; then
11612
11613
11614cat >>confdefs.h <<\_ACEOF
11615#define HAVE_LONG_DOUBLE 1
11616_ACEOF
11617
11618 have_long_double=yes
11619
11620else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011621 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011622sed 's/^/| /' conftest.$ac_ext >&5
11623
11624
11625fi
11626
11627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011628{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11629echo "${ECHO_T}$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011630if test "$have_long_double" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011631{ echo "$as_me:$LINENO: checking for long double" >&5
11632echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11633if test "${ac_cv_type_long_double+set}" = set; then
11634 echo $ECHO_N "(cached) $ECHO_C" >&6
11635else
11636 cat >conftest.$ac_ext <<_ACEOF
11637/* confdefs.h. */
11638_ACEOF
11639cat confdefs.h >>conftest.$ac_ext
11640cat >>conftest.$ac_ext <<_ACEOF
11641/* end confdefs.h. */
11642$ac_includes_default
11643typedef long double ac__type_new_;
11644int
11645main ()
11646{
11647if ((ac__type_new_ *) 0)
11648 return 0;
11649if (sizeof (ac__type_new_))
11650 return 0;
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655rm -f conftest.$ac_objext
11656if { (ac_try="$ac_compile"
11657case "(($ac_try" in
11658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11659 *) ac_try_echo=$ac_try;;
11660esac
11661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11662 (eval "$ac_compile") 2>conftest.er1
11663 ac_status=$?
11664 grep -v '^ *+' conftest.er1 >conftest.err
11665 rm -f conftest.er1
11666 cat conftest.err >&5
11667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11668 (exit $ac_status); } && {
11669 test -z "$ac_c_werror_flag" ||
11670 test ! -s conftest.err
11671 } && test -s conftest.$ac_objext; then
11672 ac_cv_type_long_double=yes
11673else
11674 echo "$as_me: failed program was:" >&5
11675sed 's/^/| /' conftest.$ac_ext >&5
11676
11677 ac_cv_type_long_double=no
11678fi
11679
11680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11681fi
11682{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11683echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11684
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685# The cast to long int works around a bug in the HP C Compiler
11686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11688# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011689{ echo "$as_me:$LINENO: checking size of long double" >&5
11690echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011691if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011692 echo $ECHO_N "(cached) $ECHO_C" >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011693else
11694 if test "$cross_compiling" = yes; then
11695 # Depending upon the size, compute the lo and hi bounds.
11696cat >conftest.$ac_ext <<_ACEOF
11697/* confdefs.h. */
11698_ACEOF
11699cat confdefs.h >>conftest.$ac_ext
11700cat >>conftest.$ac_ext <<_ACEOF
11701/* end confdefs.h. */
11702$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011703 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011704int
11705main ()
11706{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011707static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011708test_array [0] = 0
11709
11710 ;
11711 return 0;
11712}
11713_ACEOF
11714rm -f conftest.$ac_objext
11715if { (ac_try="$ac_compile"
11716case "(($ac_try" in
11717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11718 *) ac_try_echo=$ac_try;;
11719esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011721 (eval "$ac_compile") 2>conftest.er1
11722 ac_status=$?
11723 grep -v '^ *+' conftest.er1 >conftest.err
11724 rm -f conftest.er1
11725 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011727 (exit $ac_status); } && {
11728 test -z "$ac_c_werror_flag" ||
11729 test ! -s conftest.err
11730 } && test -s conftest.$ac_objext; then
11731 ac_lo=0 ac_mid=0
11732 while :; do
11733 cat >conftest.$ac_ext <<_ACEOF
11734/* confdefs.h. */
11735_ACEOF
11736cat confdefs.h >>conftest.$ac_ext
11737cat >>conftest.$ac_ext <<_ACEOF
11738/* end confdefs.h. */
11739$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011740 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011741int
11742main ()
11743{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011745test_array [0] = 0
11746
11747 ;
11748 return 0;
11749}
11750_ACEOF
11751rm -f conftest.$ac_objext
11752if { (ac_try="$ac_compile"
11753case "(($ac_try" in
11754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11755 *) ac_try_echo=$ac_try;;
11756esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011758 (eval "$ac_compile") 2>conftest.er1
11759 ac_status=$?
11760 grep -v '^ *+' conftest.er1 >conftest.err
11761 rm -f conftest.er1
11762 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011764 (exit $ac_status); } && {
11765 test -z "$ac_c_werror_flag" ||
11766 test ! -s conftest.err
11767 } && test -s conftest.$ac_objext; then
11768 ac_hi=$ac_mid; break
11769else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011770 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011771sed 's/^/| /' conftest.$ac_ext >&5
11772
11773 ac_lo=`expr $ac_mid + 1`
11774 if test $ac_lo -le $ac_mid; then
11775 ac_lo= ac_hi=
11776 break
11777 fi
11778 ac_mid=`expr 2 '*' $ac_mid + 1`
11779fi
11780
11781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11782 done
11783else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011784 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011785sed 's/^/| /' conftest.$ac_ext >&5
11786
11787 cat >conftest.$ac_ext <<_ACEOF
11788/* confdefs.h. */
11789_ACEOF
11790cat confdefs.h >>conftest.$ac_ext
11791cat >>conftest.$ac_ext <<_ACEOF
11792/* end confdefs.h. */
11793$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011794 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011795int
11796main ()
11797{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011798static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011799test_array [0] = 0
11800
11801 ;
11802 return 0;
11803}
11804_ACEOF
11805rm -f conftest.$ac_objext
11806if { (ac_try="$ac_compile"
11807case "(($ac_try" in
11808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11809 *) ac_try_echo=$ac_try;;
11810esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011812 (eval "$ac_compile") 2>conftest.er1
11813 ac_status=$?
11814 grep -v '^ *+' conftest.er1 >conftest.err
11815 rm -f conftest.er1
11816 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818 (exit $ac_status); } && {
11819 test -z "$ac_c_werror_flag" ||
11820 test ! -s conftest.err
11821 } && test -s conftest.$ac_objext; then
11822 ac_hi=-1 ac_mid=-1
11823 while :; do
11824 cat >conftest.$ac_ext <<_ACEOF
11825/* confdefs.h. */
11826_ACEOF
11827cat confdefs.h >>conftest.$ac_ext
11828cat >>conftest.$ac_ext <<_ACEOF
11829/* end confdefs.h. */
11830$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011831 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011832int
11833main ()
11834{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011835static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011836test_array [0] = 0
11837
11838 ;
11839 return 0;
11840}
11841_ACEOF
11842rm -f conftest.$ac_objext
11843if { (ac_try="$ac_compile"
11844case "(($ac_try" in
11845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11846 *) ac_try_echo=$ac_try;;
11847esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011849 (eval "$ac_compile") 2>conftest.er1
11850 ac_status=$?
11851 grep -v '^ *+' conftest.er1 >conftest.err
11852 rm -f conftest.er1
11853 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011855 (exit $ac_status); } && {
11856 test -z "$ac_c_werror_flag" ||
11857 test ! -s conftest.err
11858 } && test -s conftest.$ac_objext; then
11859 ac_lo=$ac_mid; break
11860else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011861 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011862sed 's/^/| /' conftest.$ac_ext >&5
11863
11864 ac_hi=`expr '(' $ac_mid ')' - 1`
11865 if test $ac_mid -le $ac_hi; then
11866 ac_lo= ac_hi=
11867 break
11868 fi
11869 ac_mid=`expr 2 '*' $ac_mid`
11870fi
11871
11872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11873 done
11874else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011875 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011876sed 's/^/| /' conftest.$ac_ext >&5
11877
11878 ac_lo= ac_hi=
11879fi
11880
11881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11882fi
11883
11884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11885# Binary search between lo and hi bounds.
11886while test "x$ac_lo" != "x$ac_hi"; do
11887 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11888 cat >conftest.$ac_ext <<_ACEOF
11889/* confdefs.h. */
11890_ACEOF
11891cat confdefs.h >>conftest.$ac_ext
11892cat >>conftest.$ac_ext <<_ACEOF
11893/* end confdefs.h. */
11894$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011895 typedef long double ac__type_sizeof_;
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011896int
11897main ()
11898{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011899static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011900test_array [0] = 0
11901
11902 ;
11903 return 0;
11904}
11905_ACEOF
11906rm -f conftest.$ac_objext
11907if { (ac_try="$ac_compile"
11908case "(($ac_try" in
11909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11910 *) ac_try_echo=$ac_try;;
11911esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913 (eval "$ac_compile") 2>conftest.er1
11914 ac_status=$?
11915 grep -v '^ *+' conftest.er1 >conftest.err
11916 rm -f conftest.er1
11917 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011919 (exit $ac_status); } && {
11920 test -z "$ac_c_werror_flag" ||
11921 test ! -s conftest.err
11922 } && test -s conftest.$ac_objext; then
11923 ac_hi=$ac_mid
11924else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011925 echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011926sed 's/^/| /' conftest.$ac_ext >&5
11927
11928 ac_lo=`expr '(' $ac_mid ')' + 1`
11929fi
11930
11931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11932done
11933case $ac_lo in
11934?*) ac_cv_sizeof_long_double=$ac_lo;;
11935'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011936 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011937See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011938echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011939See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011940 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011941 else
11942 ac_cv_sizeof_long_double=0
11943 fi ;;
11944esac
11945else
11946 cat >conftest.$ac_ext <<_ACEOF
11947/* confdefs.h. */
11948_ACEOF
11949cat confdefs.h >>conftest.$ac_ext
11950cat >>conftest.$ac_ext <<_ACEOF
11951/* end confdefs.h. */
11952$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011953 typedef long double ac__type_sizeof_;
11954static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11955static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956#include <stdio.h>
11957#include <stdlib.h>
11958int
11959main ()
11960{
11961
11962 FILE *f = fopen ("conftest.val", "w");
11963 if (! f)
11964 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011965 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966 {
11967 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011968 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011969 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011970 fprintf (f, "%ld\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011971 }
11972 else
11973 {
11974 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011975 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011976 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011977 fprintf (f, "%lu\n", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011978 }
11979 return ferror (f) || fclose (f) != 0;
11980
11981 ;
11982 return 0;
11983}
11984_ACEOF
11985rm -f conftest$ac_exeext
11986if { (ac_try="$ac_link"
11987case "(($ac_try" in
11988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11989 *) ac_try_echo=$ac_try;;
11990esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011992 (eval "$ac_link") 2>&5
11993 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11996 { (case "(($ac_try" in
11997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11998 *) ac_try_echo=$ac_try;;
11999esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012001 (eval "$ac_try") 2>&5
12002 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004 (exit $ac_status); }; }; then
12005 ac_cv_sizeof_long_double=`cat conftest.val`
12006else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012007 echo "$as_me: program exited with status $ac_status" >&5
12008echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012009sed 's/^/| /' conftest.$ac_ext >&5
12010
12011( exit $ac_status )
12012if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012013 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012014See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012015echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012017 { (exit 77); exit 77; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012018 else
12019 ac_cv_sizeof_long_double=0
12020 fi
12021fi
12022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12023fi
12024rm -f conftest.val
12025fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12027echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012028
12029
12030
12031cat >>confdefs.h <<_ACEOF
12032#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12033_ACEOF
12034
12035
12036fi
12037
12038
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012039{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12040echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012041have_c99_bool=no
12042cat >conftest.$ac_ext <<_ACEOF
12043/* confdefs.h. */
12044_ACEOF
12045cat confdefs.h >>conftest.$ac_ext
12046cat >>conftest.$ac_ext <<_ACEOF
12047/* end confdefs.h. */
12048
12049int
12050main ()
12051{
12052_Bool x; x = (_Bool)0;
12053 ;
12054 return 0;
12055}
12056_ACEOF
12057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058if { (ac_try="$ac_compile"
12059case "(($ac_try" in
12060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12061 *) ac_try_echo=$ac_try;;
12062esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012065 ac_status=$?
12066 grep -v '^ *+' conftest.er1 >conftest.err
12067 rm -f conftest.er1
12068 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070 (exit $ac_status); } && {
12071 test -z "$ac_c_werror_flag" ||
12072 test ! -s conftest.err
12073 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012074
12075
12076cat >>confdefs.h <<\_ACEOF
12077#define HAVE_C99_BOOL 1
12078_ACEOF
12079
12080 have_c99_bool=yes
12081
12082else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012083 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012084sed 's/^/| /' conftest.$ac_ext >&5
12085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086
Thomas Woutersb2137042007-02-01 18:02:27 +000012087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012088
12089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012090{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12091echo "${ECHO_T}$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012092if test "$have_c99_bool" = yes ; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012093{ echo "$as_me:$LINENO: checking for _Bool" >&5
12094echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12095if test "${ac_cv_type__Bool+set}" = set; then
12096 echo $ECHO_N "(cached) $ECHO_C" >&6
12097else
12098 cat >conftest.$ac_ext <<_ACEOF
12099/* confdefs.h. */
12100_ACEOF
12101cat confdefs.h >>conftest.$ac_ext
12102cat >>conftest.$ac_ext <<_ACEOF
12103/* end confdefs.h. */
12104$ac_includes_default
12105typedef _Bool ac__type_new_;
12106int
12107main ()
12108{
12109if ((ac__type_new_ *) 0)
12110 return 0;
12111if (sizeof (ac__type_new_))
12112 return 0;
12113 ;
12114 return 0;
12115}
12116_ACEOF
12117rm -f conftest.$ac_objext
12118if { (ac_try="$ac_compile"
12119case "(($ac_try" in
12120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12121 *) ac_try_echo=$ac_try;;
12122esac
12123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12124 (eval "$ac_compile") 2>conftest.er1
12125 ac_status=$?
12126 grep -v '^ *+' conftest.er1 >conftest.err
12127 rm -f conftest.er1
12128 cat conftest.err >&5
12129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12130 (exit $ac_status); } && {
12131 test -z "$ac_c_werror_flag" ||
12132 test ! -s conftest.err
12133 } && test -s conftest.$ac_objext; then
12134 ac_cv_type__Bool=yes
12135else
12136 echo "$as_me: failed program was:" >&5
12137sed 's/^/| /' conftest.$ac_ext >&5
12138
12139 ac_cv_type__Bool=no
12140fi
12141
12142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12143fi
12144{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12145echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012147# The cast to long int works around a bug in the HP C Compiler
12148# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12149# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12150# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012151{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12152echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012153if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012154 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012155else
12156 if test "$cross_compiling" = yes; then
12157 # Depending upon the size, compute the lo and hi bounds.
12158cat >conftest.$ac_ext <<_ACEOF
12159/* confdefs.h. */
12160_ACEOF
12161cat confdefs.h >>conftest.$ac_ext
12162cat >>conftest.$ac_ext <<_ACEOF
12163/* end confdefs.h. */
12164$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012165 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012166int
12167main ()
12168{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012169static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012170test_array [0] = 0
12171
12172 ;
12173 return 0;
12174}
12175_ACEOF
12176rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177if { (ac_try="$ac_compile"
12178case "(($ac_try" in
12179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12180 *) ac_try_echo=$ac_try;;
12181esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012184 ac_status=$?
12185 grep -v '^ *+' conftest.er1 >conftest.err
12186 rm -f conftest.er1
12187 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189 (exit $ac_status); } && {
12190 test -z "$ac_c_werror_flag" ||
12191 test ! -s conftest.err
12192 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012193 ac_lo=0 ac_mid=0
12194 while :; do
12195 cat >conftest.$ac_ext <<_ACEOF
12196/* confdefs.h. */
12197_ACEOF
12198cat confdefs.h >>conftest.$ac_ext
12199cat >>conftest.$ac_ext <<_ACEOF
12200/* end confdefs.h. */
12201$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012202 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012203int
12204main ()
12205{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012206static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012207test_array [0] = 0
12208
12209 ;
12210 return 0;
12211}
12212_ACEOF
12213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214if { (ac_try="$ac_compile"
12215case "(($ac_try" in
12216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12217 *) ac_try_echo=$ac_try;;
12218esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012221 ac_status=$?
12222 grep -v '^ *+' conftest.er1 >conftest.err
12223 rm -f conftest.er1
12224 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226 (exit $ac_status); } && {
12227 test -z "$ac_c_werror_flag" ||
12228 test ! -s conftest.err
12229 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012230 ac_hi=$ac_mid; break
12231else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012232 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012233sed 's/^/| /' conftest.$ac_ext >&5
12234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 ac_lo=`expr $ac_mid + 1`
12236 if test $ac_lo -le $ac_mid; then
12237 ac_lo= ac_hi=
12238 break
12239 fi
12240 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242
12243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012244 done
12245else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012246 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012247sed 's/^/| /' conftest.$ac_ext >&5
12248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012250/* confdefs.h. */
12251_ACEOF
12252cat confdefs.h >>conftest.$ac_ext
12253cat >>conftest.$ac_ext <<_ACEOF
12254/* end confdefs.h. */
12255$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012256 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012257int
12258main ()
12259{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012260static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012261test_array [0] = 0
12262
12263 ;
12264 return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268if { (ac_try="$ac_compile"
12269case "(($ac_try" in
12270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271 *) ac_try_echo=$ac_try;;
12272esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012275 ac_status=$?
12276 grep -v '^ *+' conftest.er1 >conftest.err
12277 rm -f conftest.er1
12278 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280 (exit $ac_status); } && {
12281 test -z "$ac_c_werror_flag" ||
12282 test ! -s conftest.err
12283 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012284 ac_hi=-1 ac_mid=-1
12285 while :; do
12286 cat >conftest.$ac_ext <<_ACEOF
12287/* confdefs.h. */
12288_ACEOF
12289cat confdefs.h >>conftest.$ac_ext
12290cat >>conftest.$ac_ext <<_ACEOF
12291/* end confdefs.h. */
12292$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012293 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012294int
12295main ()
12296{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012297static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012298test_array [0] = 0
12299
12300 ;
12301 return 0;
12302}
12303_ACEOF
12304rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305if { (ac_try="$ac_compile"
12306case "(($ac_try" in
12307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12308 *) ac_try_echo=$ac_try;;
12309esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012312 ac_status=$?
12313 grep -v '^ *+' conftest.er1 >conftest.err
12314 rm -f conftest.er1
12315 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317 (exit $ac_status); } && {
12318 test -z "$ac_c_werror_flag" ||
12319 test ! -s conftest.err
12320 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012321 ac_lo=$ac_mid; break
12322else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012323 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012324sed 's/^/| /' conftest.$ac_ext >&5
12325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326 ac_hi=`expr '(' $ac_mid ')' - 1`
12327 if test $ac_mid -le $ac_hi; then
12328 ac_lo= ac_hi=
12329 break
12330 fi
12331 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333
12334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012335 done
12336else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012337 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012338sed 's/^/| /' conftest.$ac_ext >&5
12339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342
12343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345
12346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012347# Binary search between lo and hi bounds.
12348while test "x$ac_lo" != "x$ac_hi"; do
12349 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12350 cat >conftest.$ac_ext <<_ACEOF
12351/* confdefs.h. */
12352_ACEOF
12353cat confdefs.h >>conftest.$ac_ext
12354cat >>conftest.$ac_ext <<_ACEOF
12355/* end confdefs.h. */
12356$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012357 typedef _Bool ac__type_sizeof_;
Thomas Woutersb2137042007-02-01 18:02:27 +000012358int
12359main ()
12360{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012361static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012362test_array [0] = 0
12363
12364 ;
12365 return 0;
12366}
12367_ACEOF
12368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369if { (ac_try="$ac_compile"
12370case "(($ac_try" in
12371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12372 *) ac_try_echo=$ac_try;;
12373esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012376 ac_status=$?
12377 grep -v '^ *+' conftest.er1 >conftest.err
12378 rm -f conftest.er1
12379 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381 (exit $ac_status); } && {
12382 test -z "$ac_c_werror_flag" ||
12383 test ! -s conftest.err
12384 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012385 ac_hi=$ac_mid
12386else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012387 echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012388sed 's/^/| /' conftest.$ac_ext >&5
12389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012390 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012392
12393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012394done
12395case $ac_lo in
12396?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012398 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012399See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012400echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012401See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012402 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403 else
12404 ac_cv_sizeof__Bool=0
12405 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012406esac
12407else
12408 cat >conftest.$ac_ext <<_ACEOF
12409/* confdefs.h. */
12410_ACEOF
12411cat confdefs.h >>conftest.$ac_ext
12412cat >>conftest.$ac_ext <<_ACEOF
12413/* end confdefs.h. */
12414$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012415 typedef _Bool ac__type_sizeof_;
12416static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12417static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012418#include <stdio.h>
12419#include <stdlib.h>
12420int
12421main ()
12422{
12423
12424 FILE *f = fopen ("conftest.val", "w");
12425 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012427 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012428 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012429 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012430 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012432 fprintf (f, "%ld\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012433 }
12434 else
12435 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012437 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012439 fprintf (f, "%lu\n", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012440 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012442
12443 ;
12444 return 0;
12445}
12446_ACEOF
12447rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448if { (ac_try="$ac_link"
12449case "(($ac_try" in
12450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12451 *) ac_try_echo=$ac_try;;
12452esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012455 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012458 { (case "(($ac_try" in
12459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12460 *) ac_try_echo=$ac_try;;
12461esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012464 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012466 (exit $ac_status); }; }; then
12467 ac_cv_sizeof__Bool=`cat conftest.val`
12468else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012469 echo "$as_me: program exited with status $ac_status" >&5
12470echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012471sed 's/^/| /' conftest.$ac_ext >&5
12472
12473( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012475 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012476See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012477echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012478See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012479 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 else
12481 ac_cv_sizeof__Bool=0
12482 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484rm -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 +000012485fi
12486rm -f conftest.val
12487fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012488{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12489echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490
12491
12492
Thomas Woutersb2137042007-02-01 18:02:27 +000012493cat >>confdefs.h <<_ACEOF
12494#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12495_ACEOF
12496
12497
12498fi
12499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012500{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12501echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012502if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012503 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012504else
12505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* confdefs.h. */
12507_ACEOF
12508cat confdefs.h >>conftest.$ac_ext
12509cat >>conftest.$ac_ext <<_ACEOF
12510/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012511#ifdef HAVE_STDINT_H
12512 #include <stdint.h>
12513 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012514
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012515typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012516int
12517main ()
12518{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012519if ((ac__type_new_ *) 0)
12520 return 0;
12521if (sizeof (ac__type_new_))
12522 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 ;
12524 return 0;
12525}
12526_ACEOF
12527rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528if { (ac_try="$ac_compile"
12529case "(($ac_try" in
12530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12531 *) ac_try_echo=$ac_try;;
12532esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012536 grep -v '^ *+' conftest.er1 >conftest.err
12537 rm -f conftest.er1
12538 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540 (exit $ac_status); } && {
12541 test -z "$ac_c_werror_flag" ||
12542 test ! -s conftest.err
12543 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012544 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012545else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012547sed 's/^/| /' conftest.$ac_ext >&5
12548
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012549 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012551
12552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012553fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012554{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12555echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12556if test $ac_cv_type_uintptr_t = yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012557
12558cat >>confdefs.h <<_ACEOF
12559#define HAVE_UINTPTR_T 1
12560_ACEOF
12561
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012562{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12563echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12564if test "${ac_cv_type_uintptr_t+set}" = set; then
12565 echo $ECHO_N "(cached) $ECHO_C" >&6
12566else
12567 cat >conftest.$ac_ext <<_ACEOF
12568/* confdefs.h. */
12569_ACEOF
12570cat confdefs.h >>conftest.$ac_ext
12571cat >>conftest.$ac_ext <<_ACEOF
12572/* end confdefs.h. */
12573$ac_includes_default
12574typedef uintptr_t ac__type_new_;
12575int
12576main ()
12577{
12578if ((ac__type_new_ *) 0)
12579 return 0;
12580if (sizeof (ac__type_new_))
12581 return 0;
12582 ;
12583 return 0;
12584}
12585_ACEOF
12586rm -f conftest.$ac_objext
12587if { (ac_try="$ac_compile"
12588case "(($ac_try" in
12589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12590 *) ac_try_echo=$ac_try;;
12591esac
12592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12593 (eval "$ac_compile") 2>conftest.er1
12594 ac_status=$?
12595 grep -v '^ *+' conftest.er1 >conftest.err
12596 rm -f conftest.er1
12597 cat conftest.err >&5
12598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12599 (exit $ac_status); } && {
12600 test -z "$ac_c_werror_flag" ||
12601 test ! -s conftest.err
12602 } && test -s conftest.$ac_objext; then
12603 ac_cv_type_uintptr_t=yes
12604else
12605 echo "$as_me: failed program was:" >&5
12606sed 's/^/| /' conftest.$ac_ext >&5
12607
12608 ac_cv_type_uintptr_t=no
12609fi
12610
12611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12612fi
12613{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12614echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616# The cast to long int works around a bug in the HP C Compiler
12617# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12618# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12619# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012620{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12621echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012622if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012623 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012624else
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 if test "$cross_compiling" = yes; then
12626 # Depending upon the size, compute the lo and hi bounds.
12627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* confdefs.h. */
12629_ACEOF
12630cat confdefs.h >>conftest.$ac_ext
12631cat >>conftest.$ac_ext <<_ACEOF
12632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012633$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012634 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012635int
12636main ()
12637{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012638static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012639test_array [0] = 0
12640
12641 ;
12642 return 0;
12643}
12644_ACEOF
12645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646if { (ac_try="$ac_compile"
12647case "(($ac_try" in
12648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12649 *) ac_try_echo=$ac_try;;
12650esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012654 grep -v '^ *+' conftest.er1 >conftest.err
12655 rm -f conftest.er1
12656 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658 (exit $ac_status); } && {
12659 test -z "$ac_c_werror_flag" ||
12660 test ! -s conftest.err
12661 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ac_lo=0 ac_mid=0
12663 while :; do
12664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012665/* confdefs.h. */
12666_ACEOF
12667cat confdefs.h >>conftest.$ac_ext
12668cat >>conftest.$ac_ext <<_ACEOF
12669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012670$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012671 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012672int
12673main ()
12674{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012675static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012676test_array [0] = 0
12677
12678 ;
12679 return 0;
12680}
12681_ACEOF
12682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683if { (ac_try="$ac_compile"
12684case "(($ac_try" in
12685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12686 *) ac_try_echo=$ac_try;;
12687esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012691 grep -v '^ *+' conftest.er1 >conftest.err
12692 rm -f conftest.er1
12693 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695 (exit $ac_status); } && {
12696 test -z "$ac_c_werror_flag" ||
12697 test ! -s conftest.err
12698 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ac_hi=$ac_mid; break
12700else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012702sed 's/^/| /' conftest.$ac_ext >&5
12703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 ac_lo=`expr $ac_mid + 1`
12705 if test $ac_lo -le $ac_mid; then
12706 ac_lo= ac_hi=
12707 break
12708 fi
12709 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711
12712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 done
12714else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012716sed 's/^/| /' conftest.$ac_ext >&5
12717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* confdefs.h. */
12720_ACEOF
12721cat confdefs.h >>conftest.$ac_ext
12722cat >>conftest.$ac_ext <<_ACEOF
12723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012724$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012725 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012726int
12727main ()
12728{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012729static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012730test_array [0] = 0
12731
12732 ;
12733 return 0;
12734}
12735_ACEOF
12736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737if { (ac_try="$ac_compile"
12738case "(($ac_try" in
12739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12740 *) ac_try_echo=$ac_try;;
12741esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012745 grep -v '^ *+' conftest.er1 >conftest.err
12746 rm -f conftest.er1
12747 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749 (exit $ac_status); } && {
12750 test -z "$ac_c_werror_flag" ||
12751 test ! -s conftest.err
12752 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753 ac_hi=-1 ac_mid=-1
12754 while :; do
12755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012756/* confdefs.h. */
12757_ACEOF
12758cat confdefs.h >>conftest.$ac_ext
12759cat >>conftest.$ac_ext <<_ACEOF
12760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012761$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012762 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012763int
12764main ()
12765{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012766static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012767test_array [0] = 0
12768
12769 ;
12770 return 0;
12771}
12772_ACEOF
12773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774if { (ac_try="$ac_compile"
12775case "(($ac_try" in
12776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12777 *) ac_try_echo=$ac_try;;
12778esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012782 grep -v '^ *+' conftest.er1 >conftest.err
12783 rm -f conftest.er1
12784 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786 (exit $ac_status); } && {
12787 test -z "$ac_c_werror_flag" ||
12788 test ! -s conftest.err
12789 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 ac_lo=$ac_mid; break
12791else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012793sed 's/^/| /' conftest.$ac_ext >&5
12794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795 ac_hi=`expr '(' $ac_mid ')' - 1`
12796 if test $ac_mid -le $ac_hi; then
12797 ac_lo= ac_hi=
12798 break
12799 fi
12800 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012802
12803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 done
12805else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012807sed 's/^/| /' conftest.$ac_ext >&5
12808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811
12812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814
12815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012816# Binary search between lo and hi bounds.
12817while test "x$ac_lo" != "x$ac_hi"; do
12818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012820/* confdefs.h. */
12821_ACEOF
12822cat confdefs.h >>conftest.$ac_ext
12823cat >>conftest.$ac_ext <<_ACEOF
12824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012825$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012826 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012827int
12828main ()
12829{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012830static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012831test_array [0] = 0
12832
12833 ;
12834 return 0;
12835}
12836_ACEOF
12837rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838if { (ac_try="$ac_compile"
12839case "(($ac_try" in
12840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12841 *) ac_try_echo=$ac_try;;
12842esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012846 grep -v '^ *+' conftest.er1 >conftest.err
12847 rm -f conftest.er1
12848 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850 (exit $ac_status); } && {
12851 test -z "$ac_c_werror_flag" ||
12852 test ! -s conftest.err
12853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 ac_hi=$ac_mid
12855else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012857sed 's/^/| /' conftest.$ac_ext >&5
12858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861
12862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012863done
12864case $ac_lo in
12865?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012867 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012868See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012869echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012870See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012871 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872 else
12873 ac_cv_sizeof_uintptr_t=0
12874 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012875esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012876else
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012878/* confdefs.h. */
12879_ACEOF
12880cat confdefs.h >>conftest.$ac_ext
12881cat >>conftest.$ac_ext <<_ACEOF
12882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012883$ac_includes_default
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012884 typedef uintptr_t ac__type_sizeof_;
12885static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12886static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012887#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012888#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012889int
12890main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012891{
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893 FILE *f = fopen ("conftest.val", "w");
12894 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012896 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012899 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012901 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 }
12903 else
12904 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012906 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012908 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012909 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911
12912 ;
12913 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012914}
Martin v. Löwis11437992002-04-12 09:54:03 +000012915_ACEOF
12916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917if { (ac_try="$ac_link"
12918case "(($ac_try" in
12919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12920 *) ac_try_echo=$ac_try;;
12921esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012927 { (case "(($ac_try" in
12928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12929 *) ac_try_echo=$ac_try;;
12930esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 (exit $ac_status); }; }; then
12936 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012937else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012938 echo "$as_me: program exited with status $ac_status" >&5
12939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012940sed 's/^/| /' conftest.$ac_ext >&5
12941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012944 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012945See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012946echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012947See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012948 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 else
12950 ac_cv_sizeof_uintptr_t=0
12951 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953rm -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 +000012954fi
12955rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012956fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012957{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12958echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959
12960
12961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012963#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012964_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012965
Michael W. Hudson54241132001-12-07 15:38:26 +000012966
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012967fi
12968
Thomas Wouters89f507f2006-12-13 04:49:30 +000012969
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012970{ echo "$as_me:$LINENO: checking for off_t" >&5
12971echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
12972if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012974else
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012976/* confdefs.h. */
12977_ACEOF
12978cat confdefs.h >>conftest.$ac_ext
12979cat >>conftest.$ac_ext <<_ACEOF
12980/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012981
12982#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012983#include <sys/types.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012984#endif
12985
12986
12987typedef off_t ac__type_new_;
12988int
12989main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012990{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012991if ((ac__type_new_ *) 0)
12992 return 0;
12993if (sizeof (ac__type_new_))
12994 return 0;
12995 ;
12996 return 0;
12997}
12998_ACEOF
12999rm -f conftest.$ac_objext
13000if { (ac_try="$ac_compile"
13001case "(($ac_try" in
13002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13003 *) ac_try_echo=$ac_try;;
13004esac
13005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13006 (eval "$ac_compile") 2>conftest.er1
13007 ac_status=$?
13008 grep -v '^ *+' conftest.er1 >conftest.err
13009 rm -f conftest.er1
13010 cat conftest.err >&5
13011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13012 (exit $ac_status); } && {
13013 test -z "$ac_c_werror_flag" ||
13014 test ! -s conftest.err
13015 } && test -s conftest.$ac_objext; then
13016 ac_cv_type_off_t=yes
13017else
13018 echo "$as_me: failed program was:" >&5
13019sed 's/^/| /' conftest.$ac_ext >&5
13020
13021 ac_cv_type_off_t=no
13022fi
13023
13024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13025fi
13026{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13027echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13028
13029# The cast to long int works around a bug in the HP C Compiler
13030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13032# This bug is HP SR number 8606223364.
13033{ echo "$as_me:$LINENO: checking size of off_t" >&5
13034echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13035if test "${ac_cv_sizeof_off_t+set}" = set; then
13036 echo $ECHO_N "(cached) $ECHO_C" >&6
13037else
13038 if test "$cross_compiling" = yes; then
13039 # Depending upon the size, compute the lo and hi bounds.
13040cat >conftest.$ac_ext <<_ACEOF
13041/* confdefs.h. */
13042_ACEOF
13043cat confdefs.h >>conftest.$ac_ext
13044cat >>conftest.$ac_ext <<_ACEOF
13045/* end confdefs.h. */
13046
13047#ifdef HAVE_SYS_TYPES_H
13048#include <sys/types.h>
13049#endif
13050
13051
13052 typedef off_t ac__type_sizeof_;
13053int
13054main ()
13055{
13056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13057test_array [0] = 0
13058
13059 ;
13060 return 0;
13061}
13062_ACEOF
13063rm -f conftest.$ac_objext
13064if { (ac_try="$ac_compile"
13065case "(($ac_try" in
13066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13067 *) ac_try_echo=$ac_try;;
13068esac
13069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13070 (eval "$ac_compile") 2>conftest.er1
13071 ac_status=$?
13072 grep -v '^ *+' conftest.er1 >conftest.err
13073 rm -f conftest.er1
13074 cat conftest.err >&5
13075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13076 (exit $ac_status); } && {
13077 test -z "$ac_c_werror_flag" ||
13078 test ! -s conftest.err
13079 } && test -s conftest.$ac_objext; then
13080 ac_lo=0 ac_mid=0
13081 while :; do
13082 cat >conftest.$ac_ext <<_ACEOF
13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
13088
13089#ifdef HAVE_SYS_TYPES_H
13090#include <sys/types.h>
13091#endif
13092
13093
13094 typedef off_t ac__type_sizeof_;
13095int
13096main ()
13097{
13098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13099test_array [0] = 0
13100
13101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext
13106if { (ac_try="$ac_compile"
13107case "(($ac_try" in
13108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13109 *) ac_try_echo=$ac_try;;
13110esac
13111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13112 (eval "$ac_compile") 2>conftest.er1
13113 ac_status=$?
13114 grep -v '^ *+' conftest.er1 >conftest.err
13115 rm -f conftest.er1
13116 cat conftest.err >&5
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); } && {
13119 test -z "$ac_c_werror_flag" ||
13120 test ! -s conftest.err
13121 } && test -s conftest.$ac_objext; then
13122 ac_hi=$ac_mid; break
13123else
13124 echo "$as_me: failed program was:" >&5
13125sed 's/^/| /' conftest.$ac_ext >&5
13126
13127 ac_lo=`expr $ac_mid + 1`
13128 if test $ac_lo -le $ac_mid; then
13129 ac_lo= ac_hi=
13130 break
13131 fi
13132 ac_mid=`expr 2 '*' $ac_mid + 1`
13133fi
13134
13135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13136 done
13137else
13138 echo "$as_me: failed program was:" >&5
13139sed 's/^/| /' conftest.$ac_ext >&5
13140
13141 cat >conftest.$ac_ext <<_ACEOF
13142/* confdefs.h. */
13143_ACEOF
13144cat confdefs.h >>conftest.$ac_ext
13145cat >>conftest.$ac_ext <<_ACEOF
13146/* end confdefs.h. */
13147
13148#ifdef HAVE_SYS_TYPES_H
13149#include <sys/types.h>
13150#endif
13151
13152
13153 typedef off_t ac__type_sizeof_;
13154int
13155main ()
13156{
13157static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13158test_array [0] = 0
13159
13160 ;
13161 return 0;
13162}
13163_ACEOF
13164rm -f conftest.$ac_objext
13165if { (ac_try="$ac_compile"
13166case "(($ac_try" in
13167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13168 *) ac_try_echo=$ac_try;;
13169esac
13170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13171 (eval "$ac_compile") 2>conftest.er1
13172 ac_status=$?
13173 grep -v '^ *+' conftest.er1 >conftest.err
13174 rm -f conftest.er1
13175 cat conftest.err >&5
13176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13177 (exit $ac_status); } && {
13178 test -z "$ac_c_werror_flag" ||
13179 test ! -s conftest.err
13180 } && test -s conftest.$ac_objext; then
13181 ac_hi=-1 ac_mid=-1
13182 while :; do
13183 cat >conftest.$ac_ext <<_ACEOF
13184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
13189
13190#ifdef HAVE_SYS_TYPES_H
13191#include <sys/types.h>
13192#endif
13193
13194
13195 typedef off_t ac__type_sizeof_;
13196int
13197main ()
13198{
13199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13200test_array [0] = 0
13201
13202 ;
13203 return 0;
13204}
13205_ACEOF
13206rm -f conftest.$ac_objext
13207if { (ac_try="$ac_compile"
13208case "(($ac_try" in
13209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13210 *) ac_try_echo=$ac_try;;
13211esac
13212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13213 (eval "$ac_compile") 2>conftest.er1
13214 ac_status=$?
13215 grep -v '^ *+' conftest.er1 >conftest.err
13216 rm -f conftest.er1
13217 cat conftest.err >&5
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); } && {
13220 test -z "$ac_c_werror_flag" ||
13221 test ! -s conftest.err
13222 } && test -s conftest.$ac_objext; then
13223 ac_lo=$ac_mid; break
13224else
13225 echo "$as_me: failed program was:" >&5
13226sed 's/^/| /' conftest.$ac_ext >&5
13227
13228 ac_hi=`expr '(' $ac_mid ')' - 1`
13229 if test $ac_mid -le $ac_hi; then
13230 ac_lo= ac_hi=
13231 break
13232 fi
13233 ac_mid=`expr 2 '*' $ac_mid`
13234fi
13235
13236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237 done
13238else
13239 echo "$as_me: failed program was:" >&5
13240sed 's/^/| /' conftest.$ac_ext >&5
13241
13242 ac_lo= ac_hi=
13243fi
13244
13245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13246fi
13247
13248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13249# Binary search between lo and hi bounds.
13250while test "x$ac_lo" != "x$ac_hi"; do
13251 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13252 cat >conftest.$ac_ext <<_ACEOF
13253/* confdefs.h. */
13254_ACEOF
13255cat confdefs.h >>conftest.$ac_ext
13256cat >>conftest.$ac_ext <<_ACEOF
13257/* end confdefs.h. */
13258
13259#ifdef HAVE_SYS_TYPES_H
13260#include <sys/types.h>
13261#endif
13262
13263
13264 typedef off_t ac__type_sizeof_;
13265int
13266main ()
13267{
13268static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13269test_array [0] = 0
13270
13271 ;
13272 return 0;
13273}
13274_ACEOF
13275rm -f conftest.$ac_objext
13276if { (ac_try="$ac_compile"
13277case "(($ac_try" in
13278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13279 *) ac_try_echo=$ac_try;;
13280esac
13281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13282 (eval "$ac_compile") 2>conftest.er1
13283 ac_status=$?
13284 grep -v '^ *+' conftest.er1 >conftest.err
13285 rm -f conftest.er1
13286 cat conftest.err >&5
13287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13288 (exit $ac_status); } && {
13289 test -z "$ac_c_werror_flag" ||
13290 test ! -s conftest.err
13291 } && test -s conftest.$ac_objext; then
13292 ac_hi=$ac_mid
13293else
13294 echo "$as_me: failed program was:" >&5
13295sed 's/^/| /' conftest.$ac_ext >&5
13296
13297 ac_lo=`expr '(' $ac_mid ')' + 1`
13298fi
13299
13300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13301done
13302case $ac_lo in
13303?*) ac_cv_sizeof_off_t=$ac_lo;;
13304'') if test "$ac_cv_type_off_t" = yes; then
13305 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13306See \`config.log' for more details." >&5
13307echo "$as_me: error: cannot compute sizeof (off_t)
13308See \`config.log' for more details." >&2;}
13309 { (exit 77); exit 77; }; }
13310 else
13311 ac_cv_sizeof_off_t=0
13312 fi ;;
13313esac
13314else
13315 cat >conftest.$ac_ext <<_ACEOF
13316/* confdefs.h. */
13317_ACEOF
13318cat confdefs.h >>conftest.$ac_ext
13319cat >>conftest.$ac_ext <<_ACEOF
13320/* end confdefs.h. */
13321
13322#ifdef HAVE_SYS_TYPES_H
13323#include <sys/types.h>
13324#endif
13325
13326
13327 typedef off_t ac__type_sizeof_;
13328static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13329static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13330#include <stdio.h>
13331#include <stdlib.h>
13332int
13333main ()
13334{
13335
13336 FILE *f = fopen ("conftest.val", "w");
13337 if (! f)
13338 return 1;
13339 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13340 {
13341 long int i = longval ();
13342 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13343 return 1;
13344 fprintf (f, "%ld\n", i);
13345 }
13346 else
13347 {
13348 unsigned long int i = ulongval ();
13349 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13350 return 1;
13351 fprintf (f, "%lu\n", i);
13352 }
13353 return ferror (f) || fclose (f) != 0;
13354
13355 ;
13356 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013357}
Martin v. Löwis11437992002-04-12 09:54:03 +000013358_ACEOF
13359rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013360if { (ac_try="$ac_link"
13361case "(($ac_try" in
13362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13363 *) ac_try_echo=$ac_try;;
13364esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013369 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370 { (case "(($ac_try" in
13371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13372 *) ac_try_echo=$ac_try;;
13373esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013378 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013379 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013380else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013381 echo "$as_me: program exited with status $ac_status" >&5
13382echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013383sed 's/^/| /' conftest.$ac_ext >&5
13384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013386if test "$ac_cv_type_off_t" = yes; then
13387 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13388See \`config.log' for more details." >&5
13389echo "$as_me: error: cannot compute sizeof (off_t)
13390See \`config.log' for more details." >&2;}
13391 { (exit 77); exit 77; }; }
13392 else
13393 ac_cv_sizeof_off_t=0
13394 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396rm -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 +000013397fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013398rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013399fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013400{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13401echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013403
13404
Martin v. Löwis11437992002-04-12 09:54:03 +000013405cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013406#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013407_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013408
Michael W. Hudson54241132001-12-07 15:38:26 +000013409
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013410
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013411{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13412echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013413if test "$have_long_long" = yes -a \
13414 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13415 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417cat >>confdefs.h <<\_ACEOF
13418#define HAVE_LARGEFILE_SUPPORT 1
13419_ACEOF
13420
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013421 { echo "$as_me:$LINENO: result: yes" >&5
13422echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013423else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013424 { echo "$as_me:$LINENO: result: no" >&5
13425echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013426fi
13427
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013428{ echo "$as_me:$LINENO: checking for time_t" >&5
13429echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13430if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013432else
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* confdefs.h. */
13435_ACEOF
13436cat confdefs.h >>conftest.$ac_ext
13437cat >>conftest.$ac_ext <<_ACEOF
13438/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013439
13440#ifdef HAVE_SYS_TYPES_H
13441#include <sys/types.h>
13442#endif
13443#ifdef HAVE_TIME_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013444#include <time.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013445#endif
13446
13447
13448typedef time_t ac__type_new_;
13449int
13450main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013451{
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013452if ((ac__type_new_ *) 0)
13453 return 0;
13454if (sizeof (ac__type_new_))
13455 return 0;
13456 ;
13457 return 0;
13458}
13459_ACEOF
13460rm -f conftest.$ac_objext
13461if { (ac_try="$ac_compile"
13462case "(($ac_try" in
13463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13464 *) ac_try_echo=$ac_try;;
13465esac
13466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13467 (eval "$ac_compile") 2>conftest.er1
13468 ac_status=$?
13469 grep -v '^ *+' conftest.er1 >conftest.err
13470 rm -f conftest.er1
13471 cat conftest.err >&5
13472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13473 (exit $ac_status); } && {
13474 test -z "$ac_c_werror_flag" ||
13475 test ! -s conftest.err
13476 } && test -s conftest.$ac_objext; then
13477 ac_cv_type_time_t=yes
13478else
13479 echo "$as_me: failed program was:" >&5
13480sed 's/^/| /' conftest.$ac_ext >&5
13481
13482 ac_cv_type_time_t=no
13483fi
13484
13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486fi
13487{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13488echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13489
13490# The cast to long int works around a bug in the HP C Compiler
13491# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13492# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13493# This bug is HP SR number 8606223364.
13494{ echo "$as_me:$LINENO: checking size of time_t" >&5
13495echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13496if test "${ac_cv_sizeof_time_t+set}" = set; then
13497 echo $ECHO_N "(cached) $ECHO_C" >&6
13498else
13499 if test "$cross_compiling" = yes; then
13500 # Depending upon the size, compute the lo and hi bounds.
13501cat >conftest.$ac_ext <<_ACEOF
13502/* confdefs.h. */
13503_ACEOF
13504cat confdefs.h >>conftest.$ac_ext
13505cat >>conftest.$ac_ext <<_ACEOF
13506/* end confdefs.h. */
13507
13508#ifdef HAVE_SYS_TYPES_H
13509#include <sys/types.h>
13510#endif
13511#ifdef HAVE_TIME_H
13512#include <time.h>
13513#endif
13514
13515
13516 typedef time_t ac__type_sizeof_;
13517int
13518main ()
13519{
13520static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13521test_array [0] = 0
13522
13523 ;
13524 return 0;
13525}
13526_ACEOF
13527rm -f conftest.$ac_objext
13528if { (ac_try="$ac_compile"
13529case "(($ac_try" in
13530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13531 *) ac_try_echo=$ac_try;;
13532esac
13533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13534 (eval "$ac_compile") 2>conftest.er1
13535 ac_status=$?
13536 grep -v '^ *+' conftest.er1 >conftest.err
13537 rm -f conftest.er1
13538 cat conftest.err >&5
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540 (exit $ac_status); } && {
13541 test -z "$ac_c_werror_flag" ||
13542 test ! -s conftest.err
13543 } && test -s conftest.$ac_objext; then
13544 ac_lo=0 ac_mid=0
13545 while :; do
13546 cat >conftest.$ac_ext <<_ACEOF
13547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
13552
13553#ifdef HAVE_SYS_TYPES_H
13554#include <sys/types.h>
13555#endif
13556#ifdef HAVE_TIME_H
13557#include <time.h>
13558#endif
13559
13560
13561 typedef time_t ac__type_sizeof_;
13562int
13563main ()
13564{
13565static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13566test_array [0] = 0
13567
13568 ;
13569 return 0;
13570}
13571_ACEOF
13572rm -f conftest.$ac_objext
13573if { (ac_try="$ac_compile"
13574case "(($ac_try" in
13575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13576 *) ac_try_echo=$ac_try;;
13577esac
13578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13579 (eval "$ac_compile") 2>conftest.er1
13580 ac_status=$?
13581 grep -v '^ *+' conftest.er1 >conftest.err
13582 rm -f conftest.er1
13583 cat conftest.err >&5
13584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13585 (exit $ac_status); } && {
13586 test -z "$ac_c_werror_flag" ||
13587 test ! -s conftest.err
13588 } && test -s conftest.$ac_objext; then
13589 ac_hi=$ac_mid; break
13590else
13591 echo "$as_me: failed program was:" >&5
13592sed 's/^/| /' conftest.$ac_ext >&5
13593
13594 ac_lo=`expr $ac_mid + 1`
13595 if test $ac_lo -le $ac_mid; then
13596 ac_lo= ac_hi=
13597 break
13598 fi
13599 ac_mid=`expr 2 '*' $ac_mid + 1`
13600fi
13601
13602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13603 done
13604else
13605 echo "$as_me: failed program was:" >&5
13606sed 's/^/| /' conftest.$ac_ext >&5
13607
13608 cat >conftest.$ac_ext <<_ACEOF
13609/* confdefs.h. */
13610_ACEOF
13611cat confdefs.h >>conftest.$ac_ext
13612cat >>conftest.$ac_ext <<_ACEOF
13613/* end confdefs.h. */
13614
13615#ifdef HAVE_SYS_TYPES_H
13616#include <sys/types.h>
13617#endif
13618#ifdef HAVE_TIME_H
13619#include <time.h>
13620#endif
13621
13622
13623 typedef time_t ac__type_sizeof_;
13624int
13625main ()
13626{
13627static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13628test_array [0] = 0
13629
13630 ;
13631 return 0;
13632}
13633_ACEOF
13634rm -f conftest.$ac_objext
13635if { (ac_try="$ac_compile"
13636case "(($ac_try" in
13637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13638 *) ac_try_echo=$ac_try;;
13639esac
13640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13641 (eval "$ac_compile") 2>conftest.er1
13642 ac_status=$?
13643 grep -v '^ *+' conftest.er1 >conftest.err
13644 rm -f conftest.er1
13645 cat conftest.err >&5
13646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647 (exit $ac_status); } && {
13648 test -z "$ac_c_werror_flag" ||
13649 test ! -s conftest.err
13650 } && test -s conftest.$ac_objext; then
13651 ac_hi=-1 ac_mid=-1
13652 while :; do
13653 cat >conftest.$ac_ext <<_ACEOF
13654/* confdefs.h. */
13655_ACEOF
13656cat confdefs.h >>conftest.$ac_ext
13657cat >>conftest.$ac_ext <<_ACEOF
13658/* end confdefs.h. */
13659
13660#ifdef HAVE_SYS_TYPES_H
13661#include <sys/types.h>
13662#endif
13663#ifdef HAVE_TIME_H
13664#include <time.h>
13665#endif
13666
13667
13668 typedef time_t ac__type_sizeof_;
13669int
13670main ()
13671{
13672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13673test_array [0] = 0
13674
13675 ;
13676 return 0;
13677}
13678_ACEOF
13679rm -f conftest.$ac_objext
13680if { (ac_try="$ac_compile"
13681case "(($ac_try" in
13682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13683 *) ac_try_echo=$ac_try;;
13684esac
13685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13686 (eval "$ac_compile") 2>conftest.er1
13687 ac_status=$?
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); } && {
13693 test -z "$ac_c_werror_flag" ||
13694 test ! -s conftest.err
13695 } && test -s conftest.$ac_objext; then
13696 ac_lo=$ac_mid; break
13697else
13698 echo "$as_me: failed program was:" >&5
13699sed 's/^/| /' conftest.$ac_ext >&5
13700
13701 ac_hi=`expr '(' $ac_mid ')' - 1`
13702 if test $ac_mid -le $ac_hi; then
13703 ac_lo= ac_hi=
13704 break
13705 fi
13706 ac_mid=`expr 2 '*' $ac_mid`
13707fi
13708
13709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710 done
13711else
13712 echo "$as_me: failed program was:" >&5
13713sed 's/^/| /' conftest.$ac_ext >&5
13714
13715 ac_lo= ac_hi=
13716fi
13717
13718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13719fi
13720
13721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13722# Binary search between lo and hi bounds.
13723while test "x$ac_lo" != "x$ac_hi"; do
13724 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13725 cat >conftest.$ac_ext <<_ACEOF
13726/* confdefs.h. */
13727_ACEOF
13728cat confdefs.h >>conftest.$ac_ext
13729cat >>conftest.$ac_ext <<_ACEOF
13730/* end confdefs.h. */
13731
13732#ifdef HAVE_SYS_TYPES_H
13733#include <sys/types.h>
13734#endif
13735#ifdef HAVE_TIME_H
13736#include <time.h>
13737#endif
13738
13739
13740 typedef time_t ac__type_sizeof_;
13741int
13742main ()
13743{
13744static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13745test_array [0] = 0
13746
13747 ;
13748 return 0;
13749}
13750_ACEOF
13751rm -f conftest.$ac_objext
13752if { (ac_try="$ac_compile"
13753case "(($ac_try" in
13754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13755 *) ac_try_echo=$ac_try;;
13756esac
13757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13758 (eval "$ac_compile") 2>conftest.er1
13759 ac_status=$?
13760 grep -v '^ *+' conftest.er1 >conftest.err
13761 rm -f conftest.er1
13762 cat conftest.err >&5
13763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13764 (exit $ac_status); } && {
13765 test -z "$ac_c_werror_flag" ||
13766 test ! -s conftest.err
13767 } && test -s conftest.$ac_objext; then
13768 ac_hi=$ac_mid
13769else
13770 echo "$as_me: failed program was:" >&5
13771sed 's/^/| /' conftest.$ac_ext >&5
13772
13773 ac_lo=`expr '(' $ac_mid ')' + 1`
13774fi
13775
13776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13777done
13778case $ac_lo in
13779?*) ac_cv_sizeof_time_t=$ac_lo;;
13780'') if test "$ac_cv_type_time_t" = yes; then
13781 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13782See \`config.log' for more details." >&5
13783echo "$as_me: error: cannot compute sizeof (time_t)
13784See \`config.log' for more details." >&2;}
13785 { (exit 77); exit 77; }; }
13786 else
13787 ac_cv_sizeof_time_t=0
13788 fi ;;
13789esac
13790else
13791 cat >conftest.$ac_ext <<_ACEOF
13792/* confdefs.h. */
13793_ACEOF
13794cat confdefs.h >>conftest.$ac_ext
13795cat >>conftest.$ac_ext <<_ACEOF
13796/* end confdefs.h. */
13797
13798#ifdef HAVE_SYS_TYPES_H
13799#include <sys/types.h>
13800#endif
13801#ifdef HAVE_TIME_H
13802#include <time.h>
13803#endif
13804
13805
13806 typedef time_t ac__type_sizeof_;
13807static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13808static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13809#include <stdio.h>
13810#include <stdlib.h>
13811int
13812main ()
13813{
13814
13815 FILE *f = fopen ("conftest.val", "w");
13816 if (! f)
13817 return 1;
13818 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13819 {
13820 long int i = longval ();
13821 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13822 return 1;
13823 fprintf (f, "%ld\n", i);
13824 }
13825 else
13826 {
13827 unsigned long int i = ulongval ();
13828 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13829 return 1;
13830 fprintf (f, "%lu\n", i);
13831 }
13832 return ferror (f) || fclose (f) != 0;
13833
13834 ;
13835 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013836}
Martin v. Löwis11437992002-04-12 09:54:03 +000013837_ACEOF
13838rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013839if { (ac_try="$ac_link"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849 { (case "(($ac_try" in
13850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13851 *) ac_try_echo=$ac_try;;
13852esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013855 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013858 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013859else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013860 echo "$as_me: program exited with status $ac_status" >&5
13861echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013862sed 's/^/| /' conftest.$ac_ext >&5
13863
Martin v. Löwis11437992002-04-12 09:54:03 +000013864( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013865if test "$ac_cv_type_time_t" = yes; then
13866 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13867See \`config.log' for more details." >&5
13868echo "$as_me: error: cannot compute sizeof (time_t)
13869See \`config.log' for more details." >&2;}
13870 { (exit 77); exit 77; }; }
13871 else
13872 ac_cv_sizeof_time_t=0
13873 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875rm -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 +000013876fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013877rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013878fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013879{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13880echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013882
13883
Martin v. Löwis11437992002-04-12 09:54:03 +000013884cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013885#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013886_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013887
Michael W. Hudson54241132001-12-07 15:38:26 +000013888
13889
Trent Mick635f6fb2000-08-23 21:33:05 +000013890# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013891ac_save_cc="$CC"
13892if test "$ac_cv_kpthread" = "yes"
13893then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013894elif test "$ac_cv_kthread" = "yes"
13895then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013896elif test "$ac_cv_pthread" = "yes"
13897then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013898fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013899
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013900{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13901echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013902have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013903cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013904/* confdefs.h. */
13905_ACEOF
13906cat confdefs.h >>conftest.$ac_ext
13907cat >>conftest.$ac_ext <<_ACEOF
13908/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013909#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013910int
13911main ()
13912{
Guido van Rossum12580492000-09-24 16:47:19 +000013913pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919if { (ac_try="$ac_compile"
13920case "(($ac_try" in
13921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13922 *) ac_try_echo=$ac_try;;
13923esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013925 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013927 grep -v '^ *+' conftest.er1 >conftest.err
13928 rm -f conftest.er1
13929 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931 (exit $ac_status); } && {
13932 test -z "$ac_c_werror_flag" ||
13933 test ! -s conftest.err
13934 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013935 have_pthread_t=yes
13936else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013938sed 's/^/| /' conftest.$ac_ext >&5
13939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940
Trent Mick635f6fb2000-08-23 21:33:05 +000013941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013942
13943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013944{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13945echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013946if test "$have_pthread_t" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013947 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13948echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13949if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013950 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013951else
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013953/* confdefs.h. */
13954_ACEOF
13955cat confdefs.h >>conftest.$ac_ext
13956cat >>conftest.$ac_ext <<_ACEOF
13957/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013958
13959#ifdef HAVE_PTHREAD_H
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013960#include <pthread.h>
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013961#endif
13962
13963
13964typedef pthread_t ac__type_new_;
13965int
13966main ()
13967{
13968if ((ac__type_new_ *) 0)
13969 return 0;
13970if (sizeof (ac__type_new_))
13971 return 0;
13972 ;
13973 return 0;
13974}
13975_ACEOF
13976rm -f conftest.$ac_objext
13977if { (ac_try="$ac_compile"
13978case "(($ac_try" in
13979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13980 *) ac_try_echo=$ac_try;;
13981esac
13982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13983 (eval "$ac_compile") 2>conftest.er1
13984 ac_status=$?
13985 grep -v '^ *+' conftest.er1 >conftest.err
13986 rm -f conftest.er1
13987 cat conftest.err >&5
13988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13989 (exit $ac_status); } && {
13990 test -z "$ac_c_werror_flag" ||
13991 test ! -s conftest.err
13992 } && test -s conftest.$ac_objext; then
13993 ac_cv_type_pthread_t=yes
13994else
13995 echo "$as_me: failed program was:" >&5
13996sed 's/^/| /' conftest.$ac_ext >&5
13997
13998 ac_cv_type_pthread_t=no
13999fi
14000
14001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14002fi
14003{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14004echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14005
14006# The cast to long int works around a bug in the HP C Compiler
14007# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14008# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14009# This bug is HP SR number 8606223364.
14010{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14011echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14012if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14013 echo $ECHO_N "(cached) $ECHO_C" >&6
14014else
14015 if test "$cross_compiling" = yes; then
14016 # Depending upon the size, compute the lo and hi bounds.
14017cat >conftest.$ac_ext <<_ACEOF
14018/* confdefs.h. */
14019_ACEOF
14020cat confdefs.h >>conftest.$ac_ext
14021cat >>conftest.$ac_ext <<_ACEOF
14022/* end confdefs.h. */
14023
14024#ifdef HAVE_PTHREAD_H
14025#include <pthread.h>
14026#endif
14027
14028
14029 typedef pthread_t ac__type_sizeof_;
14030int
14031main ()
14032{
14033static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14034test_array [0] = 0
14035
14036 ;
14037 return 0;
14038}
14039_ACEOF
14040rm -f conftest.$ac_objext
14041if { (ac_try="$ac_compile"
14042case "(($ac_try" in
14043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14044 *) ac_try_echo=$ac_try;;
14045esac
14046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14047 (eval "$ac_compile") 2>conftest.er1
14048 ac_status=$?
14049 grep -v '^ *+' conftest.er1 >conftest.err
14050 rm -f conftest.er1
14051 cat conftest.err >&5
14052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14053 (exit $ac_status); } && {
14054 test -z "$ac_c_werror_flag" ||
14055 test ! -s conftest.err
14056 } && test -s conftest.$ac_objext; then
14057 ac_lo=0 ac_mid=0
14058 while :; do
14059 cat >conftest.$ac_ext <<_ACEOF
14060/* confdefs.h. */
14061_ACEOF
14062cat confdefs.h >>conftest.$ac_ext
14063cat >>conftest.$ac_ext <<_ACEOF
14064/* end confdefs.h. */
14065
14066#ifdef HAVE_PTHREAD_H
14067#include <pthread.h>
14068#endif
14069
14070
14071 typedef pthread_t ac__type_sizeof_;
14072int
14073main ()
14074{
14075static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14076test_array [0] = 0
14077
14078 ;
14079 return 0;
14080}
14081_ACEOF
14082rm -f conftest.$ac_objext
14083if { (ac_try="$ac_compile"
14084case "(($ac_try" in
14085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14086 *) ac_try_echo=$ac_try;;
14087esac
14088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14089 (eval "$ac_compile") 2>conftest.er1
14090 ac_status=$?
14091 grep -v '^ *+' conftest.er1 >conftest.err
14092 rm -f conftest.er1
14093 cat conftest.err >&5
14094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14095 (exit $ac_status); } && {
14096 test -z "$ac_c_werror_flag" ||
14097 test ! -s conftest.err
14098 } && test -s conftest.$ac_objext; then
14099 ac_hi=$ac_mid; break
14100else
14101 echo "$as_me: failed program was:" >&5
14102sed 's/^/| /' conftest.$ac_ext >&5
14103
14104 ac_lo=`expr $ac_mid + 1`
14105 if test $ac_lo -le $ac_mid; then
14106 ac_lo= ac_hi=
14107 break
14108 fi
14109 ac_mid=`expr 2 '*' $ac_mid + 1`
14110fi
14111
14112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14113 done
14114else
14115 echo "$as_me: failed program was:" >&5
14116sed 's/^/| /' conftest.$ac_ext >&5
14117
14118 cat >conftest.$ac_ext <<_ACEOF
14119/* confdefs.h. */
14120_ACEOF
14121cat confdefs.h >>conftest.$ac_ext
14122cat >>conftest.$ac_ext <<_ACEOF
14123/* end confdefs.h. */
14124
14125#ifdef HAVE_PTHREAD_H
14126#include <pthread.h>
14127#endif
14128
14129
14130 typedef pthread_t ac__type_sizeof_;
14131int
14132main ()
14133{
14134static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14135test_array [0] = 0
14136
14137 ;
14138 return 0;
14139}
14140_ACEOF
14141rm -f conftest.$ac_objext
14142if { (ac_try="$ac_compile"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
14147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14148 (eval "$ac_compile") 2>conftest.er1
14149 ac_status=$?
14150 grep -v '^ *+' conftest.er1 >conftest.err
14151 rm -f conftest.er1
14152 cat conftest.err >&5
14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14154 (exit $ac_status); } && {
14155 test -z "$ac_c_werror_flag" ||
14156 test ! -s conftest.err
14157 } && test -s conftest.$ac_objext; then
14158 ac_hi=-1 ac_mid=-1
14159 while :; do
14160 cat >conftest.$ac_ext <<_ACEOF
14161/* confdefs.h. */
14162_ACEOF
14163cat confdefs.h >>conftest.$ac_ext
14164cat >>conftest.$ac_ext <<_ACEOF
14165/* end confdefs.h. */
14166
14167#ifdef HAVE_PTHREAD_H
14168#include <pthread.h>
14169#endif
14170
14171
14172 typedef pthread_t ac__type_sizeof_;
14173int
14174main ()
14175{
14176static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14177test_array [0] = 0
14178
14179 ;
14180 return 0;
14181}
14182_ACEOF
14183rm -f conftest.$ac_objext
14184if { (ac_try="$ac_compile"
14185case "(($ac_try" in
14186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14187 *) ac_try_echo=$ac_try;;
14188esac
14189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14190 (eval "$ac_compile") 2>conftest.er1
14191 ac_status=$?
14192 grep -v '^ *+' conftest.er1 >conftest.err
14193 rm -f conftest.er1
14194 cat conftest.err >&5
14195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14196 (exit $ac_status); } && {
14197 test -z "$ac_c_werror_flag" ||
14198 test ! -s conftest.err
14199 } && test -s conftest.$ac_objext; then
14200 ac_lo=$ac_mid; break
14201else
14202 echo "$as_me: failed program was:" >&5
14203sed 's/^/| /' conftest.$ac_ext >&5
14204
14205 ac_hi=`expr '(' $ac_mid ')' - 1`
14206 if test $ac_mid -le $ac_hi; then
14207 ac_lo= ac_hi=
14208 break
14209 fi
14210 ac_mid=`expr 2 '*' $ac_mid`
14211fi
14212
14213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14214 done
14215else
14216 echo "$as_me: failed program was:" >&5
14217sed 's/^/| /' conftest.$ac_ext >&5
14218
14219 ac_lo= ac_hi=
14220fi
14221
14222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14223fi
14224
14225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14226# Binary search between lo and hi bounds.
14227while test "x$ac_lo" != "x$ac_hi"; do
14228 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14229 cat >conftest.$ac_ext <<_ACEOF
14230/* confdefs.h. */
14231_ACEOF
14232cat confdefs.h >>conftest.$ac_ext
14233cat >>conftest.$ac_ext <<_ACEOF
14234/* end confdefs.h. */
14235
14236#ifdef HAVE_PTHREAD_H
14237#include <pthread.h>
14238#endif
14239
14240
14241 typedef pthread_t ac__type_sizeof_;
14242int
14243main ()
14244{
14245static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14246test_array [0] = 0
14247
14248 ;
14249 return 0;
14250}
14251_ACEOF
14252rm -f conftest.$ac_objext
14253if { (ac_try="$ac_compile"
14254case "(($ac_try" in
14255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256 *) ac_try_echo=$ac_try;;
14257esac
14258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14259 (eval "$ac_compile") 2>conftest.er1
14260 ac_status=$?
14261 grep -v '^ *+' conftest.er1 >conftest.err
14262 rm -f conftest.er1
14263 cat conftest.err >&5
14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14265 (exit $ac_status); } && {
14266 test -z "$ac_c_werror_flag" ||
14267 test ! -s conftest.err
14268 } && test -s conftest.$ac_objext; then
14269 ac_hi=$ac_mid
14270else
14271 echo "$as_me: failed program was:" >&5
14272sed 's/^/| /' conftest.$ac_ext >&5
14273
14274 ac_lo=`expr '(' $ac_mid ')' + 1`
14275fi
14276
14277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14278done
14279case $ac_lo in
14280?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14281'') if test "$ac_cv_type_pthread_t" = yes; then
14282 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14283See \`config.log' for more details." >&5
14284echo "$as_me: error: cannot compute sizeof (pthread_t)
14285See \`config.log' for more details." >&2;}
14286 { (exit 77); exit 77; }; }
14287 else
14288 ac_cv_sizeof_pthread_t=0
14289 fi ;;
14290esac
14291else
14292 cat >conftest.$ac_ext <<_ACEOF
14293/* confdefs.h. */
14294_ACEOF
14295cat confdefs.h >>conftest.$ac_ext
14296cat >>conftest.$ac_ext <<_ACEOF
14297/* end confdefs.h. */
14298
14299#ifdef HAVE_PTHREAD_H
14300#include <pthread.h>
14301#endif
14302
14303
14304 typedef pthread_t ac__type_sizeof_;
14305static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14306static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14307#include <stdio.h>
14308#include <stdlib.h>
14309int
14310main ()
14311{
14312
14313 FILE *f = fopen ("conftest.val", "w");
14314 if (! f)
14315 return 1;
14316 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14317 {
14318 long int i = longval ();
14319 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14320 return 1;
14321 fprintf (f, "%ld\n", i);
14322 }
14323 else
14324 {
14325 unsigned long int i = ulongval ();
14326 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14327 return 1;
14328 fprintf (f, "%lu\n", i);
14329 }
14330 return ferror (f) || fclose (f) != 0;
14331
14332 ;
14333 return 0;
14334}
Martin v. Löwis11437992002-04-12 09:54:03 +000014335_ACEOF
14336rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337if { (ac_try="$ac_link"
14338case "(($ac_try" in
14339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14340 *) ac_try_echo=$ac_try;;
14341esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014344 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014347 { (case "(($ac_try" in
14348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14349 *) ac_try_echo=$ac_try;;
14350esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014353 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014356 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014357else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014358 echo "$as_me: program exited with status $ac_status" >&5
14359echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014360sed 's/^/| /' conftest.$ac_ext >&5
14361
Martin v. Löwis11437992002-04-12 09:54:03 +000014362( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014363if test "$ac_cv_type_pthread_t" = yes; then
14364 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14365See \`config.log' for more details." >&5
14366echo "$as_me: error: cannot compute sizeof (pthread_t)
14367See \`config.log' for more details." >&2;}
14368 { (exit 77); exit 77; }; }
14369 else
14370 ac_cv_sizeof_pthread_t=0
14371 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373rm -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 +000014374fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014375rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014376fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014378echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014379
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014380
14381
Martin v. Löwis11437992002-04-12 09:54:03 +000014382cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014383#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014384_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014385
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014386
Trent Mick635f6fb2000-08-23 21:33:05 +000014387fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014388CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014389
Michael W. Hudson54241132001-12-07 15:38:26 +000014390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014391case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014392 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014393 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14394 ;;
14395 Darwin/*)
14396 OTHER_LIBTOOL_OPT=""
14397 ;;
14398esac
14399
14400
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014401ARCH_RUN_32BIT=""
14402
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014403case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014404 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014405 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14406 if test "${enable_universalsdk}"; then
14407 :
14408 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014409 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014410 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014412 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014413 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014414 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14415 if test ${gcc_version} '<' 4.0
14416 then
14417 LIBTOOL_CRUFT="-lcc_dynamic"
14418 else
14419 LIBTOOL_CRUFT=""
14420 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014421 if test "$cross_compiling" = yes; then
14422 ac_osx_32bit=no
14423else
14424 cat >conftest.$ac_ext <<_ACEOF
14425/* confdefs.h. */
14426_ACEOF
14427cat confdefs.h >>conftest.$ac_ext
14428cat >>conftest.$ac_ext <<_ACEOF
14429/* end confdefs.h. */
14430[
14431 #include <unistd.h>
14432 int main(int argc, char*argv[])
14433 {
14434 if (sizeof(long) == 4) {
14435 return 0;
14436 } else {
14437 return 1;
14438 }
14439 ]
14440_ACEOF
14441rm -f conftest$ac_exeext
14442if { (ac_try="$ac_link"
14443case "(($ac_try" in
14444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14445 *) ac_try_echo=$ac_try;;
14446esac
14447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14448 (eval "$ac_link") 2>&5
14449 ac_status=$?
14450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14452 { (case "(($ac_try" in
14453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14454 *) ac_try_echo=$ac_try;;
14455esac
14456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14457 (eval "$ac_try") 2>&5
14458 ac_status=$?
14459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14460 (exit $ac_status); }; }; then
14461 ac_osx_32bit=yes
14462else
14463 echo "$as_me: program exited with status $ac_status" >&5
14464echo "$as_me: failed program was:" >&5
14465sed 's/^/| /' conftest.$ac_ext >&5
14466
14467( exit $ac_status )
14468ac_osx_32bit=no
14469fi
14470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14471fi
14472
14473
14474
14475 if test "${ac_osx_32bit}" = "yes"; then
14476 case `arch` in
14477 i386)
14478 MACOSX_DEFAULT_ARCH="i386"
14479 ;;
14480 ppc)
14481 MACOSX_DEFAULT_ARCH="ppc"
14482 ;;
14483 *)
14484 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14485echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14486 { (exit 1); exit 1; }; }
14487 ;;
14488 esac
14489 else
14490 case `arch` in
14491 i386)
14492 MACOSX_DEFAULT_ARCH="x86_64"
14493 ;;
14494 ppc)
14495 MACOSX_DEFAULT_ARCH="ppc64"
14496 ;;
14497 *)
14498 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14499echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14500 { (exit 1); exit 1; }; }
14501 ;;
14502 esac
14503
14504 #ARCH_RUN_32BIT="true"
14505 fi
14506
14507 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014508 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014509 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014510esac
14511
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014512{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14513echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014514if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014515then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014516 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014518 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520cat >>confdefs.h <<\_ACEOF
14521#define WITH_NEXT_FRAMEWORK 1
14522_ACEOF
14523
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014524 { echo "$as_me:$LINENO: result: yes" >&5
14525echo "${ECHO_T}yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014526 if test $enable_shared = "yes"
14527 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014528 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14529echo "$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 +000014530 { (exit 1); exit 1; }; }
14531 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014532else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014533 { echo "$as_me:$LINENO: result: no" >&5
14534echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014535fi
14536
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014537{ echo "$as_me:$LINENO: checking for dyld" >&5
14538echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014539case $ac_sys_system/$ac_sys_release in
14540 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014541
Martin v. Löwis11437992002-04-12 09:54:03 +000014542cat >>confdefs.h <<\_ACEOF
14543#define WITH_DYLD 1
14544_ACEOF
14545
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014546 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14547echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014548 ;;
14549 *)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014550 { echo "$as_me:$LINENO: result: no" >&5
14551echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014552 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014553esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014554
Guido van Rossum0a516c91994-09-12 10:58:40 +000014555# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014556
Michael W. Hudson54241132001-12-07 15:38:26 +000014557
14558
14559
14560
Guido van Rossum0a516c91994-09-12 10:58:40 +000014561# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014562# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014563{ echo "$as_me:$LINENO: checking SO" >&5
14564echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565if test -z "$SO"
14566then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014567 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014568 hp*|HP*)
14569 case `uname -m` in
14570 ia64) SO=.so;;
14571 *) SO=.sl;;
14572 esac
14573 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014574 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014575 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014576 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014577else
14578 # this might also be a termcap variable, see #610332
14579 echo
14580 echo '====================================================================='
14581 echo '+ +'
14582 echo '+ WARNING: You have set SO in your environment. +'
14583 echo '+ Do you really mean to change the extension for shared libraries? +'
14584 echo '+ Continuing in 10 seconds to let you to ponder. +'
14585 echo '+ +'
14586 echo '====================================================================='
14587 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014588fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014589{ echo "$as_me:$LINENO: result: $SO" >&5
14590echo "${ECHO_T}$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014591
Georg Brandlb1441c72009-01-03 22:33:39 +000014592
Thomas Wouters477c8d52006-05-27 19:21:47 +000014593cat >>confdefs.h <<_ACEOF
14594#define SHLIB_EXT "$SO"
14595_ACEOF
14596
Guido van Rossum0a516c91994-09-12 10:58:40 +000014597# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014598# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014599# (Shared libraries in this instance are shared modules to be loaded into
14600# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014601{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14602echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014603if test -z "$LDSHARED"
14604then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014605 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014606 AIX*)
14607 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014608 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014609 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014610 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014611 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014612 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014613 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014614 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014615 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014616 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014617 hp*|HP*)
14618 if test "$GCC" = "yes"
14619 then LDSHARED='$(CC) -shared'
14620 else LDSHARED='ld -b';
14621 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014622 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014623 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014624 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14625 if test "$enable_framework" ; then
14626 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014627 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14628 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014629 else
14630 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014631 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014632 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014633 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014634 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14635 if test "$enable_framework" ; then
14636 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014637 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14638 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014639 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014640 # No framework, use the Python app as bundle-loader
14641 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014642 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014643 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014644 Darwin/*)
14645 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14646 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014647
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014648 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014649 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014650 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014651 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014652 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014653 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14654 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014655 else
14656 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14657 if test "$enable_framework" ; then
14658 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014659 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14660 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014661 else
14662 # No framework, use the Python app as bundle-loader
14663 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14664 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14665 fi
14666 fi
14667 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014668 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014669 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014670 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014672 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014673 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014674 else
14675 LDSHARED="ld -Bshareable ${LDFLAGS}"
14676 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014677 OpenBSD*)
14678 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14679 then
14680 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14681 else
14682 case `uname -r` in
14683 [01].* | 2.[0-7] | 2.[0-7].*)
14684 LDSHARED="ld -Bshareable ${LDFLAGS}"
14685 ;;
14686 *)
14687 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14688 ;;
14689 esac
14690 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014691 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014692 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014693 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014694 then LDSHARED='$(CC) -shared'
14695 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014696 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014697 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000014698 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014699 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014700 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701 *) LDSHARED="ld";;
14702 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014703fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014704{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14705echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014706BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014707# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014708# library (module) -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014709{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14710echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014711if test -z "$CCSHARED"
14712then
Guido van Rossum07397971997-04-29 21:49:50 +000014713 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014714 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014715 then CCSHARED="-fPIC";
14716 elif test `uname -p` = sparc;
14717 then CCSHARED="-xcode=pic32";
14718 else CCSHARED="-Kpic";
14719 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014720 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014721 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014722 else CCSHARED="+z";
14723 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014724 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014725 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014726 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014727 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014728 if test "$GCC" = "yes"
14729 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014730 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014731 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014732 SCO_SV*)
14733 if test "$GCC" = "yes"
14734 then CCSHARED="-fPIC"
14735 else CCSHARED="-Kpic -belf"
14736 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000014737 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014738 IRIX*/6*) case $CC in
14739 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014740 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014741 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014742 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014743 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014744fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014745{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14746echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014747# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014748# the python executable -- this is only needed for a few systems
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014749{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14750echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014751if test -z "$LINKFORSHARED"
14752then
Guido van Rossum07397971997-04-29 21:49:50 +000014753 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014754 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014755 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014756 LINKFORSHARED="-Wl,-E -Wl,+s";;
14757# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014758 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014759 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014760 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014762 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014763 if test "$enable_framework"
14764 then
Jack Jansenda49e192005-01-07 13:08:22 +000014765 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014766 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014767 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014768 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014769 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014770 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014771 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014772 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14773 then
14774 LINKFORSHARED="-Wl,--export-dynamic"
14775 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014776 SunOS/5*) case $CC in
14777 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014778 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014779 then
14780 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014781 fi;;
14782 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014783 CYGWIN*)
14784 if test $enable_shared = "no"
14785 then
14786 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14787 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014788 QNX*)
14789 # -Wl,-E causes the symbols to be added to the dynamic
14790 # symbol table so that they can be found when a module
14791 # is loaded. -N 2048K causes the stack size to be set
14792 # to 2048 kilobytes so that the stack doesn't overflow
14793 # when running test_compile.py.
14794 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014795 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014797{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14798echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014799
Michael W. Hudson54241132001-12-07 15:38:26 +000014800
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014801
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014802{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14803echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014804if test ! "$LIBRARY" = "$LDLIBRARY"
14805then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014806 case $ac_sys_system in
14807 CYGWIN*)
14808 # Cygwin needs CCSHARED when building extension DLLs
14809 # but not when building the interpreter DLL.
14810 CFLAGSFORSHARED='';;
14811 *)
14812 CFLAGSFORSHARED='$(CCSHARED)'
14813 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014814fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014815{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14816echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014817
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014818# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14819# library (with --enable-shared).
14820# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014821# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14822# if it is not required, since it creates a dependency of the shared library
14823# to LIBS. This, in turn, means that applications linking the shared libpython
14824# don't need to link LIBS explicitly. The default should be only changed
14825# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014826
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014827{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14828echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014829case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014830 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014831 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014832esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014833{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14834echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014835
14836
Guido van Rossum627b2d71993-12-24 10:39:16 +000014837# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014839{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14840echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014841if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014843else
Martin v. Löwis11437992002-04-12 09:54:03 +000014844 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014845LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014846cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014847/* confdefs.h. */
14848_ACEOF
14849cat confdefs.h >>conftest.$ac_ext
14850cat >>conftest.$ac_ext <<_ACEOF
14851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853/* Override any GCC internal prototype to avoid an error.
14854 Use char because int might match the return type of a GCC
14855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014856#ifdef __cplusplus
14857extern "C"
14858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014859char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014860int
14861main ()
14862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 ;
14865 return 0;
14866}
14867_ACEOF
14868rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869if { (ac_try="$ac_link"
14870case "(($ac_try" in
14871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14872 *) ac_try_echo=$ac_try;;
14873esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014877 grep -v '^ *+' conftest.er1 >conftest.err
14878 rm -f conftest.er1
14879 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014881 (exit $ac_status); } && {
14882 test -z "$ac_c_werror_flag" ||
14883 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014884 } && test -s conftest$ac_exeext &&
14885 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014887else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014889sed 's/^/| /' conftest.$ac_ext >&5
14890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014892fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893
14894rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014897fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014898{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14899echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14900if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014901 cat >>confdefs.h <<_ACEOF
14902#define HAVE_LIBDL 1
14903_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014904
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014905 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014907fi
14908 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014909
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014910{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14911echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014912if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014913 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014916LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* confdefs.h. */
14919_ACEOF
14920cat confdefs.h >>conftest.$ac_ext
14921cat >>conftest.$ac_ext <<_ACEOF
14922/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924/* Override any GCC internal prototype to avoid an error.
14925 Use char because int might match the return type of a GCC
14926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014927#ifdef __cplusplus
14928extern "C"
14929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014930char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014931int
14932main ()
14933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ;
14936 return 0;
14937}
14938_ACEOF
14939rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940if { (ac_try="$ac_link"
14941case "(($ac_try" in
14942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14943 *) ac_try_echo=$ac_try;;
14944esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014948 grep -v '^ *+' conftest.er1 >conftest.err
14949 rm -f conftest.er1
14950 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952 (exit $ac_status); } && {
14953 test -z "$ac_c_werror_flag" ||
14954 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014955 } && test -s conftest$ac_exeext &&
14956 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014958else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014960sed 's/^/| /' conftest.$ac_ext >&5
14961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014964
14965rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014967LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014968fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014969{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14970echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14971if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 cat >>confdefs.h <<_ACEOF
14973#define HAVE_LIBDLD 1
14974_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014975
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014976 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014977
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014978fi
14979 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014980
Georg Brandlb1441c72009-01-03 22:33:39 +000014981# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014982if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014983 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14984echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014985if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014986 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014987else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014988 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014990/* confdefs.h. */
14991_ACEOF
14992cat confdefs.h >>conftest.$ac_ext
14993cat >>conftest.$ac_ext <<_ACEOF
14994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996/* Override any GCC internal prototype to avoid an error.
14997 Use char because int might match the return type of a GCC
14998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014999#ifdef __cplusplus
15000extern "C"
15001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015002char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015003int
15004main ()
15005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015007 ;
15008 return 0;
15009}
15010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011for ac_lib in '' pthread rt posix4; do
15012 if test -z "$ac_lib"; then
15013 ac_res="none required"
15014 else
15015 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017 fi
15018 rm -f conftest.$ac_objext conftest$ac_exeext
15019if { (ac_try="$ac_link"
15020case "(($ac_try" in
15021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15022 *) ac_try_echo=$ac_try;;
15023esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015026 ac_status=$?
15027 grep -v '^ *+' conftest.er1 >conftest.err
15028 rm -f conftest.er1
15029 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031 (exit $ac_status); } && {
15032 test -z "$ac_c_werror_flag" ||
15033 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015034 } && test -s conftest$ac_exeext &&
15035 $as_test_x conftest$ac_exeext; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015037else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015038 echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015039sed 's/^/| /' conftest.$ac_ext >&5
15040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041
Thomas Wouters477c8d52006-05-27 19:21:47 +000015042fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043
15044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15045 conftest$ac_exeext
15046 if test "${ac_cv_search_sem_init+set}" = set; then
15047 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015049done
15050if test "${ac_cv_search_sem_init+set}" = set; then
15051 :
15052else
15053 ac_cv_search_sem_init=no
15054fi
15055rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015056LIBS=$ac_func_search_save_LIBS
15057fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015058{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15059echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060ac_res=$ac_cv_search_sem_init
15061if test "$ac_res" != no; then
15062 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015063
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015064fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015065 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015066 # posix4 on Solaris 2.6
15067 # pthread (first!) on Linux
15068fi
15069
Martin v. Löwis19d17342003-06-14 21:03:05 +000015070# check if we need libintl for locale functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015071{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15072echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015073if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015074 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075else
15076 ac_check_lib_save_LIBS=$LIBS
15077LIBS="-lintl $LIBS"
15078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015079/* confdefs.h. */
15080_ACEOF
15081cat confdefs.h >>conftest.$ac_ext
15082cat >>conftest.$ac_ext <<_ACEOF
15083/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085/* Override any GCC internal prototype to avoid an error.
15086 Use char because int might match the return type of a GCC
15087 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015088#ifdef __cplusplus
15089extern "C"
15090#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015091char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015092int
15093main ()
15094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015096 ;
15097 return 0;
15098}
15099_ACEOF
15100rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101if { (ac_try="$ac_link"
15102case "(($ac_try" in
15103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15104 *) ac_try_echo=$ac_try;;
15105esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015109 grep -v '^ *+' conftest.er1 >conftest.err
15110 rm -f conftest.er1
15111 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113 (exit $ac_status); } && {
15114 test -z "$ac_c_werror_flag" ||
15115 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015116 } && test -s conftest$ac_exeext &&
15117 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015118 ac_cv_lib_intl_textdomain=yes
15119else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015121sed 's/^/| /' conftest.$ac_ext >&5
15122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125
15126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015128LIBS=$ac_check_lib_save_LIBS
15129fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015130{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15131echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15132if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015133
15134cat >>confdefs.h <<\_ACEOF
15135#define WITH_LIBINTL 1
15136_ACEOF
15137
Brett Cannonc6d936e2009-06-07 20:09:53 +000015138 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015139fi
15140
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015141
15142# checks for system dependent C++ extensions support
15143case "$ac_sys_system" in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015144 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15145echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* confdefs.h. */
15148_ACEOF
15149cat confdefs.h >>conftest.$ac_ext
15150cat >>conftest.$ac_ext <<_ACEOF
15151/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015152#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153int
15154main ()
15155{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015156loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ;
15158 return 0;
15159}
15160_ACEOF
15161rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162if { (ac_try="$ac_link"
15163case "(($ac_try" in
15164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15165 *) ac_try_echo=$ac_try;;
15166esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015170 grep -v '^ *+' conftest.er1 >conftest.err
15171 rm -f conftest.er1
15172 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 (exit $ac_status); } && {
15175 test -z "$ac_c_werror_flag" ||
15176 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015177 } && test -s conftest$ac_exeext &&
15178 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015179
Martin v. Löwis11437992002-04-12 09:54:03 +000015180cat >>confdefs.h <<\_ACEOF
15181#define AIX_GENUINE_CPLUSPLUS 1
15182_ACEOF
15183
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015184 { echo "$as_me:$LINENO: result: yes" >&5
15185echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015186else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015188sed 's/^/| /' conftest.$ac_ext >&5
15189
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015190 { echo "$as_me:$LINENO: result: no" >&5
15191echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193
15194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015196 *) ;;
15197esac
15198
Guido van Rossum70c7f481998-03-26 18:44:10 +000015199# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015200{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15201echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015202if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015203 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015204else
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015206LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015208/* confdefs.h. */
15209_ACEOF
15210cat confdefs.h >>conftest.$ac_ext
15211cat >>conftest.$ac_ext <<_ACEOF
15212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214/* Override any GCC internal prototype to avoid an error.
15215 Use char because int might match the return type of a GCC
15216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015217#ifdef __cplusplus
15218extern "C"
15219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015220char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015221int
15222main ()
15223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ;
15226 return 0;
15227}
15228_ACEOF
15229rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230if { (ac_try="$ac_link"
15231case "(($ac_try" in
15232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15233 *) ac_try_echo=$ac_try;;
15234esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015236 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015238 grep -v '^ *+' conftest.er1 >conftest.err
15239 rm -f conftest.er1
15240 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 (exit $ac_status); } && {
15243 test -z "$ac_c_werror_flag" ||
15244 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015245 } && test -s conftest$ac_exeext &&
15246 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015248else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015250sed 's/^/| /' conftest.$ac_ext >&5
15251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254
15255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015256 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015257LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015258fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015259{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15260echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15261if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015262 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015263fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015264 # SVR4
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015265{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15266echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015267if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015269else
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015271LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015273/* confdefs.h. */
15274_ACEOF
15275cat confdefs.h >>conftest.$ac_ext
15276cat >>conftest.$ac_ext <<_ACEOF
15277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279/* Override any GCC internal prototype to avoid an error.
15280 Use char because int might match the return type of a GCC
15281 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015282#ifdef __cplusplus
15283extern "C"
15284#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015285char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015286int
15287main ()
15288{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 ;
15291 return 0;
15292}
15293_ACEOF
15294rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295if { (ac_try="$ac_link"
15296case "(($ac_try" in
15297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15298 *) ac_try_echo=$ac_try;;
15299esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015303 grep -v '^ *+' conftest.er1 >conftest.err
15304 rm -f conftest.er1
15305 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015307 (exit $ac_status); } && {
15308 test -z "$ac_c_werror_flag" ||
15309 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015310 } && test -s conftest$ac_exeext &&
15311 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015313else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015315sed 's/^/| /' conftest.$ac_ext >&5
15316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319
15320rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015322LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015323fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015324{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15325echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15326if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015327 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015328fi
15329 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015330
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015331{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15332echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015335if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336 withval=$with_libs;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015337{ echo "$as_me:$LINENO: result: $withval" >&5
15338echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015339LIBS="$withval $LIBS"
15340
15341else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015342 { echo "$as_me:$LINENO: result: no" >&5
15343echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344fi
15345
Guido van Rossum7f43da71994-08-01 12:15:30 +000015346
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015347# Check for use of the system libffi library
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015348{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15349echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015352if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353 withval=$with_system_ffi;
15354fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015355
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015356
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015357{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15358echo "${ECHO_T}$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015359
Matthias Klose55708cc2009-04-30 08:06:49 +000015360# Check for --with-dbmliborder
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015361{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15362echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015363
15364# Check whether --with-dbmliborder was given.
15365if test "${with_dbmliborder+set}" = set; then
15366 withval=$with_dbmliborder;
15367if test x$with_dbmliborder = xyes
15368then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015369{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15370echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015371 { (exit 1); exit 1; }; }
15372else
15373 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15374 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15375 then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015376 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15377echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015378 { (exit 1); exit 1; }; }
15379 fi
15380 done
15381fi
15382fi
15383
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015384{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15385echo "${ECHO_T}$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015386
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015387# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015388
15389
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015390{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15391echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015393# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015394if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395 withval=$with_signal_module;
15396fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015397
15398
15399if test -z "$with_signal_module"
15400then with_signal_module="yes"
15401fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015402{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15403echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015404
15405if test "${with_signal_module}" = "yes"; then
15406 USE_SIGNAL_MODULE=""
15407 SIGNAL_OBJS=""
15408else
15409 USE_SIGNAL_MODULE="#"
15410 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15411fi
15412
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015413# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015414
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015415USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015416
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015417{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15418echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015419
Guido van Rossumec2f0731997-01-22 20:54:01 +000015420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015422if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423 withval=$with_dec_threads;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015424{ echo "$as_me:$LINENO: result: $withval" >&5
15425echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015426LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015427if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015428 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015429fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015430else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015431 { echo "$as_me:$LINENO: result: no" >&5
15432echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433fi
15434
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
15436# Templates for things AC_DEFINEd more than once.
15437# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015438
15439
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
15441
15442
15443
15444
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015445{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15446echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015448# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015449if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450 withval=$with_threads;
15451fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015452
15453
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015454# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015457if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458 withval=$with_thread; with_threads=$with_thread
15459fi
15460
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015461
15462if test -z "$with_threads"
15463then with_threads="yes"
15464fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015465{ echo "$as_me:$LINENO: result: $with_threads" >&5
15466echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015467
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015468
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015469if test "$with_threads" = "no"
15470then
15471 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015472elif test "$ac_cv_pthread_is_default" = yes
15473then
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015475#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015476_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015477
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015478 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015480#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015481_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015482
15483 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015485elif test "$ac_cv_kpthread" = "yes"
15486then
15487 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015488 if test "$ac_cv_cxx_thread" = "yes"; then
15489 CXX="$CXX -Kpthread"
15490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015492#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015493_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015495 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015496 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015497elif test "$ac_cv_kthread" = "yes"
15498then
15499 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015500 if test "$ac_cv_cxx_thread" = "yes"; then
15501 CXX="$CXX -Kthread"
15502 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015503 cat >>confdefs.h <<\_ACEOF
15504#define WITH_THREAD 1
15505_ACEOF
15506
15507 posix_threads=yes
15508 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015509elif test "$ac_cv_pthread" = "yes"
15510then
15511 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015512 if test "$ac_cv_cxx_thread" = "yes"; then
15513 CXX="$CXX -pthread"
15514 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015515 cat >>confdefs.h <<\_ACEOF
15516#define WITH_THREAD 1
15517_ACEOF
15518
15519 posix_threads=yes
15520 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015521else
15522 if test ! -z "$with_threads" -a -d "$with_threads"
15523 then LDFLAGS="$LDFLAGS -L$with_threads"
15524 fi
15525 if test ! -z "$withval" -a -d "$withval"
15526 then LDFLAGS="$LDFLAGS -L$withval"
15527 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015528
15529 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015530 # define _POSIX_THREADS in unistd.h. Some apparently don't
15531 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015532 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15533echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015535/* confdefs.h. */
15536_ACEOF
15537cat confdefs.h >>conftest.$ac_ext
15538cat >>conftest.$ac_ext <<_ACEOF
15539/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015540
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015541#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015542#ifdef _POSIX_THREADS
15543yes
15544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
15546_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015548 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015549 unistd_defines_pthreads=yes
15550else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015551 unistd_defines_pthreads=no
15552fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000015553rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015554
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015555 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15556echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015559#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015560_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015561
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015563 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15564echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015565if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015566 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015567fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015568{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15569echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015570else
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015572{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15573echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015574cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* confdefs.h. */
15576_ACEOF
15577cat confdefs.h >>conftest.$ac_ext
15578cat >>conftest.$ac_ext <<_ACEOF
15579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015580$ac_includes_default
15581#include <cthreads.h>
15582_ACEOF
15583rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015584if { (ac_try="$ac_compile"
15585case "(($ac_try" in
15586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15587 *) ac_try_echo=$ac_try;;
15588esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015592 grep -v '^ *+' conftest.er1 >conftest.err
15593 rm -f conftest.er1
15594 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596 (exit $ac_status); } && {
15597 test -z "$ac_c_werror_flag" ||
15598 test ! -s conftest.err
15599 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015600 ac_header_compiler=yes
15601else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015603sed 's/^/| /' conftest.$ac_ext >&5
15604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607
15608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015609{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15610echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
15612# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015613{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15614echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015616/* confdefs.h. */
15617_ACEOF
15618cat confdefs.h >>conftest.$ac_ext
15619cat >>conftest.$ac_ext <<_ACEOF
15620/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015621#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623if { (ac_try="$ac_cpp conftest.$ac_ext"
15624case "(($ac_try" in
15625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15626 *) ac_try_echo=$ac_try;;
15627esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015631 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015632 rm -f conftest.er1
15633 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635 (exit $ac_status); } >/dev/null && {
15636 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15637 test ! -s conftest.err
15638 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 ac_header_preproc=yes
15640else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015642sed 's/^/| /' conftest.$ac_ext >&5
15643
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015645fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015646
Martin v. Löwis11437992002-04-12 09:54:03 +000015647rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015648{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15649echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
15651# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015652case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15653 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015654 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15655echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15656 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15657echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015658 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015659 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015660 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015661 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15662echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15663 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15664echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15665 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15666echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15667 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15668echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15669 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15670echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15671 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15672echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015674## -------------------------------------- ##
15675## Report this to http://bugs.python.org/ ##
15676## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015677_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015679 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015680esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015681{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15682echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015683if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015684 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015685else
15686 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015687fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015688{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15689echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
15691fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015692if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015694#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015695_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015698#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015699_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015700
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015703#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015704_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015705
15706 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015707 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015708else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015709
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015711 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15712echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015713if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015714 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015715fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015716{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15717echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015718else
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015720{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15721echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* confdefs.h. */
15724_ACEOF
15725cat confdefs.h >>conftest.$ac_ext
15726cat >>conftest.$ac_ext <<_ACEOF
15727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015728$ac_includes_default
15729#include <mach/cthreads.h>
15730_ACEOF
15731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732if { (ac_try="$ac_compile"
15733case "(($ac_try" in
15734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15735 *) ac_try_echo=$ac_try;;
15736esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015740 grep -v '^ *+' conftest.er1 >conftest.err
15741 rm -f conftest.er1
15742 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744 (exit $ac_status); } && {
15745 test -z "$ac_c_werror_flag" ||
15746 test ! -s conftest.err
15747 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 ac_header_compiler=yes
15749else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015751sed 's/^/| /' conftest.$ac_ext >&5
15752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755
15756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015757{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15758echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015759
15760# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015761{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15762echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015764/* confdefs.h. */
15765_ACEOF
15766cat confdefs.h >>conftest.$ac_ext
15767cat >>conftest.$ac_ext <<_ACEOF
15768/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015769#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015770_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771if { (ac_try="$ac_cpp conftest.$ac_ext"
15772case "(($ac_try" in
15773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15774 *) ac_try_echo=$ac_try;;
15775esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015779 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 rm -f conftest.er1
15781 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 (exit $ac_status); } >/dev/null && {
15784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15785 test ! -s conftest.err
15786 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 ac_header_preproc=yes
15788else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015789 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015790sed 's/^/| /' conftest.$ac_ext >&5
15791
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794
Martin v. Löwis11437992002-04-12 09:54:03 +000015795rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015796{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15797echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
15799# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015800case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15801 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015802 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15803echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15804 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15805echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015806 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015807 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015808 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015809 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15810echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15811 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15812echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15813 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15814echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15815 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15816echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15817 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15818echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15819 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15820echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015822## -------------------------------------- ##
15823## Report this to http://bugs.python.org/ ##
15824## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015825_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015827 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015828esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015829{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15830echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015831if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015832 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015833else
15834 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015835fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015836{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15837echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015840if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015842#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015843_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015846#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015847_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
15850cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015851#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015852_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015853
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015854 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015855else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015856
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015857 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15858echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015861if test "${with_pth+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015862 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15863echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015864 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015865#define WITH_THREAD 1
15866_ACEOF
15867
15868
15869cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015870#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015871_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015872
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015873 LIBS="-lpth $LIBS"
15874 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015875else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015876 { echo "$as_me:$LINENO: result: no" >&5
15877echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015878
15879 # Just looking for pthread_create in libpthread is not enough:
15880 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15881 # So we really have to include pthread.h, and then link.
15882 _libs=$LIBS
15883 LIBS="$LIBS -lpthread"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015884 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15885echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015892#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015893
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015894void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015895int
15896main ()
15897{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015898
15899pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015900 ;
15901 return 0;
15902}
15903_ACEOF
15904rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015905if { (ac_try="$ac_link"
15906case "(($ac_try" in
15907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15908 *) ac_try_echo=$ac_try;;
15909esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015913 grep -v '^ *+' conftest.er1 >conftest.err
15914 rm -f conftest.er1
15915 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917 (exit $ac_status); } && {
15918 test -z "$ac_c_werror_flag" ||
15919 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015920 } && test -s conftest$ac_exeext &&
15921 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015923 { echo "$as_me:$LINENO: result: yes" >&5
15924echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015926#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015928
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015929 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015930 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015931else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015933sed 's/^/| /' conftest.$ac_ext >&5
15934
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015936 LIBS=$_libs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015937 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
15938echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015939if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015940 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015941else
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015943/* confdefs.h. */
15944_ACEOF
15945cat confdefs.h >>conftest.$ac_ext
15946cat >>conftest.$ac_ext <<_ACEOF
15947/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015948/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15949 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15950#define pthread_detach innocuous_pthread_detach
15951
Guido van Rossumad678af1998-10-02 14:42:15 +000015952/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015953 which can conflict with char pthread_detach (); below.
15954 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015955 <limits.h> exists even on freestanding compilers. */
15956
15957#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015958# include <limits.h>
15959#else
15960# include <assert.h>
15961#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015962
15963#undef pthread_detach
15964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015965/* Override any GCC internal prototype to avoid an error.
15966 Use char because int might match the return type of a GCC
15967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015968#ifdef __cplusplus
15969extern "C"
15970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015971char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015972/* The GNU C library defines this for functions which it implements
15973 to always fail with ENOSYS. Some functions are actually named
15974 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015975#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015976choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015977#endif
15978
Skip Montanaro6dead952003-09-25 14:50:04 +000015979int
15980main ()
15981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 ;
15984 return 0;
15985}
15986_ACEOF
15987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015988if { (ac_try="$ac_link"
15989case "(($ac_try" in
15990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15991 *) ac_try_echo=$ac_try;;
15992esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015996 grep -v '^ *+' conftest.er1 >conftest.err
15997 rm -f conftest.er1
15998 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000 (exit $ac_status); } && {
16001 test -z "$ac_c_werror_flag" ||
16002 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016003 } && test -s conftest$ac_exeext &&
16004 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016006else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016008sed 's/^/| /' conftest.$ac_ext >&5
16009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012
16013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016014 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016015fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016016{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16017echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16018if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016019 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016020#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016022
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016023 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016024 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016025else
Guido van Rossumad678af1998-10-02 14:42:15 +000016026
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016027 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016028 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16029echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016030if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016031 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016032fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016033{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16034echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016035else
16036 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016037{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16038echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016040/* confdefs.h. */
16041_ACEOF
16042cat confdefs.h >>conftest.$ac_ext
16043cat >>conftest.$ac_ext <<_ACEOF
16044/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016045$ac_includes_default
16046#include <atheos/threads.h>
16047_ACEOF
16048rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049if { (ac_try="$ac_compile"
16050case "(($ac_try" in
16051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16052 *) ac_try_echo=$ac_try;;
16053esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016057 grep -v '^ *+' conftest.er1 >conftest.err
16058 rm -f conftest.er1
16059 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061 (exit $ac_status); } && {
16062 test -z "$ac_c_werror_flag" ||
16063 test ! -s conftest.err
16064 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016065 ac_header_compiler=yes
16066else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016068sed 's/^/| /' conftest.$ac_ext >&5
16069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016072
16073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016074{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16075echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016076
16077# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016078{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16079echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016081/* confdefs.h. */
16082_ACEOF
16083cat confdefs.h >>conftest.$ac_ext
16084cat >>conftest.$ac_ext <<_ACEOF
16085/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016086#include <atheos/threads.h>
16087_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088if { (ac_try="$ac_cpp conftest.$ac_ext"
16089case "(($ac_try" in
16090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16091 *) ac_try_echo=$ac_try;;
16092esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016095 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016096 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016097 rm -f conftest.er1
16098 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 (exit $ac_status); } >/dev/null && {
16101 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16102 test ! -s conftest.err
16103 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016104 ac_header_preproc=yes
16105else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016106 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016107sed 's/^/| /' conftest.$ac_ext >&5
16108
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016109 ac_header_preproc=no
16110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016112rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016113{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16114echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016115
16116# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016117case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16118 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016119 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16120echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16121 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16122echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016123 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016124 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016125 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016126 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16127echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16128 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16129echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16130 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16131echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16132 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16133echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16134 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16135echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16136 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16137echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016139## -------------------------------------- ##
16140## Report this to http://bugs.python.org/ ##
16141## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016142_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016144 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016145esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016146{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16147echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016148if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016149 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016150else
16151 ac_cv_header_atheos_threads_h=$ac_header_preproc
16152fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016153{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16154echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016155
16156fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016157if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016158 cat >>confdefs.h <<\_ACEOF
16159#define WITH_THREAD 1
16160_ACEOF
16161
16162
16163cat >>confdefs.h <<\_ACEOF
16164#define ATHEOS_THREADS 1
16165_ACEOF
16166
16167 THREADOBJ="Python/thread.o"
16168else
16169
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016170 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16171echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016172if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016173 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016174else
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016176LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016177cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016178/* confdefs.h. */
16179_ACEOF
16180cat confdefs.h >>conftest.$ac_ext
16181cat >>conftest.$ac_ext <<_ACEOF
16182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184/* Override any GCC internal prototype to avoid an error.
16185 Use char because int might match the return type of a GCC
16186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016187#ifdef __cplusplus
16188extern "C"
16189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016190char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016191int
16192main ()
16193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 ;
16196 return 0;
16197}
16198_ACEOF
16199rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200if { (ac_try="$ac_link"
16201case "(($ac_try" in
16202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16203 *) ac_try_echo=$ac_try;;
16204esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016208 grep -v '^ *+' conftest.er1 >conftest.err
16209 rm -f conftest.er1
16210 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 (exit $ac_status); } && {
16213 test -z "$ac_c_werror_flag" ||
16214 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016215 } && test -s conftest$ac_exeext &&
16216 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016217 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016218else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016220sed 's/^/| /' conftest.$ac_ext >&5
16221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224
16225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016227LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016228fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016229{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16230echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16231if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016233#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016234_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016236 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016237 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016238 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016239else
Greg Steinadf63d62000-07-05 10:38:09 +000016240
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016241 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16242echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016243if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016244 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016245else
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016247LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016249/* confdefs.h. */
16250_ACEOF
16251cat confdefs.h >>conftest.$ac_ext
16252cat >>conftest.$ac_ext <<_ACEOF
16253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255/* Override any GCC internal prototype to avoid an error.
16256 Use char because int might match the return type of a GCC
16257 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016258#ifdef __cplusplus
16259extern "C"
16260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016261char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016262int
16263main ()
16264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ;
16267 return 0;
16268}
16269_ACEOF
16270rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271if { (ac_try="$ac_link"
16272case "(($ac_try" in
16273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16274 *) ac_try_echo=$ac_try;;
16275esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016279 grep -v '^ *+' conftest.er1 >conftest.err
16280 rm -f conftest.er1
16281 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 (exit $ac_status); } && {
16284 test -z "$ac_c_werror_flag" ||
16285 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016286 } && test -s conftest$ac_exeext &&
16287 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016289else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016291sed 's/^/| /' conftest.$ac_ext >&5
16292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295
16296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016298LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016299fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016300{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16301echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16302if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016304#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016305_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016307 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016308 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016309 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016310else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016311
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016312 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16313echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016314if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016316else
Martin v. Löwis11437992002-04-12 09:54:03 +000016317 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016318LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016320/* confdefs.h. */
16321_ACEOF
16322cat confdefs.h >>conftest.$ac_ext
16323cat >>conftest.$ac_ext <<_ACEOF
16324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016325
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326/* Override any GCC internal prototype to avoid an error.
16327 Use char because int might match the return type of a GCC
16328 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016329#ifdef __cplusplus
16330extern "C"
16331#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016332char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016333int
16334main ()
16335{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016336return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 ;
16338 return 0;
16339}
16340_ACEOF
16341rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342if { (ac_try="$ac_link"
16343case "(($ac_try" in
16344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16345 *) ac_try_echo=$ac_try;;
16346esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016350 grep -v '^ *+' conftest.er1 >conftest.err
16351 rm -f conftest.er1
16352 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354 (exit $ac_status); } && {
16355 test -z "$ac_c_werror_flag" ||
16356 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016357 } && test -s conftest$ac_exeext &&
16358 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016360else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016362sed 's/^/| /' conftest.$ac_ext >&5
16363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366
16367rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016368 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016369LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016370fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016371{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16372echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16373if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016375#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016376_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016377
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016378 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016379 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016380 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016381else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016382
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016383 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16384echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016385if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016387else
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016389LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016391/* confdefs.h. */
16392_ACEOF
16393cat confdefs.h >>conftest.$ac_ext
16394cat >>conftest.$ac_ext <<_ACEOF
16395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397/* Override any GCC internal prototype to avoid an error.
16398 Use char because int might match the return type of a GCC
16399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016400#ifdef __cplusplus
16401extern "C"
16402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016403char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016404int
16405main ()
16406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016408 ;
16409 return 0;
16410}
16411_ACEOF
16412rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413if { (ac_try="$ac_link"
16414case "(($ac_try" in
16415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16416 *) ac_try_echo=$ac_try;;
16417esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016421 grep -v '^ *+' conftest.er1 >conftest.err
16422 rm -f conftest.er1
16423 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 (exit $ac_status); } && {
16426 test -z "$ac_c_werror_flag" ||
16427 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016428 } && test -s conftest$ac_exeext &&
16429 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016431else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016433sed 's/^/| /' conftest.$ac_ext >&5
16434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437
16438rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016440LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016441fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016442{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16443echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16444if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016446#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016447_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016448
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016449 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016450 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016451 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016452else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016453
Martin v. Löwis130fb172001-07-19 11:00:41 +000016454 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016455fi
16456
Guido van Rossum627b2d71993-12-24 10:39:16 +000016457
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016458fi
16459
Guido van Rossum0be3e491997-05-22 20:33:33 +000016460fi
16461
Guido van Rossum49545951997-12-02 19:28:29 +000016462fi
16463
Guido van Rossumb93a8621998-05-07 13:27:32 +000016464fi
16465
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016466
Michael W. Hudson54241132001-12-07 15:38:26 +000016467fi
16468
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470
16471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016472 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473fi
16474
Martin v. Löwis11437992002-04-12 09:54:03 +000016475fi
16476
16477
16478fi
16479
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016480
Michael W. Hudson54241132001-12-07 15:38:26 +000016481
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016482 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16483echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016484if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016486else
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016490/* confdefs.h. */
16491_ACEOF
16492cat confdefs.h >>conftest.$ac_ext
16493cat >>conftest.$ac_ext <<_ACEOF
16494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496/* Override any GCC internal prototype to avoid an error.
16497 Use char because int might match the return type of a GCC
16498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016499#ifdef __cplusplus
16500extern "C"
16501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016502char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016503int
16504main ()
16505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016507 ;
16508 return 0;
16509}
16510_ACEOF
16511rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512if { (ac_try="$ac_link"
16513case "(($ac_try" in
16514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16515 *) ac_try_echo=$ac_try;;
16516esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016520 grep -v '^ *+' conftest.er1 >conftest.err
16521 rm -f conftest.er1
16522 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 (exit $ac_status); } && {
16525 test -z "$ac_c_werror_flag" ||
16526 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016527 } && test -s conftest$ac_exeext &&
16528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016529 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016530else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016532sed 's/^/| /' conftest.$ac_ext >&5
16533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536
16537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016539LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016540fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016541{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16542echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16543if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016545#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016546_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016547
Martin v. Löwis130fb172001-07-19 11:00:41 +000016548 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016549 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016550 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016551fi
16552
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016553
Neal Norwitza978ab02002-11-02 16:58:05 +000016554 if test "$posix_threads" != "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016555 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16556echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016557if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016559else
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016561LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016563/* confdefs.h. */
16564_ACEOF
16565cat confdefs.h >>conftest.$ac_ext
16566cat >>conftest.$ac_ext <<_ACEOF
16567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016569/* Override any GCC internal prototype to avoid an error.
16570 Use char because int might match the return type of a GCC
16571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016572#ifdef __cplusplus
16573extern "C"
16574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016575char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016576int
16577main ()
16578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016579return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ;
16581 return 0;
16582}
16583_ACEOF
16584rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585if { (ac_try="$ac_link"
16586case "(($ac_try" in
16587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16588 *) ac_try_echo=$ac_try;;
16589esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016593 grep -v '^ *+' conftest.er1 >conftest.err
16594 rm -f conftest.er1
16595 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597 (exit $ac_status); } && {
16598 test -z "$ac_c_werror_flag" ||
16599 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016600 } && test -s conftest$ac_exeext &&
16601 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016603else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016605sed 's/^/| /' conftest.$ac_ext >&5
16606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016609
16610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016613fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016614{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16615echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16616if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016620
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016621 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016622 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016623 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016624fi
16625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016626 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016627
Martin v. Löwis130fb172001-07-19 11:00:41 +000016628 if test "$USE_THREAD_MODULE" != "#"
16629 then
16630 # If the above checks didn't disable threads, (at least) OSF1
16631 # needs this '-threads' argument during linking.
16632 case $ac_sys_system in
16633 OSF1) LDLAST=-threads;;
16634 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016635 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016636fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016637
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016638if test "$posix_threads" = "yes"; then
16639 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016640
16641cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016642#define _POSIX_THREADS 1
16643_ACEOF
16644
16645 fi
16646
16647 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16648 case $ac_sys_system/$ac_sys_release in
16649 SunOS/5.6)
16650cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016651#define HAVE_PTHREAD_DESTRUCTOR 1
16652_ACEOF
16653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016654 ;;
16655 SunOS/5.8)
16656cat >>confdefs.h <<\_ACEOF
16657#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16658_ACEOF
16659
16660 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016661 AIX/5)
16662cat >>confdefs.h <<\_ACEOF
16663#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16664_ACEOF
16665
16666 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016667 esac
16668
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016669 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16670echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016671 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016672 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016673else
16674 if test "$cross_compiling" = yes; then
16675 ac_cv_pthread_system_supported=no
16676else
16677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016678/* confdefs.h. */
16679_ACEOF
16680cat confdefs.h >>conftest.$ac_ext
16681cat >>conftest.$ac_ext <<_ACEOF
16682/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016683#include <pthread.h>
16684 void *foo(void *parm) {
16685 return NULL;
16686 }
16687 main() {
16688 pthread_attr_t attr;
16689 pthread_t id;
16690 if (pthread_attr_init(&attr)) exit(-1);
16691 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16692 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16693 exit(0);
16694 }
16695_ACEOF
16696rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016697if { (ac_try="$ac_link"
16698case "(($ac_try" in
16699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16700 *) ac_try_echo=$ac_try;;
16701esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016704 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016707 { (case "(($ac_try" in
16708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16709 *) ac_try_echo=$ac_try;;
16710esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016713 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016715 (exit $ac_status); }; }; then
16716 ac_cv_pthread_system_supported=yes
16717else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016718 echo "$as_me: program exited with status $ac_status" >&5
16719echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016720sed 's/^/| /' conftest.$ac_ext >&5
16721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016722( exit $ac_status )
16723ac_cv_pthread_system_supported=no
16724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016725rm -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 +000016726fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728
16729
Guido van Rossum627b2d71993-12-24 10:39:16 +000016730fi
16731
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016732 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16733echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016734 if test "$ac_cv_pthread_system_supported" = "yes"; then
16735
16736cat >>confdefs.h <<\_ACEOF
16737#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16738_ACEOF
16739
16740 fi
16741
16742for ac_func in pthread_sigmask
16743do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16745{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016749else
16750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16758#define $ac_func innocuous_$ac_func
16759
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016761 which can conflict with char $ac_func (); below.
16762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016763 <limits.h> exists even on freestanding compilers. */
16764
16765#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016766# include <limits.h>
16767#else
16768# include <assert.h>
16769#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016770
16771#undef $ac_func
16772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016773/* Override any GCC internal prototype to avoid an error.
16774 Use char because int might match the return type of a GCC
16775 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016776#ifdef __cplusplus
16777extern "C"
16778#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016779char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016780/* The GNU C library defines this for functions which it implements
16781 to always fail with ENOSYS. Some functions are actually named
16782 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016784choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016785#endif
16786
Skip Montanaro6dead952003-09-25 14:50:04 +000016787int
16788main ()
16789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016791 ;
16792 return 0;
16793}
16794_ACEOF
16795rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016796if { (ac_try="$ac_link"
16797case "(($ac_try" in
16798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16799 *) ac_try_echo=$ac_try;;
16800esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016804 grep -v '^ *+' conftest.er1 >conftest.err
16805 rm -f conftest.er1
16806 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016808 (exit $ac_status); } && {
16809 test -z "$ac_c_werror_flag" ||
16810 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016811 } && test -s conftest$ac_exeext &&
16812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016813 eval "$as_ac_var=yes"
16814else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016816sed 's/^/| /' conftest.$ac_ext >&5
16817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016820
16821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016823fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016824ac_res=`eval echo '${'$as_ac_var'}'`
16825 { echo "$as_me:$LINENO: result: $ac_res" >&5
16826echo "${ECHO_T}$ac_res" >&6; }
16827if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016828 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016829#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016830_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016831 case $ac_sys_system in
16832 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016833
Jason Tishlerfac083d2003-07-22 15:20:49 +000016834cat >>confdefs.h <<\_ACEOF
16835#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16836_ACEOF
16837
16838 ;;
16839 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016840fi
16841done
16842
16843fi
16844
16845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016846# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016847
16848
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016849{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16850echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016852if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016854 no)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016855 { echo "$as_me:$LINENO: result: no" >&5
16856echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016857 ipv6=no
16858 ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016859 *) { echo "$as_me:$LINENO: result: yes" >&5
16860echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016861 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016862#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016864
16865 ipv6=yes
16866 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016868else
Martin v. Löwis11437992002-04-12 09:54:03 +000016869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016870 if test "$cross_compiling" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016871 { echo "$as_me:$LINENO: result: no" >&5
16872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016873 ipv6=no
16874
16875else
Martin v. Löwis11437992002-04-12 09:54:03 +000016876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016877/* confdefs.h. */
16878_ACEOF
16879cat confdefs.h >>conftest.$ac_ext
16880cat >>conftest.$ac_ext <<_ACEOF
16881/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016882 /* AF_INET6 available check */
16883#include <sys/types.h>
16884#include <sys/socket.h>
16885main()
16886{
16887 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16888 exit(1);
16889 else
16890 exit(0);
16891}
16892
Martin v. Löwis11437992002-04-12 09:54:03 +000016893_ACEOF
16894rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895if { (ac_try="$ac_link"
16896case "(($ac_try" in
16897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16898 *) ac_try_echo=$ac_try;;
16899esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 { (case "(($ac_try" in
16906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16907 *) ac_try_echo=$ac_try;;
16908esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016911 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 (exit $ac_status); }; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016914 { echo "$as_me:$LINENO: result: yes" >&5
16915echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016916 ipv6=yes
16917else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016918 echo "$as_me: program exited with status $ac_status" >&5
16919echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016920sed 's/^/| /' conftest.$ac_ext >&5
16921
Martin v. Löwis11437992002-04-12 09:54:03 +000016922( exit $ac_status )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016923{ echo "$as_me:$LINENO: result: no" >&5
16924echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016925 ipv6=no
16926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016927rm -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 +000016928fi
16929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016930
16931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016932if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016933 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16934echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016936/* confdefs.h. */
16937_ACEOF
16938cat confdefs.h >>conftest.$ac_ext
16939cat >>conftest.$ac_ext <<_ACEOF
16940/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016941#include <sys/types.h>
16942#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016943int
16944main ()
16945{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016946struct sockaddr_in6 x;
16947x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 ;
16949 return 0;
16950}
16951_ACEOF
16952rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953if { (ac_try="$ac_compile"
16954case "(($ac_try" in
16955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16956 *) ac_try_echo=$ac_try;;
16957esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016961 grep -v '^ *+' conftest.er1 >conftest.err
16962 rm -f conftest.er1
16963 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965 (exit $ac_status); } && {
16966 test -z "$ac_c_werror_flag" ||
16967 test ! -s conftest.err
16968 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016969 { echo "$as_me:$LINENO: result: yes" >&5
16970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016971 ipv6=yes
16972else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016974sed 's/^/| /' conftest.$ac_ext >&5
16975
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016976 { echo "$as_me:$LINENO: result: no" >&5
16977echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016978 ipv6=no
16979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980
16981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016982fi
16983
16984if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016986#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016987_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016988
16989fi
16990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991fi
16992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016993
16994ipv6type=unknown
16995ipv6lib=none
16996ipv6trylibc=no
16997
16998if test "$ipv6" = "yes"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016999 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17000echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017001 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17002 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017003 case $i in
17004 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017006/* confdefs.h. */
17007_ACEOF
17008cat confdefs.h >>conftest.$ac_ext
17009cat >>conftest.$ac_ext <<_ACEOF
17010/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017012#include <netinet/in.h>
17013#ifdef IPV6_INRIA_VERSION
17014yes
17015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017016_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017018 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017019 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017020fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017021rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017022
17023 ;;
17024 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017026/* confdefs.h. */
17027_ACEOF
17028cat confdefs.h >>conftest.$ac_ext
17029cat >>conftest.$ac_ext <<_ACEOF
17030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017032#include <netinet/in.h>
17033#ifdef __KAME__
17034yes
17035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017038 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017039 ipv6type=$i;
17040 ipv6lib=inet6
17041 ipv6libdir=/usr/local/v6/lib
17042 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017043fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017044rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017045
17046 ;;
17047 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017055#include <features.h>
17056#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17057yes
17058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017059_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017061 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017062 ipv6type=$i;
17063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017064fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017065rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017066
17067 ;;
17068 linux-inet6)
17069 if test -d /usr/inet6; then
17070 ipv6type=$i
17071 ipv6lib=inet6
17072 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017073 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017074 fi
17075 ;;
17076 solaris)
17077 if test -f /etc/netconfig; then
17078 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17079 ipv6type=$i
17080 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017081 fi
17082 fi
17083 ;;
17084 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017086/* confdefs.h. */
17087_ACEOF
17088cat confdefs.h >>conftest.$ac_ext
17089cat >>conftest.$ac_ext <<_ACEOF
17090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017092#include <sys/param.h>
17093#ifdef _TOSHIBA_INET6
17094yes
17095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017098 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099 ipv6type=$i;
17100 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017102fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017103rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017104
17105 ;;
17106 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017108/* confdefs.h. */
17109_ACEOF
17110cat confdefs.h >>conftest.$ac_ext
17111cat >>conftest.$ac_ext <<_ACEOF
17112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017114#include </usr/local/v6/include/sys/v6config.h>
17115#ifdef __V6D__
17116yes
17117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017120 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017121 ipv6type=$i;
17122 ipv6lib=v6;
17123 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017124 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017125fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017126rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017127
17128 ;;
17129 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017131/* confdefs.h. */
17132_ACEOF
17133cat confdefs.h >>conftest.$ac_ext
17134cat >>conftest.$ac_ext <<_ACEOF
17135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017137#include <sys/param.h>
17138#ifdef _ZETA_MINAMI_INET6
17139yes
17140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017143 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017144 ipv6type=$i;
17145 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017146 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017147fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000017148rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017149
17150 ;;
17151 esac
17152 if test "$ipv6type" != "unknown"; then
17153 break
17154 fi
17155 done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017156 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17157echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017158fi
17159
17160if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17161 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17162 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17163 echo "using lib$ipv6lib"
17164 else
17165 if test $ipv6trylibc = "yes"; then
17166 echo "using libc"
17167 else
17168 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17169 echo "You need to fetch lib$ipv6lib.a from appropriate"
17170 echo 'ipv6 kit and compile beforehand.'
17171 exit 1
17172 fi
17173 fi
17174fi
17175
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017176{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17177echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017178cat >conftest.$ac_ext <<_ACEOF
17179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
17184#include <Carbon/Carbon.h>
17185int
17186main ()
17187{
17188FSIORefNum fRef = 0
17189 ;
17190 return 0;
17191}
17192_ACEOF
17193rm -f conftest.$ac_objext
17194if { (ac_try="$ac_compile"
17195case "(($ac_try" in
17196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17197 *) ac_try_echo=$ac_try;;
17198esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017200 (eval "$ac_compile") 2>conftest.er1
17201 ac_status=$?
17202 grep -v '^ *+' conftest.er1 >conftest.err
17203 rm -f conftest.er1
17204 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017206 (exit $ac_status); } && {
17207 test -z "$ac_c_werror_flag" ||
17208 test ! -s conftest.err
17209 } && test -s conftest.$ac_objext; then
17210
17211cat >>confdefs.h <<\_ACEOF
17212#define HAVE_OSX105_SDK 1
17213_ACEOF
17214
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017215 { echo "$as_me:$LINENO: result: yes" >&5
17216echo "${ECHO_T}yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017217else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017218 echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017219sed 's/^/| /' conftest.$ac_ext >&5
17220
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017221 { echo "$as_me:$LINENO: result: no" >&5
17222echo "${ECHO_T}no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017223
17224fi
17225
17226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17227
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017228# Check for --with-doc-strings
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017229{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17230echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017232# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017233if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 withval=$with_doc_strings;
17235fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017236
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017237
17238if test -z "$with_doc_strings"
17239then with_doc_strings="yes"
17240fi
17241if test "$with_doc_strings" != "no"
17242then
17243
17244cat >>confdefs.h <<\_ACEOF
17245#define WITH_DOC_STRINGS 1
17246_ACEOF
17247
17248fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017249{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17250echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017251
Neil Schemenauera35c6882001-02-27 04:45:05 +000017252# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017253{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17254echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017257if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017258 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017259if test "$withval" != no
17260then
17261
17262cat >>confdefs.h <<\_ACEOF
17263#define WITH_TSC 1
17264_ACEOF
17265
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017266 { echo "$as_me:$LINENO: result: yes" >&5
17267echo "${ECHO_T}yes" >&6; }
17268else { echo "$as_me:$LINENO: result: no" >&5
17269echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017270fi
17271else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017272 { echo "$as_me:$LINENO: result: no" >&5
17273echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017274fi
17275
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017276
17277# Check for Python-specific malloc support
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017278{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17279echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017282if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283 withval=$with_pymalloc;
17284fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017285
Neil Schemenauera35c6882001-02-27 04:45:05 +000017286
Neil Schemenauer16c22972002-03-22 15:34:49 +000017287if test -z "$with_pymalloc"
17288then with_pymalloc="yes"
17289fi
17290if test "$with_pymalloc" != "no"
17291then
Martin v. Löwis11437992002-04-12 09:54:03 +000017292
17293cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017294#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017295_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017296
17297fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017298{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17299echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017300
Barry Warsawef82cd72000-06-30 16:21:01 +000017301# Check for --with-wctype-functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017302{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17303echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017306if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017307 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017308if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017309then
17310
17311cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017312#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
17314
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017315 { echo "$as_me:$LINENO: result: yes" >&5
17316echo "${ECHO_T}yes" >&6; }
17317else { echo "$as_me:$LINENO: result: no" >&5
17318echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017319fi
17320else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017321 { echo "$as_me:$LINENO: result: no" >&5
17322echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323fi
17324
Barry Warsawef82cd72000-06-30 16:21:01 +000017325
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017326# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017327
Guido van Rossum98935bf2001-09-05 19:13:16 +000017328DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017329
Guido van Rossume97ee181999-12-20 21:27:22 +000017330# the dlopen() function means we might want to use dynload_shlib.o. some
17331# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017332
Thomas Wouters3a584202000-08-05 23:28:51 +000017333for ac_func in dlopen
17334do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017335as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17336{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17337echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017339 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017340else
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017342/* confdefs.h. */
17343_ACEOF
17344cat confdefs.h >>conftest.$ac_ext
17345cat >>conftest.$ac_ext <<_ACEOF
17346/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017347/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17348 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17349#define $ac_func innocuous_$ac_func
17350
Guido van Rossume97ee181999-12-20 21:27:22 +000017351/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017352 which can conflict with char $ac_func (); below.
17353 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017354 <limits.h> exists even on freestanding compilers. */
17355
17356#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017357# include <limits.h>
17358#else
17359# include <assert.h>
17360#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017361
17362#undef $ac_func
17363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364/* Override any GCC internal prototype to avoid an error.
17365 Use char because int might match the return type of a GCC
17366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017367#ifdef __cplusplus
17368extern "C"
17369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017370char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017371/* The GNU C library defines this for functions which it implements
17372 to always fail with ENOSYS. Some functions are actually named
17373 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017375choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017376#endif
17377
Skip Montanaro6dead952003-09-25 14:50:04 +000017378int
17379main ()
17380{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 ;
17383 return 0;
17384}
17385_ACEOF
17386rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387if { (ac_try="$ac_link"
17388case "(($ac_try" in
17389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17390 *) ac_try_echo=$ac_try;;
17391esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017395 grep -v '^ *+' conftest.er1 >conftest.err
17396 rm -f conftest.er1
17397 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399 (exit $ac_status); } && {
17400 test -z "$ac_c_werror_flag" ||
17401 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017402 } && test -s conftest$ac_exeext &&
17403 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017405else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017407sed 's/^/| /' conftest.$ac_ext >&5
17408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411
17412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017413 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017414fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017415ac_res=`eval echo '${'$as_ac_var'}'`
17416 { echo "$as_me:$LINENO: result: $ac_res" >&5
17417echo "${ECHO_T}$ac_res" >&6; }
17418if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017419 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017420#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017421_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017422
Guido van Rossume97ee181999-12-20 21:27:22 +000017423fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017424done
Guido van Rossume97ee181999-12-20 21:27:22 +000017425
Michael W. Hudson54241132001-12-07 15:38:26 +000017426
Guido van Rossume97ee181999-12-20 21:27:22 +000017427# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17428# loading of modules.
17429
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017430{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17431echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017432if test -z "$DYNLOADFILE"
17433then
17434 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017435 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17436 if test "$ac_cv_func_dlopen" = yes
17437 then DYNLOADFILE="dynload_shlib.o"
17438 else DYNLOADFILE="dynload_aix.o"
17439 fi
17440 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017441 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017442 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17443 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017444 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017445 *)
17446 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17447 # out any dynamic loading
17448 if test "$ac_cv_func_dlopen" = yes
17449 then DYNLOADFILE="dynload_shlib.o"
17450 else DYNLOADFILE="dynload_stub.o"
17451 fi
17452 ;;
17453 esac
17454fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017455{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17456echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017457if test "$DYNLOADFILE" != "dynload_stub.o"
17458then
Martin v. Löwis11437992002-04-12 09:54:03 +000017459
17460cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017461#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017462_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017463
17464fi
17465
Neil Schemenauer4e425612001-06-19 15:44:15 +000017466# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17467
Michael W. Hudson54241132001-12-07 15:38:26 +000017468
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017469{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17470echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017471if test -z "$MACHDEP_OBJS"
17472then
Jack Jansene578a632001-08-15 01:27:14 +000017473 MACHDEP_OBJS=$extra_machdep_objs
17474else
17475 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017476fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017477{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17478echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017479
Guido van Rossum627b2d71993-12-24 10:39:16 +000017480# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
Martin v. Löwisd6320502004-08-12 13:45:08 +000017552
Martin v. Löwisc3001752005-01-23 09:27:24 +000017553
17554
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017555
17556
Thomas Wouterscf297e42007-02-23 15:07:44 +000017557
17558
Gregory P. Smith25523d22007-09-03 16:44:55 +000017559
Christian Heimes4e30a842007-11-30 22:12:06 +000017560
Martin v. Löwis92fab752008-03-08 10:40:41 +000017561
Martin v. Löwis823725e2008-03-24 13:39:54 +000017562
17563
Benjamin Peterson965ce872009-04-05 21:24:58 +000017564
17565
17566
17567
Martin v. Löwis011e8422009-05-05 04:43:17 +000017568
Martin v. Löwis113a0852009-05-29 17:25:39 +000017569
Martin v. Löwis823725e2008-03-24 13:39:54 +000017570for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17571 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017572 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017573 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017574 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017575 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017576 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017577 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17578 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017579 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017580 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017581 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017582 truncate uname unsetenv utimes waitpid wait3 wait4 \
17583 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017584do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017585as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17586{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17587echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017590else
Martin v. Löwis11437992002-04-12 09:54:03 +000017591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017592/* confdefs.h. */
17593_ACEOF
17594cat confdefs.h >>conftest.$ac_ext
17595cat >>conftest.$ac_ext <<_ACEOF
17596/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017597/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17598 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17599#define $ac_func innocuous_$ac_func
17600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017601/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017602 which can conflict with char $ac_func (); below.
17603 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017604 <limits.h> exists even on freestanding compilers. */
17605
17606#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017607# include <limits.h>
17608#else
17609# include <assert.h>
17610#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017611
17612#undef $ac_func
17613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614/* Override any GCC internal prototype to avoid an error.
17615 Use char because int might match the return type of a GCC
17616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017617#ifdef __cplusplus
17618extern "C"
17619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017620char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017621/* The GNU C library defines this for functions which it implements
17622 to always fail with ENOSYS. Some functions are actually named
17623 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017625choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017626#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017627
Skip Montanaro6dead952003-09-25 14:50:04 +000017628int
17629main ()
17630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017632 ;
17633 return 0;
17634}
17635_ACEOF
17636rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637if { (ac_try="$ac_link"
17638case "(($ac_try" in
17639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17640 *) ac_try_echo=$ac_try;;
17641esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017643 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017645 grep -v '^ *+' conftest.er1 >conftest.err
17646 rm -f conftest.er1
17647 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649 (exit $ac_status); } && {
17650 test -z "$ac_c_werror_flag" ||
17651 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017652 } && test -s conftest$ac_exeext &&
17653 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017654 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017655else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017657sed 's/^/| /' conftest.$ac_ext >&5
17658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661
17662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017664fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017665ac_res=`eval echo '${'$as_ac_var'}'`
17666 { echo "$as_me:$LINENO: result: $ac_res" >&5
17667echo "${ECHO_T}$ac_res" >&6; }
17668if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017671_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017672
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017673fi
17674done
17675
Michael W. Hudson54241132001-12-07 15:38:26 +000017676
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017677# For some functions, having a definition is not sufficient, since
17678# we want to take their address.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017679{ echo "$as_me:$LINENO: checking for chroot" >&5
17680echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017681cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017682/* confdefs.h. */
17683_ACEOF
17684cat confdefs.h >>conftest.$ac_ext
17685cat >>conftest.$ac_ext <<_ACEOF
17686/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017687#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017688int
17689main ()
17690{
17691void *x=chroot
17692 ;
17693 return 0;
17694}
17695_ACEOF
17696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017697if { (ac_try="$ac_compile"
17698case "(($ac_try" in
17699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17700 *) ac_try_echo=$ac_try;;
17701esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017705 grep -v '^ *+' conftest.er1 >conftest.err
17706 rm -f conftest.er1
17707 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 (exit $ac_status); } && {
17710 test -z "$ac_c_werror_flag" ||
17711 test ! -s conftest.err
17712 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017713
17714cat >>confdefs.h <<\_ACEOF
17715#define HAVE_CHROOT 1
17716_ACEOF
17717
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017718 { echo "$as_me:$LINENO: result: yes" >&5
17719echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017720else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017722sed 's/^/| /' conftest.$ac_ext >&5
17723
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017724 { echo "$as_me:$LINENO: result: no" >&5
17725echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017726
17727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728
17729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017730{ echo "$as_me:$LINENO: checking for link" >&5
17731echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017733/* confdefs.h. */
17734_ACEOF
17735cat confdefs.h >>conftest.$ac_ext
17736cat >>conftest.$ac_ext <<_ACEOF
17737/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017738#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017739int
17740main ()
17741{
17742void *x=link
17743 ;
17744 return 0;
17745}
17746_ACEOF
17747rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748if { (ac_try="$ac_compile"
17749case "(($ac_try" in
17750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17751 *) ac_try_echo=$ac_try;;
17752esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017756 grep -v '^ *+' conftest.er1 >conftest.err
17757 rm -f conftest.er1
17758 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760 (exit $ac_status); } && {
17761 test -z "$ac_c_werror_flag" ||
17762 test ! -s conftest.err
17763 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017764
17765cat >>confdefs.h <<\_ACEOF
17766#define HAVE_LINK 1
17767_ACEOF
17768
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017769 { echo "$as_me:$LINENO: result: yes" >&5
17770echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017771else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017773sed 's/^/| /' conftest.$ac_ext >&5
17774
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017775 { echo "$as_me:$LINENO: result: no" >&5
17776echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017777
17778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779
17780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017781{ echo "$as_me:$LINENO: checking for symlink" >&5
17782echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017784/* confdefs.h. */
17785_ACEOF
17786cat confdefs.h >>conftest.$ac_ext
17787cat >>conftest.$ac_ext <<_ACEOF
17788/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017789#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017790int
17791main ()
17792{
17793void *x=symlink
17794 ;
17795 return 0;
17796}
17797_ACEOF
17798rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017799if { (ac_try="$ac_compile"
17800case "(($ac_try" in
17801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17802 *) ac_try_echo=$ac_try;;
17803esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017807 grep -v '^ *+' conftest.er1 >conftest.err
17808 rm -f conftest.er1
17809 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 (exit $ac_status); } && {
17812 test -z "$ac_c_werror_flag" ||
17813 test ! -s conftest.err
17814 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017815
17816cat >>confdefs.h <<\_ACEOF
17817#define HAVE_SYMLINK 1
17818_ACEOF
17819
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017820 { echo "$as_me:$LINENO: result: yes" >&5
17821echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017822else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017824sed 's/^/| /' conftest.$ac_ext >&5
17825
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017826 { echo "$as_me:$LINENO: result: no" >&5
17827echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017828
17829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017830
17831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017832{ echo "$as_me:$LINENO: checking for fchdir" >&5
17833echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017835/* confdefs.h. */
17836_ACEOF
17837cat confdefs.h >>conftest.$ac_ext
17838cat >>conftest.$ac_ext <<_ACEOF
17839/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017840#include <unistd.h>
17841int
17842main ()
17843{
17844void *x=fchdir
17845 ;
17846 return 0;
17847}
17848_ACEOF
17849rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017850if { (ac_try="$ac_compile"
17851case "(($ac_try" in
17852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17853 *) ac_try_echo=$ac_try;;
17854esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017858 grep -v '^ *+' conftest.er1 >conftest.err
17859 rm -f conftest.er1
17860 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862 (exit $ac_status); } && {
17863 test -z "$ac_c_werror_flag" ||
17864 test ! -s conftest.err
17865 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017866
17867cat >>confdefs.h <<\_ACEOF
17868#define HAVE_FCHDIR 1
17869_ACEOF
17870
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017871 { echo "$as_me:$LINENO: result: yes" >&5
17872echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017873else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017875sed 's/^/| /' conftest.$ac_ext >&5
17876
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017877 { echo "$as_me:$LINENO: result: no" >&5
17878echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017879
17880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881
17882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017883{ echo "$as_me:$LINENO: checking for fsync" >&5
17884echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017886/* confdefs.h. */
17887_ACEOF
17888cat confdefs.h >>conftest.$ac_ext
17889cat >>conftest.$ac_ext <<_ACEOF
17890/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017891#include <unistd.h>
17892int
17893main ()
17894{
17895void *x=fsync
17896 ;
17897 return 0;
17898}
17899_ACEOF
17900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901if { (ac_try="$ac_compile"
17902case "(($ac_try" in
17903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17904 *) ac_try_echo=$ac_try;;
17905esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017909 grep -v '^ *+' conftest.er1 >conftest.err
17910 rm -f conftest.er1
17911 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913 (exit $ac_status); } && {
17914 test -z "$ac_c_werror_flag" ||
17915 test ! -s conftest.err
17916 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017917
17918cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017919#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017920_ACEOF
17921
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017922 { echo "$as_me:$LINENO: result: yes" >&5
17923echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017924else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017926sed 's/^/| /' conftest.$ac_ext >&5
17927
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017928 { echo "$as_me:$LINENO: result: no" >&5
17929echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017930
17931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017932
17933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017934{ echo "$as_me:$LINENO: checking for fdatasync" >&5
17935echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017936cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017937/* confdefs.h. */
17938_ACEOF
17939cat confdefs.h >>conftest.$ac_ext
17940cat >>conftest.$ac_ext <<_ACEOF
17941/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017942#include <unistd.h>
17943int
17944main ()
17945{
17946void *x=fdatasync
17947 ;
17948 return 0;
17949}
17950_ACEOF
17951rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952if { (ac_try="$ac_compile"
17953case "(($ac_try" in
17954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17955 *) ac_try_echo=$ac_try;;
17956esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017960 grep -v '^ *+' conftest.er1 >conftest.err
17961 rm -f conftest.er1
17962 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964 (exit $ac_status); } && {
17965 test -z "$ac_c_werror_flag" ||
17966 test ! -s conftest.err
17967 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017968
17969cat >>confdefs.h <<\_ACEOF
17970#define HAVE_FDATASYNC 1
17971_ACEOF
17972
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017973 { echo "$as_me:$LINENO: result: yes" >&5
17974echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017975else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017977sed 's/^/| /' conftest.$ac_ext >&5
17978
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017979 { echo "$as_me:$LINENO: result: no" >&5
17980echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017981
17982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017983
17984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000017985{ echo "$as_me:$LINENO: checking for epoll" >&5
17986echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017987cat >conftest.$ac_ext <<_ACEOF
17988/* confdefs.h. */
17989_ACEOF
17990cat confdefs.h >>conftest.$ac_ext
17991cat >>conftest.$ac_ext <<_ACEOF
17992/* end confdefs.h. */
17993#include <sys/epoll.h>
17994int
17995main ()
17996{
17997void *x=epoll_create
17998 ;
17999 return 0;
18000}
18001_ACEOF
18002rm -f conftest.$ac_objext
18003if { (ac_try="$ac_compile"
18004case "(($ac_try" in
18005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18006 *) ac_try_echo=$ac_try;;
18007esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018009 (eval "$ac_compile") 2>conftest.er1
18010 ac_status=$?
18011 grep -v '^ *+' conftest.er1 >conftest.err
18012 rm -f conftest.er1
18013 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018015 (exit $ac_status); } && {
18016 test -z "$ac_c_werror_flag" ||
18017 test ! -s conftest.err
18018 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018019
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018020cat >>confdefs.h <<\_ACEOF
18021#define HAVE_EPOLL 1
18022_ACEOF
18023
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018024 { echo "$as_me:$LINENO: result: yes" >&5
18025echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018026else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018027 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018028sed 's/^/| /' conftest.$ac_ext >&5
18029
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018030 { echo "$as_me:$LINENO: result: no" >&5
18031echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018032
18033fi
18034
18035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018036{ echo "$as_me:$LINENO: checking for kqueue" >&5
18037echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018038cat >conftest.$ac_ext <<_ACEOF
18039/* confdefs.h. */
18040_ACEOF
18041cat confdefs.h >>conftest.$ac_ext
18042cat >>conftest.$ac_ext <<_ACEOF
18043/* end confdefs.h. */
18044
18045#include <sys/types.h>
18046#include <sys/event.h>
18047
18048int
18049main ()
18050{
18051int x=kqueue()
18052 ;
18053 return 0;
18054}
18055_ACEOF
18056rm -f conftest.$ac_objext
18057if { (ac_try="$ac_compile"
18058case "(($ac_try" in
18059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18060 *) ac_try_echo=$ac_try;;
18061esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018063 (eval "$ac_compile") 2>conftest.er1
18064 ac_status=$?
18065 grep -v '^ *+' conftest.er1 >conftest.err
18066 rm -f conftest.er1
18067 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018069 (exit $ac_status); } && {
18070 test -z "$ac_c_werror_flag" ||
18071 test ! -s conftest.err
18072 } && test -s conftest.$ac_objext; then
18073
18074cat >>confdefs.h <<\_ACEOF
18075#define HAVE_KQUEUE 1
18076_ACEOF
18077
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018078 { echo "$as_me:$LINENO: result: yes" >&5
18079echo "${ECHO_T}yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018080else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018081 echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018082sed 's/^/| /' conftest.$ac_ext >&5
18083
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018084 { echo "$as_me:$LINENO: result: no" >&5
18085echo "${ECHO_T}no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018086
18087fi
18088
18089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018090# On some systems (eg. FreeBSD 5), we would find a definition of the
18091# functions ctermid_r, setgroups in the library, but no prototype
18092# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18093# address to avoid compiler warnings and potential miscompilations
18094# because of the missing prototypes.
18095
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018096{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18097echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018104
18105#include "confdefs.h"
18106#include <stdio.h>
18107
Martin v. Löwisd5843682002-11-21 20:41:28 +000018108int
18109main ()
18110{
18111void* p = ctermid_r
18112 ;
18113 return 0;
18114}
18115_ACEOF
18116rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117if { (ac_try="$ac_compile"
18118case "(($ac_try" in
18119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18120 *) ac_try_echo=$ac_try;;
18121esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018125 grep -v '^ *+' conftest.er1 >conftest.err
18126 rm -f conftest.er1
18127 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129 (exit $ac_status); } && {
18130 test -z "$ac_c_werror_flag" ||
18131 test ! -s conftest.err
18132 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018133
18134cat >>confdefs.h <<\_ACEOF
18135#define HAVE_CTERMID_R 1
18136_ACEOF
18137
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018138 { echo "$as_me:$LINENO: result: yes" >&5
18139echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018140else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018142sed 's/^/| /' conftest.$ac_ext >&5
18143
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018144 { echo "$as_me:$LINENO: result: no" >&5
18145echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018146
18147fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18150
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018151{ echo "$as_me:$LINENO: checking for flock" >&5
18152echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018154/* confdefs.h. */
18155_ACEOF
18156cat confdefs.h >>conftest.$ac_ext
18157cat >>conftest.$ac_ext <<_ACEOF
18158/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018159
18160#include "confdefs.h"
18161#include <sys/file.h>
18162
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018163int
18164main ()
18165{
18166void* p = flock
18167 ;
18168 return 0;
18169}
18170_ACEOF
18171rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172if { (ac_try="$ac_compile"
18173case "(($ac_try" in
18174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18175 *) ac_try_echo=$ac_try;;
18176esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018180 grep -v '^ *+' conftest.er1 >conftest.err
18181 rm -f conftest.er1
18182 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184 (exit $ac_status); } && {
18185 test -z "$ac_c_werror_flag" ||
18186 test ! -s conftest.err
18187 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018188
18189cat >>confdefs.h <<\_ACEOF
18190#define HAVE_FLOCK 1
18191_ACEOF
18192
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018193 { echo "$as_me:$LINENO: result: yes" >&5
18194echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018195else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018197sed 's/^/| /' conftest.$ac_ext >&5
18198
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018199 { echo "$as_me:$LINENO: result: no" >&5
18200echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018201
18202fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18205
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018206{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18207echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018209/* confdefs.h. */
18210_ACEOF
18211cat confdefs.h >>conftest.$ac_ext
18212cat >>conftest.$ac_ext <<_ACEOF
18213/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018214
18215#include "confdefs.h"
18216#include <unistd.h>
18217
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018218int
18219main ()
18220{
18221void* p = getpagesize
18222 ;
18223 return 0;
18224}
18225_ACEOF
18226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227if { (ac_try="$ac_compile"
18228case "(($ac_try" in
18229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18230 *) ac_try_echo=$ac_try;;
18231esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018235 grep -v '^ *+' conftest.er1 >conftest.err
18236 rm -f conftest.er1
18237 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018239 (exit $ac_status); } && {
18240 test -z "$ac_c_werror_flag" ||
18241 test ! -s conftest.err
18242 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018243
18244cat >>confdefs.h <<\_ACEOF
18245#define HAVE_GETPAGESIZE 1
18246_ACEOF
18247
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018248 { echo "$as_me:$LINENO: result: yes" >&5
18249echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018250else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018251 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018252sed 's/^/| /' conftest.$ac_ext >&5
18253
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018254 { echo "$as_me:$LINENO: result: no" >&5
18255echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018256
18257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018258
18259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018260
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018261for ac_prog in true
18262do
18263 # Extract the first word of "$ac_prog", so it can be a program name with args.
18264set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018265{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018267if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018268 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018269else
18270 if test -n "$TRUE"; then
18271 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18272else
18273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18274for as_dir in $PATH
18275do
18276 IFS=$as_save_IFS
18277 test -z "$as_dir" && as_dir=.
18278 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 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 +000018280 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018281 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018282 break 2
18283 fi
18284done
18285done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018286IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018287
18288fi
18289fi
18290TRUE=$ac_cv_prog_TRUE
18291if test -n "$TRUE"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018292 { echo "$as_me:$LINENO: result: $TRUE" >&5
18293echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018294else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018295 { echo "$as_me:$LINENO: result: no" >&5
18296echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018297fi
18298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018300 test -n "$TRUE" && break
18301done
18302test -n "$TRUE" || TRUE="/bin/true"
18303
18304
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018305{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18306echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018307if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018308 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018309else
18310 ac_check_lib_save_LIBS=$LIBS
18311LIBS="-lc $LIBS"
18312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018313/* confdefs.h. */
18314_ACEOF
18315cat confdefs.h >>conftest.$ac_ext
18316cat >>conftest.$ac_ext <<_ACEOF
18317/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018319/* Override any GCC internal prototype to avoid an error.
18320 Use char because int might match the return type of a GCC
18321 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018322#ifdef __cplusplus
18323extern "C"
18324#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018325char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018326int
18327main ()
18328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018329return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018330 ;
18331 return 0;
18332}
18333_ACEOF
18334rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335if { (ac_try="$ac_link"
18336case "(($ac_try" in
18337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18338 *) ac_try_echo=$ac_try;;
18339esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018343 grep -v '^ *+' conftest.er1 >conftest.err
18344 rm -f conftest.er1
18345 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347 (exit $ac_status); } && {
18348 test -z "$ac_c_werror_flag" ||
18349 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018350 } && test -s conftest$ac_exeext &&
18351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018352 ac_cv_lib_c_inet_aton=yes
18353else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018355sed 's/^/| /' conftest.$ac_ext >&5
18356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018357 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018359
18360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018362LIBS=$ac_check_lib_save_LIBS
18363fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018364{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18365echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18366if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018367 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018368else
18369
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018370{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18371echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018372if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018374else
18375 ac_check_lib_save_LIBS=$LIBS
18376LIBS="-lresolv $LIBS"
18377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018378/* confdefs.h. */
18379_ACEOF
18380cat confdefs.h >>conftest.$ac_ext
18381cat >>conftest.$ac_ext <<_ACEOF
18382/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384/* Override any GCC internal prototype to avoid an error.
18385 Use char because int might match the return type of a GCC
18386 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018387#ifdef __cplusplus
18388extern "C"
18389#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018390char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018391int
18392main ()
18393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018395 ;
18396 return 0;
18397}
18398_ACEOF
18399rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018400if { (ac_try="$ac_link"
18401case "(($ac_try" in
18402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18403 *) ac_try_echo=$ac_try;;
18404esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018407 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408 grep -v '^ *+' conftest.er1 >conftest.err
18409 rm -f conftest.er1
18410 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018412 (exit $ac_status); } && {
18413 test -z "$ac_c_werror_flag" ||
18414 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018415 } && test -s conftest$ac_exeext &&
18416 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018417 ac_cv_lib_resolv_inet_aton=yes
18418else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018420sed 's/^/| /' conftest.$ac_ext >&5
18421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018422 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018424
18425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018427LIBS=$ac_check_lib_save_LIBS
18428fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018429{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18430echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18431if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018432 cat >>confdefs.h <<_ACEOF
18433#define HAVE_LIBRESOLV 1
18434_ACEOF
18435
18436 LIBS="-lresolv $LIBS"
18437
18438fi
18439
18440
18441fi
18442
18443
Christian Heimesd0764e22007-12-04 15:00:33 +000018444# On Tru64, chflags seems to be present, but calling it will
18445# exit Python
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018446{ echo "$as_me:$LINENO: checking for chflags" >&5
18447echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018448if test "${ac_cv_have_chflags+set}" = set; then
18449 echo $ECHO_N "(cached) $ECHO_C" >&6
18450else
18451 if test "$cross_compiling" = yes; then
18452 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018453else
18454 cat >conftest.$ac_ext <<_ACEOF
18455/* confdefs.h. */
18456_ACEOF
18457cat confdefs.h >>conftest.$ac_ext
18458cat >>conftest.$ac_ext <<_ACEOF
18459/* end confdefs.h. */
18460
18461#include <sys/stat.h>
18462#include <unistd.h>
18463int main(int argc, char*argv[])
18464{
18465 if(chflags(argv[0], 0) != 0)
18466 return 1;
18467 return 0;
18468}
18469
18470_ACEOF
18471rm -f conftest$ac_exeext
18472if { (ac_try="$ac_link"
18473case "(($ac_try" in
18474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18475 *) ac_try_echo=$ac_try;;
18476esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018478 (eval "$ac_link") 2>&5
18479 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018481 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18482 { (case "(($ac_try" in
18483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18484 *) ac_try_echo=$ac_try;;
18485esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018487 (eval "$ac_try") 2>&5
18488 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018490 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018491 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018492else
18493 echo "$as_me: program exited with status $ac_status" >&5
18494echo "$as_me: failed program was:" >&5
18495sed 's/^/| /' conftest.$ac_ext >&5
18496
18497( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018498ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018499fi
18500rm -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 +000018501fi
18502
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018503
18504
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018505fi
18506
18507{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18508echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18509if test $ac_cv_have_chflags = yes
18510then
18511
18512cat >>confdefs.h <<\_ACEOF
18513#define HAVE_CHFLAGS 1
18514_ACEOF
18515
18516fi
18517
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018518{ echo "$as_me:$LINENO: checking for lchflags" >&5
18519echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018520if test "${ac_cv_have_lchflags+set}" = set; then
18521 echo $ECHO_N "(cached) $ECHO_C" >&6
18522else
18523 if test "$cross_compiling" = yes; then
18524 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018525else
18526 cat >conftest.$ac_ext <<_ACEOF
18527/* confdefs.h. */
18528_ACEOF
18529cat confdefs.h >>conftest.$ac_ext
18530cat >>conftest.$ac_ext <<_ACEOF
18531/* end confdefs.h. */
18532
18533#include <sys/stat.h>
18534#include <unistd.h>
18535int main(int argc, char*argv[])
18536{
18537 if(lchflags(argv[0], 0) != 0)
18538 return 1;
18539 return 0;
18540}
18541
18542_ACEOF
18543rm -f conftest$ac_exeext
18544if { (ac_try="$ac_link"
18545case "(($ac_try" in
18546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18547 *) ac_try_echo=$ac_try;;
18548esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018550 (eval "$ac_link") 2>&5
18551 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018553 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18554 { (case "(($ac_try" in
18555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18556 *) ac_try_echo=$ac_try;;
18557esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018559 (eval "$ac_try") 2>&5
18560 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018562 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018563 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018564else
18565 echo "$as_me: program exited with status $ac_status" >&5
18566echo "$as_me: failed program was:" >&5
18567sed 's/^/| /' conftest.$ac_ext >&5
18568
18569( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018570ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018571fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18573fi
18574
18575
Christian Heimesd0764e22007-12-04 15:00:33 +000018576
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018577fi
18578
18579{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18580echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18581if test $ac_cv_have_lchflags = yes
18582then
18583
18584cat >>confdefs.h <<\_ACEOF
18585#define HAVE_LCHFLAGS 1
18586_ACEOF
18587
18588fi
18589
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018590case $ac_sys_system/$ac_sys_release in
18591Darwin/*)
18592 _CUR_CFLAGS="${CFLAGS}"
18593 _CUR_LDFLAGS="${LDFLAGS}"
18594 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18595 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18596 ;;
18597esac
18598
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018599{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18600echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018601if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018602 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018603else
18604 ac_check_lib_save_LIBS=$LIBS
18605LIBS="-lz $LIBS"
18606cat >conftest.$ac_ext <<_ACEOF
18607/* confdefs.h. */
18608_ACEOF
18609cat confdefs.h >>conftest.$ac_ext
18610cat >>conftest.$ac_ext <<_ACEOF
18611/* end confdefs.h. */
18612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018613/* Override any GCC internal prototype to avoid an error.
18614 Use char because int might match the return type of a GCC
18615 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018616#ifdef __cplusplus
18617extern "C"
18618#endif
18619char inflateCopy ();
18620int
18621main ()
18622{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018623return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018624 ;
18625 return 0;
18626}
18627_ACEOF
18628rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018629if { (ac_try="$ac_link"
18630case "(($ac_try" in
18631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18632 *) ac_try_echo=$ac_try;;
18633esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018635 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018636 ac_status=$?
18637 grep -v '^ *+' conftest.er1 >conftest.err
18638 rm -f conftest.er1
18639 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018641 (exit $ac_status); } && {
18642 test -z "$ac_c_werror_flag" ||
18643 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018644 } && test -s conftest$ac_exeext &&
18645 $as_test_x conftest$ac_exeext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018646 ac_cv_lib_z_inflateCopy=yes
18647else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018648 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018649sed 's/^/| /' conftest.$ac_ext >&5
18650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018651 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018653
18654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018655 conftest$ac_exeext conftest.$ac_ext
18656LIBS=$ac_check_lib_save_LIBS
18657fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018658{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18659echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18660if test $ac_cv_lib_z_inflateCopy = yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018661
18662cat >>confdefs.h <<\_ACEOF
18663#define HAVE_ZLIB_COPY 1
18664_ACEOF
18665
18666fi
18667
18668
18669case $ac_sys_system/$ac_sys_release in
18670Darwin/*)
18671 CFLAGS="${_CUR_CFLAGS}"
18672 LDFLAGS="${_CUR_LDFLAGS}"
18673 ;;
18674esac
18675
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018676{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18677echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018679/* confdefs.h. */
18680_ACEOF
18681cat confdefs.h >>conftest.$ac_ext
18682cat >>conftest.$ac_ext <<_ACEOF
18683/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018684
18685#include "confdefs.h"
18686#include <netdb.h>
18687
Martin v. Löwise9416172003-05-03 10:12:45 +000018688int
18689main ()
18690{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018691void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018692 ;
18693 return 0;
18694}
18695_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018696rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018697if { (ac_try="$ac_link"
18698case "(($ac_try" in
18699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18700 *) ac_try_echo=$ac_try;;
18701esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018703 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018705 grep -v '^ *+' conftest.er1 >conftest.err
18706 rm -f conftest.er1
18707 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018709 (exit $ac_status); } && {
18710 test -z "$ac_c_werror_flag" ||
18711 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018712 } && test -s conftest$ac_exeext &&
18713 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018714
18715cat >>confdefs.h <<\_ACEOF
18716#define HAVE_HSTRERROR 1
18717_ACEOF
18718
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018719 { echo "$as_me:$LINENO: result: yes" >&5
18720echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018721else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018722 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018723sed 's/^/| /' conftest.$ac_ext >&5
18724
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018725 { echo "$as_me:$LINENO: result: no" >&5
18726echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018727
18728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018729
18730rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018732
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018733{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18734echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018736/* confdefs.h. */
18737_ACEOF
18738cat confdefs.h >>conftest.$ac_ext
18739cat >>conftest.$ac_ext <<_ACEOF
18740/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018741
18742#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018743#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018744#include <sys/socket.h>
18745#include <netinet/in.h>
18746#include <arpa/inet.h>
18747
Martin v. Löwise9416172003-05-03 10:12:45 +000018748int
18749main ()
18750{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018751void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018752 ;
18753 return 0;
18754}
18755_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018756rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018757if { (ac_try="$ac_link"
18758case "(($ac_try" in
18759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18760 *) ac_try_echo=$ac_try;;
18761esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018763 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018765 grep -v '^ *+' conftest.er1 >conftest.err
18766 rm -f conftest.er1
18767 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018769 (exit $ac_status); } && {
18770 test -z "$ac_c_werror_flag" ||
18771 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018772 } && test -s conftest$ac_exeext &&
18773 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018774
18775cat >>confdefs.h <<\_ACEOF
18776#define HAVE_INET_ATON 1
18777_ACEOF
18778
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018779 { echo "$as_me:$LINENO: result: yes" >&5
18780echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018781else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018783sed 's/^/| /' conftest.$ac_ext >&5
18784
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018785 { echo "$as_me:$LINENO: result: no" >&5
18786echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018787
18788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018789
18790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018791 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018792
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018793{ echo "$as_me:$LINENO: checking for inet_pton" >&5
18794echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018796/* confdefs.h. */
18797_ACEOF
18798cat confdefs.h >>conftest.$ac_ext
18799cat >>conftest.$ac_ext <<_ACEOF
18800/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018801
18802#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018803#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018804#include <sys/socket.h>
18805#include <netinet/in.h>
18806#include <arpa/inet.h>
18807
Martin v. Löwise9416172003-05-03 10:12:45 +000018808int
18809main ()
18810{
18811void* p = inet_pton
18812 ;
18813 return 0;
18814}
18815_ACEOF
18816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018817if { (ac_try="$ac_compile"
18818case "(($ac_try" in
18819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18820 *) ac_try_echo=$ac_try;;
18821esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825 grep -v '^ *+' conftest.er1 >conftest.err
18826 rm -f conftest.er1
18827 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018829 (exit $ac_status); } && {
18830 test -z "$ac_c_werror_flag" ||
18831 test ! -s conftest.err
18832 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018833
18834cat >>confdefs.h <<\_ACEOF
18835#define HAVE_INET_PTON 1
18836_ACEOF
18837
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018838 { echo "$as_me:$LINENO: result: yes" >&5
18839echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018840else
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
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018844 { echo "$as_me:$LINENO: result: no" >&5
18845echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018846
18847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018848
18849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018850
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018851# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018852{ echo "$as_me:$LINENO: checking for setgroups" >&5
18853echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018855/* confdefs.h. */
18856_ACEOF
18857cat confdefs.h >>conftest.$ac_ext
18858cat >>conftest.$ac_ext <<_ACEOF
18859/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018860
18861#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018862#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018863#ifdef HAVE_GRP_H
18864#include <grp.h>
18865#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018866
Martin v. Löwisd5843682002-11-21 20:41:28 +000018867int
18868main ()
18869{
18870void* p = setgroups
18871 ;
18872 return 0;
18873}
18874_ACEOF
18875rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018876if { (ac_try="$ac_compile"
18877case "(($ac_try" in
18878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18879 *) ac_try_echo=$ac_try;;
18880esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
18891 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018892
18893cat >>confdefs.h <<\_ACEOF
18894#define HAVE_SETGROUPS 1
18895_ACEOF
18896
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018897 { echo "$as_me:$LINENO: result: yes" >&5
18898echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018899else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018901sed 's/^/| /' conftest.$ac_ext >&5
18902
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018903 { echo "$as_me:$LINENO: result: no" >&5
18904echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018905
18906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018907
18908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018909
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018910# check for openpty and forkpty
18911
Martin v. Löwis11437992002-04-12 09:54:03 +000018912
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018913for ac_func in openpty
18914do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18916{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018918if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018920else
Martin v. Löwis11437992002-04-12 09:54:03 +000018921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018922/* confdefs.h. */
18923_ACEOF
18924cat confdefs.h >>conftest.$ac_ext
18925cat >>conftest.$ac_ext <<_ACEOF
18926/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18929#define $ac_func innocuous_$ac_func
18930
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018931/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018932 which can conflict with char $ac_func (); below.
18933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018934 <limits.h> exists even on freestanding compilers. */
18935
18936#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018937# include <limits.h>
18938#else
18939# include <assert.h>
18940#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018941
18942#undef $ac_func
18943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018944/* Override any GCC internal prototype to avoid an error.
18945 Use char because int might match the return type of a GCC
18946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018947#ifdef __cplusplus
18948extern "C"
18949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018950char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018951/* The GNU C library defines this for functions which it implements
18952 to always fail with ENOSYS. Some functions are actually named
18953 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018954#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018955choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018956#endif
18957
Skip Montanaro6dead952003-09-25 14:50:04 +000018958int
18959main ()
18960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018961return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018962 ;
18963 return 0;
18964}
18965_ACEOF
18966rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018967if { (ac_try="$ac_link"
18968case "(($ac_try" in
18969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18970 *) ac_try_echo=$ac_try;;
18971esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018973 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018975 grep -v '^ *+' conftest.er1 >conftest.err
18976 rm -f conftest.er1
18977 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018979 (exit $ac_status); } && {
18980 test -z "$ac_c_werror_flag" ||
18981 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018982 } && test -s conftest$ac_exeext &&
18983 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018984 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018985else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018987sed 's/^/| /' conftest.$ac_ext >&5
18988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018989 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018991
18992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018993 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018994fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018995ac_res=`eval echo '${'$as_ac_var'}'`
18996 { echo "$as_me:$LINENO: result: $ac_res" >&5
18997echo "${ECHO_T}$ac_res" >&6; }
18998if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018999 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019000#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019001_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019002
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019003else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019004 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19005echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019006if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019007 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019008else
Martin v. Löwis11437992002-04-12 09:54:03 +000019009 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019010LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019011cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019012/* confdefs.h. */
19013_ACEOF
19014cat confdefs.h >>conftest.$ac_ext
19015cat >>conftest.$ac_ext <<_ACEOF
19016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019018/* Override any GCC internal prototype to avoid an error.
19019 Use char because int might match the return type of a GCC
19020 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019021#ifdef __cplusplus
19022extern "C"
19023#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019024char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019025int
19026main ()
19027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019028return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019029 ;
19030 return 0;
19031}
19032_ACEOF
19033rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034if { (ac_try="$ac_link"
19035case "(($ac_try" in
19036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19037 *) ac_try_echo=$ac_try;;
19038esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019042 grep -v '^ *+' conftest.er1 >conftest.err
19043 rm -f conftest.er1
19044 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019046 (exit $ac_status); } && {
19047 test -z "$ac_c_werror_flag" ||
19048 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019049 } && test -s conftest$ac_exeext &&
19050 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019052else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019054sed 's/^/| /' conftest.$ac_ext >&5
19055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019056 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019058
19059rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019061LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019062fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019063{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19064echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19065if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019067#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019068_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019069 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019070else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019071 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19072echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019073if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019074 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019075else
19076 ac_check_lib_save_LIBS=$LIBS
19077LIBS="-lbsd $LIBS"
19078cat >conftest.$ac_ext <<_ACEOF
19079/* confdefs.h. */
19080_ACEOF
19081cat confdefs.h >>conftest.$ac_ext
19082cat >>conftest.$ac_ext <<_ACEOF
19083/* end confdefs.h. */
19084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085/* Override any GCC internal prototype to avoid an error.
19086 Use char because int might match the return type of a GCC
19087 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019088#ifdef __cplusplus
19089extern "C"
19090#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019091char openpty ();
19092int
19093main ()
19094{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019095return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019096 ;
19097 return 0;
19098}
19099_ACEOF
19100rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019101if { (ac_try="$ac_link"
19102case "(($ac_try" in
19103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19104 *) ac_try_echo=$ac_try;;
19105esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019107 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019108 ac_status=$?
19109 grep -v '^ *+' conftest.er1 >conftest.err
19110 rm -f conftest.er1
19111 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019113 (exit $ac_status); } && {
19114 test -z "$ac_c_werror_flag" ||
19115 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019116 } && test -s conftest$ac_exeext &&
19117 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019118 ac_cv_lib_bsd_openpty=yes
19119else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019120 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019121sed 's/^/| /' conftest.$ac_ext >&5
19122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019123 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019125
19126rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019127 conftest$ac_exeext conftest.$ac_ext
19128LIBS=$ac_check_lib_save_LIBS
19129fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019130{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19131echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19132if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019133 cat >>confdefs.h <<\_ACEOF
19134#define HAVE_OPENPTY 1
19135_ACEOF
19136 LIBS="$LIBS -lbsd"
19137fi
19138
19139
19140fi
19141
Fred Drake8cef4cf2000-06-28 16:40:38 +000019142
19143fi
19144done
19145
Martin v. Löwis11437992002-04-12 09:54:03 +000019146
Fred Drake8cef4cf2000-06-28 16:40:38 +000019147for ac_func in forkpty
19148do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019149as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19150{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19151echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019152if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019153 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019154else
Martin v. Löwis11437992002-04-12 09:54:03 +000019155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019156/* confdefs.h. */
19157_ACEOF
19158cat confdefs.h >>conftest.$ac_ext
19159cat >>conftest.$ac_ext <<_ACEOF
19160/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019161/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19162 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19163#define $ac_func innocuous_$ac_func
19164
Fred Drake8cef4cf2000-06-28 16:40:38 +000019165/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019166 which can conflict with char $ac_func (); below.
19167 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019168 <limits.h> exists even on freestanding compilers. */
19169
19170#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019171# include <limits.h>
19172#else
19173# include <assert.h>
19174#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019175
19176#undef $ac_func
19177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178/* Override any GCC internal prototype to avoid an error.
19179 Use char because int might match the return type of a GCC
19180 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019181#ifdef __cplusplus
19182extern "C"
19183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019184char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019185/* The GNU C library defines this for functions which it implements
19186 to always fail with ENOSYS. Some functions are actually named
19187 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019188#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019189choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019190#endif
19191
Skip Montanaro6dead952003-09-25 14:50:04 +000019192int
19193main ()
19194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019195return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019196 ;
19197 return 0;
19198}
19199_ACEOF
19200rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019201if { (ac_try="$ac_link"
19202case "(($ac_try" in
19203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19204 *) ac_try_echo=$ac_try;;
19205esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019207 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019209 grep -v '^ *+' conftest.er1 >conftest.err
19210 rm -f conftest.er1
19211 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019213 (exit $ac_status); } && {
19214 test -z "$ac_c_werror_flag" ||
19215 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019216 } && test -s conftest$ac_exeext &&
19217 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019218 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019219else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019221sed 's/^/| /' conftest.$ac_ext >&5
19222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019223 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019225
19226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019227 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019228fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019229ac_res=`eval echo '${'$as_ac_var'}'`
19230 { echo "$as_me:$LINENO: result: $ac_res" >&5
19231echo "${ECHO_T}$ac_res" >&6; }
19232if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019234#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019235_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019236
Fred Drake8cef4cf2000-06-28 16:40:38 +000019237else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019238 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19239echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019240if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019241 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019242else
Martin v. Löwis11437992002-04-12 09:54:03 +000019243 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019244LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019246/* confdefs.h. */
19247_ACEOF
19248cat confdefs.h >>conftest.$ac_ext
19249cat >>conftest.$ac_ext <<_ACEOF
19250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019252/* Override any GCC internal prototype to avoid an error.
19253 Use char because int might match the return type of a GCC
19254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019255#ifdef __cplusplus
19256extern "C"
19257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019258char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019259int
19260main ()
19261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019262return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 ;
19264 return 0;
19265}
19266_ACEOF
19267rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019268if { (ac_try="$ac_link"
19269case "(($ac_try" in
19270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19271 *) ac_try_echo=$ac_try;;
19272esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019276 grep -v '^ *+' conftest.er1 >conftest.err
19277 rm -f conftest.er1
19278 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019280 (exit $ac_status); } && {
19281 test -z "$ac_c_werror_flag" ||
19282 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019283 } && test -s conftest$ac_exeext &&
19284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019286else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019288sed 's/^/| /' conftest.$ac_ext >&5
19289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019290 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019292
19293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019295LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019296fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019297{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19298echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19299if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019300 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019301#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019302_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019303 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019304else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019305 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19306echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019307if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019308 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019309else
19310 ac_check_lib_save_LIBS=$LIBS
19311LIBS="-lbsd $LIBS"
19312cat >conftest.$ac_ext <<_ACEOF
19313/* confdefs.h. */
19314_ACEOF
19315cat confdefs.h >>conftest.$ac_ext
19316cat >>conftest.$ac_ext <<_ACEOF
19317/* end confdefs.h. */
19318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319/* Override any GCC internal prototype to avoid an error.
19320 Use char because int might match the return type of a GCC
19321 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019322#ifdef __cplusplus
19323extern "C"
19324#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019325char forkpty ();
19326int
19327main ()
19328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019330 ;
19331 return 0;
19332}
19333_ACEOF
19334rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019335if { (ac_try="$ac_link"
19336case "(($ac_try" in
19337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19338 *) ac_try_echo=$ac_try;;
19339esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019342 ac_status=$?
19343 grep -v '^ *+' conftest.er1 >conftest.err
19344 rm -f conftest.er1
19345 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019347 (exit $ac_status); } && {
19348 test -z "$ac_c_werror_flag" ||
19349 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019350 } && test -s conftest$ac_exeext &&
19351 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019352 ac_cv_lib_bsd_forkpty=yes
19353else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019354 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019355sed 's/^/| /' conftest.$ac_ext >&5
19356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019357 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019359
19360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019361 conftest$ac_exeext conftest.$ac_ext
19362LIBS=$ac_check_lib_save_LIBS
19363fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019364{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19365echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19366if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019367 cat >>confdefs.h <<\_ACEOF
19368#define HAVE_FORKPTY 1
19369_ACEOF
19370 LIBS="$LIBS -lbsd"
19371fi
19372
19373
19374fi
19375
Fred Drake8cef4cf2000-06-28 16:40:38 +000019376
19377fi
19378done
19379
Jack Jansendd19cf82001-12-06 22:36:17 +000019380
Christian Heimesb186d002008-03-18 15:15:01 +000019381# Stuff for expat.
19382
19383for ac_func in memmove
19384do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019385as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19386{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19387echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019388if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019389 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019390else
19391 cat >conftest.$ac_ext <<_ACEOF
19392/* confdefs.h. */
19393_ACEOF
19394cat confdefs.h >>conftest.$ac_ext
19395cat >>conftest.$ac_ext <<_ACEOF
19396/* end confdefs.h. */
19397/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19398 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19399#define $ac_func innocuous_$ac_func
19400
19401/* System header to define __stub macros and hopefully few prototypes,
19402 which can conflict with char $ac_func (); below.
19403 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19404 <limits.h> exists even on freestanding compilers. */
19405
19406#ifdef __STDC__
19407# include <limits.h>
19408#else
19409# include <assert.h>
19410#endif
19411
19412#undef $ac_func
19413
19414/* Override any GCC internal prototype to avoid an error.
19415 Use char because int might match the return type of a GCC
19416 builtin and then its argument prototype would still apply. */
19417#ifdef __cplusplus
19418extern "C"
19419#endif
19420char $ac_func ();
19421/* The GNU C library defines this for functions which it implements
19422 to always fail with ENOSYS. Some functions are actually named
19423 something starting with __ and the normal name is an alias. */
19424#if defined __stub_$ac_func || defined __stub___$ac_func
19425choke me
19426#endif
19427
19428int
19429main ()
19430{
19431return $ac_func ();
19432 ;
19433 return 0;
19434}
19435_ACEOF
19436rm -f conftest.$ac_objext conftest$ac_exeext
19437if { (ac_try="$ac_link"
19438case "(($ac_try" in
19439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19440 *) ac_try_echo=$ac_try;;
19441esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019443 (eval "$ac_link") 2>conftest.er1
19444 ac_status=$?
19445 grep -v '^ *+' conftest.er1 >conftest.err
19446 rm -f conftest.er1
19447 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019449 (exit $ac_status); } && {
19450 test -z "$ac_c_werror_flag" ||
19451 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019452 } && test -s conftest$ac_exeext &&
19453 $as_test_x conftest$ac_exeext; then
Christian Heimesb186d002008-03-18 15:15:01 +000019454 eval "$as_ac_var=yes"
19455else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019456 echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019457sed 's/^/| /' conftest.$ac_ext >&5
19458
19459 eval "$as_ac_var=no"
19460fi
19461
19462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19463 conftest$ac_exeext conftest.$ac_ext
19464fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019465ac_res=`eval echo '${'$as_ac_var'}'`
19466 { echo "$as_me:$LINENO: result: $ac_res" >&5
19467echo "${ECHO_T}$ac_res" >&6; }
19468if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019469 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019470#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019471_ACEOF
19472
19473fi
19474done
19475
19476
Michael W. Hudson54241132001-12-07 15:38:26 +000019477# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019478
19479
19480
19481
19482
19483
Fred Drake8cef4cf2000-06-28 16:40:38 +000019484for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19485do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019486as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19487{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19488echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019489if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019491else
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019493/* confdefs.h. */
19494_ACEOF
19495cat confdefs.h >>conftest.$ac_ext
19496cat >>conftest.$ac_ext <<_ACEOF
19497/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019498/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19499 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19500#define $ac_func innocuous_$ac_func
19501
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019502/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019503 which can conflict with char $ac_func (); below.
19504 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019505 <limits.h> exists even on freestanding compilers. */
19506
19507#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019508# include <limits.h>
19509#else
19510# include <assert.h>
19511#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019512
19513#undef $ac_func
19514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019515/* Override any GCC internal prototype to avoid an error.
19516 Use char because int might match the return type of a GCC
19517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019518#ifdef __cplusplus
19519extern "C"
19520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019521char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019522/* The GNU C library defines this for functions which it implements
19523 to always fail with ENOSYS. Some functions are actually named
19524 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019525#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019526choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019527#endif
19528
Skip Montanaro6dead952003-09-25 14:50:04 +000019529int
19530main ()
19531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019532return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019533 ;
19534 return 0;
19535}
19536_ACEOF
19537rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019538if { (ac_try="$ac_link"
19539case "(($ac_try" in
19540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19541 *) ac_try_echo=$ac_try;;
19542esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019544 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019546 grep -v '^ *+' conftest.er1 >conftest.err
19547 rm -f conftest.er1
19548 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019550 (exit $ac_status); } && {
19551 test -z "$ac_c_werror_flag" ||
19552 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019553 } && test -s conftest$ac_exeext &&
19554 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019555 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019556else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019558sed 's/^/| /' conftest.$ac_ext >&5
19559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019560 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019562
19563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019564 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019565fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019566ac_res=`eval echo '${'$as_ac_var'}'`
19567 { echo "$as_me:$LINENO: result: $ac_res" >&5
19568echo "${ECHO_T}$ac_res" >&6; }
19569if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019570 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019571#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019572_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019573
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019574fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019575done
19576
Michael W. Hudson54241132001-12-07 15:38:26 +000019577
Martin v. Löwis11437992002-04-12 09:54:03 +000019578
19579
19580
Christian Heimesb186d002008-03-18 15:15:01 +000019581for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019582do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019583as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19584{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19585echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019587 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019588else
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019595/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19596 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19597#define $ac_func innocuous_$ac_func
19598
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019599/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019600 which can conflict with char $ac_func (); below.
19601 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019602 <limits.h> exists even on freestanding compilers. */
19603
19604#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019605# include <limits.h>
19606#else
19607# include <assert.h>
19608#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019609
19610#undef $ac_func
19611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019612/* Override any GCC internal prototype to avoid an error.
19613 Use char because int might match the return type of a GCC
19614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019615#ifdef __cplusplus
19616extern "C"
19617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019618char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019619/* The GNU C library defines this for functions which it implements
19620 to always fail with ENOSYS. Some functions are actually named
19621 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019622#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019623choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019624#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019625
Skip Montanaro6dead952003-09-25 14:50:04 +000019626int
19627main ()
19628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019629return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019630 ;
19631 return 0;
19632}
19633_ACEOF
19634rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019635if { (ac_try="$ac_link"
19636case "(($ac_try" in
19637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19638 *) ac_try_echo=$ac_try;;
19639esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019641 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 grep -v '^ *+' conftest.er1 >conftest.err
19644 rm -f conftest.er1
19645 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647 (exit $ac_status); } && {
19648 test -z "$ac_c_werror_flag" ||
19649 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019650 } && test -s conftest$ac_exeext &&
19651 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019652 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019653else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019655sed 's/^/| /' conftest.$ac_ext >&5
19656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019657 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019659
19660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019661 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019662fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019663ac_res=`eval echo '${'$as_ac_var'}'`
19664 { echo "$as_me:$LINENO: result: $ac_res" >&5
19665echo "${ECHO_T}$ac_res" >&6; }
19666if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019667 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019668#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019669_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019670
Martin v. Löwis1142de32002-03-29 16:28:31 +000019671else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019672 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019673 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019674 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19675 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019676esac
19677
Martin v. Löwis1142de32002-03-29 16:28:31 +000019678fi
19679done
19680
19681
Martin v. Löwis11437992002-04-12 09:54:03 +000019682
Martin v. Löwis1142de32002-03-29 16:28:31 +000019683for ac_func in getpgrp
19684do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019685as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19686{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19687echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019688if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019689 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019690else
Martin v. Löwis11437992002-04-12 09:54:03 +000019691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019692/* confdefs.h. */
19693_ACEOF
19694cat confdefs.h >>conftest.$ac_ext
19695cat >>conftest.$ac_ext <<_ACEOF
19696/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019697/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19698 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19699#define $ac_func innocuous_$ac_func
19700
Martin v. Löwis1142de32002-03-29 16:28:31 +000019701/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019702 which can conflict with char $ac_func (); below.
19703 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019704 <limits.h> exists even on freestanding compilers. */
19705
19706#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019707# include <limits.h>
19708#else
19709# include <assert.h>
19710#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019711
19712#undef $ac_func
19713
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019714/* Override any GCC internal prototype to avoid an error.
19715 Use char because int might match the return type of a GCC
19716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019717#ifdef __cplusplus
19718extern "C"
19719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019720char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019721/* The GNU C library defines this for functions which it implements
19722 to always fail with ENOSYS. Some functions are actually named
19723 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019724#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019725choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019726#endif
19727
Skip Montanaro6dead952003-09-25 14:50:04 +000019728int
19729main ()
19730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019731return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019732 ;
19733 return 0;
19734}
19735_ACEOF
19736rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019737if { (ac_try="$ac_link"
19738case "(($ac_try" in
19739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19740 *) ac_try_echo=$ac_try;;
19741esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019743 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019745 grep -v '^ *+' conftest.er1 >conftest.err
19746 rm -f conftest.er1
19747 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749 (exit $ac_status); } && {
19750 test -z "$ac_c_werror_flag" ||
19751 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019752 } && test -s conftest$ac_exeext &&
19753 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019754 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019755else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019757sed 's/^/| /' conftest.$ac_ext >&5
19758
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019759 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019761
19762rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019763 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019764fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019765ac_res=`eval echo '${'$as_ac_var'}'`
19766 { echo "$as_me:$LINENO: result: $ac_res" >&5
19767echo "${ECHO_T}$ac_res" >&6; }
19768if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019769 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019770#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019771_ACEOF
19772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019773/* confdefs.h. */
19774_ACEOF
19775cat confdefs.h >>conftest.$ac_ext
19776cat >>conftest.$ac_ext <<_ACEOF
19777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019778#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019779int
19780main ()
19781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019782getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019783 ;
19784 return 0;
19785}
19786_ACEOF
19787rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019788if { (ac_try="$ac_compile"
19789case "(($ac_try" in
19790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19791 *) ac_try_echo=$ac_try;;
19792esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019796 grep -v '^ *+' conftest.er1 >conftest.err
19797 rm -f conftest.er1
19798 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019800 (exit $ac_status); } && {
19801 test -z "$ac_c_werror_flag" ||
19802 test ! -s conftest.err
19803 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019804
19805cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019806#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019807_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019808
Martin v. Löwis11437992002-04-12 09:54:03 +000019809
Guido van Rossumf78abae1997-01-21 22:02:36 +000019810else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019812sed 's/^/| /' conftest.$ac_ext >&5
19813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019814
Guido van Rossum627b2d71993-12-24 10:39:16 +000019815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019816
19817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019818
Guido van Rossum627b2d71993-12-24 10:39:16 +000019819fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019820done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019821
Jack Jansen150753c2003-03-29 22:07:47 +000019822
19823for ac_func in setpgrp
19824do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019825as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19826{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19827echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019829 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019830else
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019832/* confdefs.h. */
19833_ACEOF
19834cat confdefs.h >>conftest.$ac_ext
19835cat >>conftest.$ac_ext <<_ACEOF
19836/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019837/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19838 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19839#define $ac_func innocuous_$ac_func
19840
Jack Jansen150753c2003-03-29 22:07:47 +000019841/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019842 which can conflict with char $ac_func (); below.
19843 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019844 <limits.h> exists even on freestanding compilers. */
19845
19846#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019847# include <limits.h>
19848#else
19849# include <assert.h>
19850#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019851
19852#undef $ac_func
19853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019854/* Override any GCC internal prototype to avoid an error.
19855 Use char because int might match the return type of a GCC
19856 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019857#ifdef __cplusplus
19858extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019859#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019860char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019861/* The GNU C library defines this for functions which it implements
19862 to always fail with ENOSYS. Some functions are actually named
19863 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019864#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019865choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019866#endif
19867
Skip Montanaro6dead952003-09-25 14:50:04 +000019868int
19869main ()
19870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019871return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019872 ;
19873 return 0;
19874}
19875_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019876rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019877if { (ac_try="$ac_link"
19878case "(($ac_try" in
19879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19880 *) ac_try_echo=$ac_try;;
19881esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019883 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019885 grep -v '^ *+' conftest.er1 >conftest.err
19886 rm -f conftest.er1
19887 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889 (exit $ac_status); } && {
19890 test -z "$ac_c_werror_flag" ||
19891 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019892 } && test -s conftest$ac_exeext &&
19893 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000019894 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019895else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019897sed 's/^/| /' conftest.$ac_ext >&5
19898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019899 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019901
19902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019904fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019905ac_res=`eval echo '${'$as_ac_var'}'`
19906 { echo "$as_me:$LINENO: result: $ac_res" >&5
19907echo "${ECHO_T}$ac_res" >&6; }
19908if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019909 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019910#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019911_ACEOF
19912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019913/* confdefs.h. */
19914_ACEOF
19915cat confdefs.h >>conftest.$ac_ext
19916cat >>conftest.$ac_ext <<_ACEOF
19917/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019918#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019919int
19920main ()
19921{
19922setpgrp(0,0);
19923 ;
19924 return 0;
19925}
19926_ACEOF
19927rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019928if { (ac_try="$ac_compile"
19929case "(($ac_try" in
19930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19931 *) ac_try_echo=$ac_try;;
19932esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019934 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019936 grep -v '^ *+' conftest.er1 >conftest.err
19937 rm -f conftest.er1
19938 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019940 (exit $ac_status); } && {
19941 test -z "$ac_c_werror_flag" ||
19942 test ! -s conftest.err
19943 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019944
19945cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019946#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019947_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019948
Jack Jansen150753c2003-03-29 22:07:47 +000019949
19950else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019952sed 's/^/| /' conftest.$ac_ext >&5
19953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019954
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019956
19957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019958
19959fi
19960done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019961
Martin v. Löwis11437992002-04-12 09:54:03 +000019962
Thomas Wouters3a584202000-08-05 23:28:51 +000019963for ac_func in gettimeofday
19964do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019965as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19966{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19967echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019968if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000019969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019970else
Martin v. Löwis11437992002-04-12 09:54:03 +000019971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019972/* confdefs.h. */
19973_ACEOF
19974cat confdefs.h >>conftest.$ac_ext
19975cat >>conftest.$ac_ext <<_ACEOF
19976/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019977/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19978 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19979#define $ac_func innocuous_$ac_func
19980
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019981/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019982 which can conflict with char $ac_func (); below.
19983 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019984 <limits.h> exists even on freestanding compilers. */
19985
19986#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019987# include <limits.h>
19988#else
19989# include <assert.h>
19990#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019991
19992#undef $ac_func
19993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019994/* Override any GCC internal prototype to avoid an error.
19995 Use char because int might match the return type of a GCC
19996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019997#ifdef __cplusplus
19998extern "C"
19999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020000char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020001/* The GNU C library defines this for functions which it implements
20002 to always fail with ENOSYS. Some functions are actually named
20003 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020005choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020006#endif
20007
Skip Montanaro6dead952003-09-25 14:50:04 +000020008int
20009main ()
20010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020011return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020012 ;
20013 return 0;
20014}
20015_ACEOF
20016rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020017if { (ac_try="$ac_link"
20018case "(($ac_try" in
20019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20020 *) ac_try_echo=$ac_try;;
20021esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020023 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020025 grep -v '^ *+' conftest.er1 >conftest.err
20026 rm -f conftest.er1
20027 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020029 (exit $ac_status); } && {
20030 test -z "$ac_c_werror_flag" ||
20031 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020032 } && test -s conftest$ac_exeext &&
20033 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020034 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020035else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020037sed 's/^/| /' conftest.$ac_ext >&5
20038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020039 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020041
20042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020043 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020044fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020045ac_res=`eval echo '${'$as_ac_var'}'`
20046 { echo "$as_me:$LINENO: result: $ac_res" >&5
20047echo "${ECHO_T}$ac_res" >&6; }
20048if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020051_ACEOF
20052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020053/* confdefs.h. */
20054_ACEOF
20055cat confdefs.h >>conftest.$ac_ext
20056cat >>conftest.$ac_ext <<_ACEOF
20057/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020058#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020059int
20060main ()
20061{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020062gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 ;
20064 return 0;
20065}
20066_ACEOF
20067rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020068if { (ac_try="$ac_compile"
20069case "(($ac_try" in
20070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20071 *) ac_try_echo=$ac_try;;
20072esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020074 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020076 grep -v '^ *+' conftest.er1 >conftest.err
20077 rm -f conftest.er1
20078 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020080 (exit $ac_status); } && {
20081 test -z "$ac_c_werror_flag" ||
20082 test ! -s conftest.err
20083 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020084 :
20085else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020087sed 's/^/| /' conftest.$ac_ext >&5
20088
Martin v. Löwis11437992002-04-12 09:54:03 +000020089
20090cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020091#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020092_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020093
Martin v. Löwis11437992002-04-12 09:54:03 +000020094
Guido van Rossum627b2d71993-12-24 10:39:16 +000020095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020096
20097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020099fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020100done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020101
Michael W. Hudson54241132001-12-07 15:38:26 +000020102
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020103{ echo "$as_me:$LINENO: checking for major" >&5
20104echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020106/* confdefs.h. */
20107_ACEOF
20108cat confdefs.h >>conftest.$ac_ext
20109cat >>conftest.$ac_ext <<_ACEOF
20110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020111
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020112#if defined(MAJOR_IN_MKDEV)
20113#include <sys/mkdev.h>
20114#elif defined(MAJOR_IN_SYSMACROS)
20115#include <sys/sysmacros.h>
20116#else
20117#include <sys/types.h>
20118#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020119
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020120int
20121main ()
20122{
20123
20124 makedev(major(0),minor(0));
20125
20126 ;
20127 return 0;
20128}
20129_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020130rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020131if { (ac_try="$ac_link"
20132case "(($ac_try" in
20133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20134 *) ac_try_echo=$ac_try;;
20135esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020137 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020139 grep -v '^ *+' conftest.er1 >conftest.err
20140 rm -f conftest.er1
20141 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020143 (exit $ac_status); } && {
20144 test -z "$ac_c_werror_flag" ||
20145 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020146 } && test -s conftest$ac_exeext &&
20147 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020148
20149
20150cat >>confdefs.h <<\_ACEOF
20151#define HAVE_DEVICE_MACROS 1
20152_ACEOF
20153
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020154 { echo "$as_me:$LINENO: result: yes" >&5
20155echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020156
20157else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020159sed 's/^/| /' conftest.$ac_ext >&5
20160
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020161
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020162 { echo "$as_me:$LINENO: result: no" >&5
20163echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020164
20165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020166
20167rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020169
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020170# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020171# for [no]getaddrinfo in netdb.h.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020172{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20173echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020175/* confdefs.h. */
20176_ACEOF
20177cat confdefs.h >>conftest.$ac_ext
20178cat >>conftest.$ac_ext <<_ACEOF
20179/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020180
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020181#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020182#include <sys/socket.h>
20183#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020184#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020185
Martin v. Löwis11437992002-04-12 09:54:03 +000020186int
20187main ()
20188{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020189getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020190 ;
20191 return 0;
20192}
20193_ACEOF
20194rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195if { (ac_try="$ac_link"
20196case "(($ac_try" in
20197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20198 *) ac_try_echo=$ac_try;;
20199esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020201 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020203 grep -v '^ *+' conftest.er1 >conftest.err
20204 rm -f conftest.er1
20205 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020207 (exit $ac_status); } && {
20208 test -z "$ac_c_werror_flag" ||
20209 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020210 } && test -s conftest$ac_exeext &&
20211 $as_test_x conftest$ac_exeext; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020212 have_getaddrinfo=yes
20213else
20214 echo "$as_me: failed program was:" >&5
20215sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020216
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020217 have_getaddrinfo=no
20218fi
20219
20220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20221 conftest$ac_exeext conftest.$ac_ext
20222{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20223echo "${ECHO_T}$have_getaddrinfo" >&6; }
20224if test $have_getaddrinfo = yes
20225then
20226 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020227echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020228 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20229 echo $ECHO_N "(cached) $ECHO_C" >&6
20230else
20231 if test "$cross_compiling" = yes; then
20232 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020233else
Martin v. Löwis11437992002-04-12 09:54:03 +000020234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020235/* confdefs.h. */
20236_ACEOF
20237cat confdefs.h >>conftest.$ac_ext
20238cat >>conftest.$ac_ext <<_ACEOF
20239/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020240
20241#include <sys/types.h>
20242#include <netdb.h>
20243#include <string.h>
20244#include <sys/socket.h>
20245#include <netinet/in.h>
20246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020247int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020248{
20249 int passive, gaierr, inet4 = 0, inet6 = 0;
20250 struct addrinfo hints, *ai, *aitop;
20251 char straddr[INET6_ADDRSTRLEN], strport[16];
20252
20253 for (passive = 0; passive <= 1; passive++) {
20254 memset(&hints, 0, sizeof(hints));
20255 hints.ai_family = AF_UNSPEC;
20256 hints.ai_flags = passive ? AI_PASSIVE : 0;
20257 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020258 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020259 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20260 (void)gai_strerror(gaierr);
20261 goto bad;
20262 }
20263 for (ai = aitop; ai; ai = ai->ai_next) {
20264 if (ai->ai_addr == NULL ||
20265 ai->ai_addrlen == 0 ||
20266 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20267 straddr, sizeof(straddr), strport, sizeof(strport),
20268 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20269 goto bad;
20270 }
20271 switch (ai->ai_family) {
20272 case AF_INET:
20273 if (strcmp(strport, "54321") != 0) {
20274 goto bad;
20275 }
20276 if (passive) {
20277 if (strcmp(straddr, "0.0.0.0") != 0) {
20278 goto bad;
20279 }
20280 } else {
20281 if (strcmp(straddr, "127.0.0.1") != 0) {
20282 goto bad;
20283 }
20284 }
20285 inet4++;
20286 break;
20287 case AF_INET6:
20288 if (strcmp(strport, "54321") != 0) {
20289 goto bad;
20290 }
20291 if (passive) {
20292 if (strcmp(straddr, "::") != 0) {
20293 goto bad;
20294 }
20295 } else {
20296 if (strcmp(straddr, "::1") != 0) {
20297 goto bad;
20298 }
20299 }
20300 inet6++;
20301 break;
20302 case AF_UNSPEC:
20303 goto bad;
20304 break;
20305 default:
20306 /* another family support? */
20307 break;
20308 }
20309 }
20310 }
20311
20312 if (!(inet4 == 0 || inet4 == 2))
20313 goto bad;
20314 if (!(inet6 == 0 || inet6 == 2))
20315 goto bad;
20316
20317 if (aitop)
20318 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020319 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020320
20321 bad:
20322 if (aitop)
20323 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020324 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020325}
20326
Martin v. Löwis11437992002-04-12 09:54:03 +000020327_ACEOF
20328rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020329if { (ac_try="$ac_link"
20330case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020335 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020336 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020338 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020339 { (case "(($ac_try" in
20340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20341 *) ac_try_echo=$ac_try;;
20342esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020344 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020347 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020348 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020349else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020350 echo "$as_me: program exited with status $ac_status" >&5
20351echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020352sed 's/^/| /' conftest.$ac_ext >&5
20353
Martin v. Löwis11437992002-04-12 09:54:03 +000020354( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020355ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357rm -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 +000020358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020359
20360
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020361fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020362
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020364
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020365if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20366then
20367 if test $ipv6 = yes
20368 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020369 echo 'Fatal: You must get working getaddrinfo() function.'
20370 echo ' or you can specify "--disable-ipv6"'.
20371 exit 1
20372 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020373else
Martin v. Löwis11437992002-04-12 09:54:03 +000020374
20375cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020376#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020377_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020378
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020380
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020381for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020382do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020383as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20384{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20385echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020386if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020387 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020388else
Martin v. Löwis11437992002-04-12 09:54:03 +000020389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020390/* confdefs.h. */
20391_ACEOF
20392cat confdefs.h >>conftest.$ac_ext
20393cat >>conftest.$ac_ext <<_ACEOF
20394/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020395/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20396 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20397#define $ac_func innocuous_$ac_func
20398
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020399/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020400 which can conflict with char $ac_func (); below.
20401 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020402 <limits.h> exists even on freestanding compilers. */
20403
20404#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020405# include <limits.h>
20406#else
20407# include <assert.h>
20408#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020409
20410#undef $ac_func
20411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020412/* Override any GCC internal prototype to avoid an error.
20413 Use char because int might match the return type of a GCC
20414 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020415#ifdef __cplusplus
20416extern "C"
20417#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020418char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020419/* The GNU C library defines this for functions which it implements
20420 to always fail with ENOSYS. Some functions are actually named
20421 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020423choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020424#endif
20425
Skip Montanaro6dead952003-09-25 14:50:04 +000020426int
20427main ()
20428{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 ;
20431 return 0;
20432}
20433_ACEOF
20434rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020435if { (ac_try="$ac_link"
20436case "(($ac_try" in
20437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20438 *) ac_try_echo=$ac_try;;
20439esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020441 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020443 grep -v '^ *+' conftest.er1 >conftest.err
20444 rm -f conftest.er1
20445 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020447 (exit $ac_status); } && {
20448 test -z "$ac_c_werror_flag" ||
20449 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020450 } && test -s conftest$ac_exeext &&
20451 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020452 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020453else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020455sed 's/^/| /' conftest.$ac_ext >&5
20456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020457 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020459
20460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020461 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020462fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020463ac_res=`eval echo '${'$as_ac_var'}'`
20464 { echo "$as_me:$LINENO: result: $ac_res" >&5
20465echo "${ECHO_T}$ac_res" >&6; }
20466if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020467 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020468#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020469_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020470
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020471fi
20472done
20473
Michael W. Hudson54241132001-12-07 15:38:26 +000020474
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020475# checks for structures
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020476{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20477echo $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 +000020478if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020479 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020480else
Martin v. Löwis11437992002-04-12 09:54:03 +000020481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020482/* confdefs.h. */
20483_ACEOF
20484cat confdefs.h >>conftest.$ac_ext
20485cat >>conftest.$ac_ext <<_ACEOF
20486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020487#include <sys/types.h>
20488#include <sys/time.h>
20489#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020490
Martin v. Löwis11437992002-04-12 09:54:03 +000020491int
20492main ()
20493{
20494if ((struct tm *) 0)
20495return 0;
20496 ;
20497 return 0;
20498}
20499_ACEOF
20500rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020501if { (ac_try="$ac_compile"
20502case "(($ac_try" in
20503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20504 *) ac_try_echo=$ac_try;;
20505esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020509 grep -v '^ *+' conftest.er1 >conftest.err
20510 rm -f conftest.er1
20511 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020513 (exit $ac_status); } && {
20514 test -z "$ac_c_werror_flag" ||
20515 test ! -s conftest.err
20516 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020517 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020518else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020520sed 's/^/| /' conftest.$ac_ext >&5
20521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020522 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020524
20525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020527{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20528echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020529if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020530
20531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020532#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020533_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020534
20535fi
20536
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020537{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20538echo $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 +000020539if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020540 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020541else
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020543/* confdefs.h. */
20544_ACEOF
20545cat confdefs.h >>conftest.$ac_ext
20546cat >>conftest.$ac_ext <<_ACEOF
20547/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020548#include <sys/types.h>
20549#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020550
Martin v. Löwis11437992002-04-12 09:54:03 +000020551int
20552main ()
20553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020554struct tm tm;
20555 int *p = &tm.tm_sec;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020556 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 ;
20558 return 0;
20559}
20560_ACEOF
20561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020562if { (ac_try="$ac_compile"
20563case "(($ac_try" in
20564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20565 *) ac_try_echo=$ac_try;;
20566esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020570 grep -v '^ *+' conftest.er1 >conftest.err
20571 rm -f conftest.er1
20572 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020574 (exit $ac_status); } && {
20575 test -z "$ac_c_werror_flag" ||
20576 test ! -s conftest.err
20577 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020578 ac_cv_struct_tm=time.h
20579else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020581sed 's/^/| /' conftest.$ac_ext >&5
20582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020583 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020585
20586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020587fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020588{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20589echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020590if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020591
20592cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020593#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020594_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020595
20596fi
20597
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020598{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20599echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020600if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020601 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020602else
Martin v. Löwis11437992002-04-12 09:54:03 +000020603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020609#include <sys/types.h>
20610#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020611
20612
Martin v. Löwis11437992002-04-12 09:54:03 +000020613int
20614main ()
20615{
20616static struct tm ac_aggr;
20617if (ac_aggr.tm_zone)
20618return 0;
20619 ;
20620 return 0;
20621}
20622_ACEOF
20623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020624if { (ac_try="$ac_compile"
20625case "(($ac_try" in
20626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20627 *) ac_try_echo=$ac_try;;
20628esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020631 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020632 grep -v '^ *+' conftest.er1 >conftest.err
20633 rm -f conftest.er1
20634 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020636 (exit $ac_status); } && {
20637 test -z "$ac_c_werror_flag" ||
20638 test ! -s conftest.err
20639 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020640 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020641else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020643sed 's/^/| /' conftest.$ac_ext >&5
20644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020645 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020646/* confdefs.h. */
20647_ACEOF
20648cat confdefs.h >>conftest.$ac_ext
20649cat >>conftest.$ac_ext <<_ACEOF
20650/* end confdefs.h. */
20651#include <sys/types.h>
20652#include <$ac_cv_struct_tm>
20653
20654
20655int
20656main ()
20657{
20658static struct tm ac_aggr;
20659if (sizeof ac_aggr.tm_zone)
20660return 0;
20661 ;
20662 return 0;
20663}
20664_ACEOF
20665rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020666if { (ac_try="$ac_compile"
20667case "(($ac_try" in
20668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20669 *) ac_try_echo=$ac_try;;
20670esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020672 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020674 grep -v '^ *+' conftest.er1 >conftest.err
20675 rm -f conftest.er1
20676 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020678 (exit $ac_status); } && {
20679 test -z "$ac_c_werror_flag" ||
20680 test ! -s conftest.err
20681 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020682 ac_cv_member_struct_tm_tm_zone=yes
20683else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020685sed 's/^/| /' conftest.$ac_ext >&5
20686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020687 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689
20690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020692
20693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020694fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020695{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20696echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20697if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020698
20699cat >>confdefs.h <<_ACEOF
20700#define HAVE_STRUCT_TM_TM_ZONE 1
20701_ACEOF
20702
20703
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020704fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020705
Martin v. Löwis11437992002-04-12 09:54:03 +000020706if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20707
20708cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020709#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020710_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020711
20712else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020713 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20714echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020715if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020716 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020717else
20718 cat >conftest.$ac_ext <<_ACEOF
20719/* confdefs.h. */
20720_ACEOF
20721cat confdefs.h >>conftest.$ac_ext
20722cat >>conftest.$ac_ext <<_ACEOF
20723/* end confdefs.h. */
20724#include <time.h>
20725
20726int
20727main ()
20728{
20729#ifndef tzname
20730 (void) tzname;
20731#endif
20732
20733 ;
20734 return 0;
20735}
20736_ACEOF
20737rm -f conftest.$ac_objext
20738if { (ac_try="$ac_compile"
20739case "(($ac_try" in
20740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20741 *) ac_try_echo=$ac_try;;
20742esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020744 (eval "$ac_compile") 2>conftest.er1
20745 ac_status=$?
20746 grep -v '^ *+' conftest.er1 >conftest.err
20747 rm -f conftest.er1
20748 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020750 (exit $ac_status); } && {
20751 test -z "$ac_c_werror_flag" ||
20752 test ! -s conftest.err
20753 } && test -s conftest.$ac_objext; then
20754 ac_cv_have_decl_tzname=yes
20755else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020756 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757sed 's/^/| /' conftest.$ac_ext >&5
20758
20759 ac_cv_have_decl_tzname=no
20760fi
20761
20762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20763fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020764{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20765echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20766if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020767
20768cat >>confdefs.h <<_ACEOF
20769#define HAVE_DECL_TZNAME 1
20770_ACEOF
20771
20772
20773else
20774 cat >>confdefs.h <<_ACEOF
20775#define HAVE_DECL_TZNAME 0
20776_ACEOF
20777
20778
20779fi
20780
20781
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020782 { echo "$as_me:$LINENO: checking for tzname" >&5
20783echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020784if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020786else
Martin v. Löwis11437992002-04-12 09:54:03 +000020787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020788/* confdefs.h. */
20789_ACEOF
20790cat confdefs.h >>conftest.$ac_ext
20791cat >>conftest.$ac_ext <<_ACEOF
20792/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020793#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020794#if !HAVE_DECL_TZNAME
20795extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020797
Martin v. Löwis11437992002-04-12 09:54:03 +000020798int
20799main ()
20800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020801return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020802 ;
20803 return 0;
20804}
20805_ACEOF
20806rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020807if { (ac_try="$ac_link"
20808case "(($ac_try" in
20809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20810 *) ac_try_echo=$ac_try;;
20811esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020815 grep -v '^ *+' conftest.er1 >conftest.err
20816 rm -f conftest.er1
20817 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819 (exit $ac_status); } && {
20820 test -z "$ac_c_werror_flag" ||
20821 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020822 } && test -s conftest$ac_exeext &&
20823 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020824 ac_cv_var_tzname=yes
20825else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020827sed 's/^/| /' conftest.$ac_ext >&5
20828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020829 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831
20832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020833 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020834fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020835{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20836echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020837 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020838
20839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020840#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020841_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020842
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020843 fi
20844fi
20845
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020846{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20847echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020848if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020849 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020850else
20851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020852/* confdefs.h. */
20853_ACEOF
20854cat confdefs.h >>conftest.$ac_ext
20855cat >>conftest.$ac_ext <<_ACEOF
20856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020857$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020858int
20859main ()
20860{
20861static struct stat ac_aggr;
20862if (ac_aggr.st_rdev)
20863return 0;
20864 ;
20865 return 0;
20866}
20867_ACEOF
20868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020869if { (ac_try="$ac_compile"
20870case "(($ac_try" in
20871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20872 *) ac_try_echo=$ac_try;;
20873esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020875 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020877 grep -v '^ *+' conftest.er1 >conftest.err
20878 rm -f conftest.er1
20879 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020881 (exit $ac_status); } && {
20882 test -z "$ac_c_werror_flag" ||
20883 test ! -s conftest.err
20884 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020885 ac_cv_member_struct_stat_st_rdev=yes
20886else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020888sed 's/^/| /' conftest.$ac_ext >&5
20889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020891/* confdefs.h. */
20892_ACEOF
20893cat confdefs.h >>conftest.$ac_ext
20894cat >>conftest.$ac_ext <<_ACEOF
20895/* end confdefs.h. */
20896$ac_includes_default
20897int
20898main ()
20899{
20900static struct stat ac_aggr;
20901if (sizeof ac_aggr.st_rdev)
20902return 0;
20903 ;
20904 return 0;
20905}
20906_ACEOF
20907rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908if { (ac_try="$ac_compile"
20909case "(($ac_try" in
20910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20911 *) ac_try_echo=$ac_try;;
20912esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020914 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020916 grep -v '^ *+' conftest.er1 >conftest.err
20917 rm -f conftest.er1
20918 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020920 (exit $ac_status); } && {
20921 test -z "$ac_c_werror_flag" ||
20922 test ! -s conftest.err
20923 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020924 ac_cv_member_struct_stat_st_rdev=yes
20925else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020927sed 's/^/| /' conftest.$ac_ext >&5
20928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020929 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020931
20932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020934
20935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020936fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020937{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20938echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
20939if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020940
20941cat >>confdefs.h <<_ACEOF
20942#define HAVE_STRUCT_STAT_ST_RDEV 1
20943_ACEOF
20944
20945
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020946fi
20947
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020948{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20949echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020950if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020952else
Martin v. Löwis11437992002-04-12 09:54:03 +000020953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020954/* confdefs.h. */
20955_ACEOF
20956cat confdefs.h >>conftest.$ac_ext
20957cat >>conftest.$ac_ext <<_ACEOF
20958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020959$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020960int
20961main ()
20962{
20963static struct stat ac_aggr;
20964if (ac_aggr.st_blksize)
20965return 0;
20966 ;
20967 return 0;
20968}
20969_ACEOF
20970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020971if { (ac_try="$ac_compile"
20972case "(($ac_try" in
20973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20974 *) ac_try_echo=$ac_try;;
20975esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020979 grep -v '^ *+' conftest.er1 >conftest.err
20980 rm -f conftest.er1
20981 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020983 (exit $ac_status); } && {
20984 test -z "$ac_c_werror_flag" ||
20985 test ! -s conftest.err
20986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020988else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000020989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020990sed 's/^/| /' conftest.$ac_ext >&5
20991
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020993/* confdefs.h. */
20994_ACEOF
20995cat confdefs.h >>conftest.$ac_ext
20996cat >>conftest.$ac_ext <<_ACEOF
20997/* end confdefs.h. */
20998$ac_includes_default
20999int
21000main ()
21001{
21002static struct stat ac_aggr;
21003if (sizeof ac_aggr.st_blksize)
21004return 0;
21005 ;
21006 return 0;
21007}
21008_ACEOF
21009rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021010if { (ac_try="$ac_compile"
21011case "(($ac_try" in
21012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21013 *) ac_try_echo=$ac_try;;
21014esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021018 grep -v '^ *+' conftest.er1 >conftest.err
21019 rm -f conftest.er1
21020 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021022 (exit $ac_status); } && {
21023 test -z "$ac_c_werror_flag" ||
21024 test ! -s conftest.err
21025 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021026 ac_cv_member_struct_stat_st_blksize=yes
21027else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021029sed 's/^/| /' conftest.$ac_ext >&5
21030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021031 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021033
21034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021036
21037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021038fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021039{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21040echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21041if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021042
Martin v. Löwis11437992002-04-12 09:54:03 +000021043cat >>confdefs.h <<_ACEOF
21044#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21045_ACEOF
21046
21047
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021048fi
21049
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021050{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21051echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021052if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021053 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021054else
21055 cat >conftest.$ac_ext <<_ACEOF
21056/* confdefs.h. */
21057_ACEOF
21058cat confdefs.h >>conftest.$ac_ext
21059cat >>conftest.$ac_ext <<_ACEOF
21060/* end confdefs.h. */
21061$ac_includes_default
21062int
21063main ()
21064{
21065static struct stat ac_aggr;
21066if (ac_aggr.st_flags)
21067return 0;
21068 ;
21069 return 0;
21070}
21071_ACEOF
21072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021073if { (ac_try="$ac_compile"
21074case "(($ac_try" in
21075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21076 *) ac_try_echo=$ac_try;;
21077esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021079 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021080 ac_status=$?
21081 grep -v '^ *+' conftest.er1 >conftest.err
21082 rm -f conftest.er1
21083 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085 (exit $ac_status); } && {
21086 test -z "$ac_c_werror_flag" ||
21087 test ! -s conftest.err
21088 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021089 ac_cv_member_struct_stat_st_flags=yes
21090else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021091 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021092sed 's/^/| /' conftest.$ac_ext >&5
21093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021094 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021095/* confdefs.h. */
21096_ACEOF
21097cat confdefs.h >>conftest.$ac_ext
21098cat >>conftest.$ac_ext <<_ACEOF
21099/* end confdefs.h. */
21100$ac_includes_default
21101int
21102main ()
21103{
21104static struct stat ac_aggr;
21105if (sizeof ac_aggr.st_flags)
21106return 0;
21107 ;
21108 return 0;
21109}
21110_ACEOF
21111rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021112if { (ac_try="$ac_compile"
21113case "(($ac_try" in
21114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21115 *) ac_try_echo=$ac_try;;
21116esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021118 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021119 ac_status=$?
21120 grep -v '^ *+' conftest.er1 >conftest.err
21121 rm -f conftest.er1
21122 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021124 (exit $ac_status); } && {
21125 test -z "$ac_c_werror_flag" ||
21126 test ! -s conftest.err
21127 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021128 ac_cv_member_struct_stat_st_flags=yes
21129else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021130 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021131sed 's/^/| /' conftest.$ac_ext >&5
21132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021133 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021135
21136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021138
21139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021140fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021141{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21142echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21143if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021144
21145cat >>confdefs.h <<_ACEOF
21146#define HAVE_STRUCT_STAT_ST_FLAGS 1
21147_ACEOF
21148
21149
21150fi
21151
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021152{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21153echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021154if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021155 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021156else
21157 cat >conftest.$ac_ext <<_ACEOF
21158/* confdefs.h. */
21159_ACEOF
21160cat confdefs.h >>conftest.$ac_ext
21161cat >>conftest.$ac_ext <<_ACEOF
21162/* end confdefs.h. */
21163$ac_includes_default
21164int
21165main ()
21166{
21167static struct stat ac_aggr;
21168if (ac_aggr.st_gen)
21169return 0;
21170 ;
21171 return 0;
21172}
21173_ACEOF
21174rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021175if { (ac_try="$ac_compile"
21176case "(($ac_try" in
21177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21178 *) ac_try_echo=$ac_try;;
21179esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021182 ac_status=$?
21183 grep -v '^ *+' conftest.er1 >conftest.err
21184 rm -f conftest.er1
21185 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021187 (exit $ac_status); } && {
21188 test -z "$ac_c_werror_flag" ||
21189 test ! -s conftest.err
21190 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021191 ac_cv_member_struct_stat_st_gen=yes
21192else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021193 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021194sed 's/^/| /' conftest.$ac_ext >&5
21195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021196 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021197/* confdefs.h. */
21198_ACEOF
21199cat confdefs.h >>conftest.$ac_ext
21200cat >>conftest.$ac_ext <<_ACEOF
21201/* end confdefs.h. */
21202$ac_includes_default
21203int
21204main ()
21205{
21206static struct stat ac_aggr;
21207if (sizeof ac_aggr.st_gen)
21208return 0;
21209 ;
21210 return 0;
21211}
21212_ACEOF
21213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214if { (ac_try="$ac_compile"
21215case "(($ac_try" in
21216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21217 *) ac_try_echo=$ac_try;;
21218esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021220 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021221 ac_status=$?
21222 grep -v '^ *+' conftest.er1 >conftest.err
21223 rm -f conftest.er1
21224 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021226 (exit $ac_status); } && {
21227 test -z "$ac_c_werror_flag" ||
21228 test ! -s conftest.err
21229 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021230 ac_cv_member_struct_stat_st_gen=yes
21231else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021232 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021233sed 's/^/| /' conftest.$ac_ext >&5
21234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021237
21238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021240
21241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021242fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021243{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21244echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21245if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021246
21247cat >>confdefs.h <<_ACEOF
21248#define HAVE_STRUCT_STAT_ST_GEN 1
21249_ACEOF
21250
21251
21252fi
21253
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021254{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21255echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021256if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021257 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021258else
21259 cat >conftest.$ac_ext <<_ACEOF
21260/* confdefs.h. */
21261_ACEOF
21262cat confdefs.h >>conftest.$ac_ext
21263cat >>conftest.$ac_ext <<_ACEOF
21264/* end confdefs.h. */
21265$ac_includes_default
21266int
21267main ()
21268{
21269static struct stat ac_aggr;
21270if (ac_aggr.st_birthtime)
21271return 0;
21272 ;
21273 return 0;
21274}
21275_ACEOF
21276rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021277if { (ac_try="$ac_compile"
21278case "(($ac_try" in
21279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21280 *) ac_try_echo=$ac_try;;
21281esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021283 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021284 ac_status=$?
21285 grep -v '^ *+' conftest.er1 >conftest.err
21286 rm -f conftest.er1
21287 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021289 (exit $ac_status); } && {
21290 test -z "$ac_c_werror_flag" ||
21291 test ! -s conftest.err
21292 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021293 ac_cv_member_struct_stat_st_birthtime=yes
21294else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021295 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021296sed 's/^/| /' conftest.$ac_ext >&5
21297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021298 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021299/* confdefs.h. */
21300_ACEOF
21301cat confdefs.h >>conftest.$ac_ext
21302cat >>conftest.$ac_ext <<_ACEOF
21303/* end confdefs.h. */
21304$ac_includes_default
21305int
21306main ()
21307{
21308static struct stat ac_aggr;
21309if (sizeof ac_aggr.st_birthtime)
21310return 0;
21311 ;
21312 return 0;
21313}
21314_ACEOF
21315rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316if { (ac_try="$ac_compile"
21317case "(($ac_try" in
21318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21319 *) ac_try_echo=$ac_try;;
21320esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021323 ac_status=$?
21324 grep -v '^ *+' conftest.er1 >conftest.err
21325 rm -f conftest.er1
21326 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021328 (exit $ac_status); } && {
21329 test -z "$ac_c_werror_flag" ||
21330 test ! -s conftest.err
21331 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021332 ac_cv_member_struct_stat_st_birthtime=yes
21333else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021334 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021335sed 's/^/| /' conftest.$ac_ext >&5
21336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021337 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021339
21340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342
21343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021344fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021345{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21346echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21347if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021348
21349cat >>confdefs.h <<_ACEOF
21350#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21351_ACEOF
21352
21353
21354fi
21355
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021356{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21357echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021358if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021359 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021360else
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021362/* confdefs.h. */
21363_ACEOF
21364cat confdefs.h >>conftest.$ac_ext
21365cat >>conftest.$ac_ext <<_ACEOF
21366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021367$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021368int
21369main ()
21370{
21371static struct stat ac_aggr;
21372if (ac_aggr.st_blocks)
21373return 0;
21374 ;
21375 return 0;
21376}
21377_ACEOF
21378rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021379if { (ac_try="$ac_compile"
21380case "(($ac_try" in
21381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21382 *) ac_try_echo=$ac_try;;
21383esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021387 grep -v '^ *+' conftest.er1 >conftest.err
21388 rm -f conftest.er1
21389 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021391 (exit $ac_status); } && {
21392 test -z "$ac_c_werror_flag" ||
21393 test ! -s conftest.err
21394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021396else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021398sed 's/^/| /' conftest.$ac_ext >&5
21399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021401/* confdefs.h. */
21402_ACEOF
21403cat confdefs.h >>conftest.$ac_ext
21404cat >>conftest.$ac_ext <<_ACEOF
21405/* end confdefs.h. */
21406$ac_includes_default
21407int
21408main ()
21409{
21410static struct stat ac_aggr;
21411if (sizeof ac_aggr.st_blocks)
21412return 0;
21413 ;
21414 return 0;
21415}
21416_ACEOF
21417rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021418if { (ac_try="$ac_compile"
21419case "(($ac_try" in
21420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21421 *) ac_try_echo=$ac_try;;
21422esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021426 grep -v '^ *+' conftest.er1 >conftest.err
21427 rm -f conftest.er1
21428 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021430 (exit $ac_status); } && {
21431 test -z "$ac_c_werror_flag" ||
21432 test ! -s conftest.err
21433 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021434 ac_cv_member_struct_stat_st_blocks=yes
21435else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021437sed 's/^/| /' conftest.$ac_ext >&5
21438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021439 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021441
21442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021444
21445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021446fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021447{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21448echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21449if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021450
Martin v. Löwis11437992002-04-12 09:54:03 +000021451cat >>confdefs.h <<_ACEOF
21452#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21453_ACEOF
21454
21455
21456cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021457#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021458_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021459
21460else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021461 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021462 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021463 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21464 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021465esac
21466
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021467fi
21468
Michael W. Hudson54241132001-12-07 15:38:26 +000021469
Martin v. Löwis11437992002-04-12 09:54:03 +000021470
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021471{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21472echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021473if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021474 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021475else
Martin v. Löwis11437992002-04-12 09:54:03 +000021476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021477/* confdefs.h. */
21478_ACEOF
21479cat confdefs.h >>conftest.$ac_ext
21480cat >>conftest.$ac_ext <<_ACEOF
21481/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021482#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021483int
21484main ()
21485{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021486return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021487 ;
21488 return 0;
21489}
21490_ACEOF
21491rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021492if { (ac_try="$ac_compile"
21493case "(($ac_try" in
21494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21495 *) ac_try_echo=$ac_try;;
21496esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021500 grep -v '^ *+' conftest.er1 >conftest.err
21501 rm -f conftest.er1
21502 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021504 (exit $ac_status); } && {
21505 test -z "$ac_c_werror_flag" ||
21506 test ! -s conftest.err
21507 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021508 ac_cv_header_time_altzone=yes
21509else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021511sed 's/^/| /' conftest.$ac_ext >&5
21512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021513 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021514fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21517fi
21518
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021519{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21520echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021521if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021522
21523cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021524#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021526
21527fi
21528
Guido van Rossumda88dad1995-01-26 00:46:29 +000021529was_it_defined=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021530{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21531echo $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 +000021532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021533/* confdefs.h. */
21534_ACEOF
21535cat confdefs.h >>conftest.$ac_ext
21536cat >>conftest.$ac_ext <<_ACEOF
21537/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021538
21539#include <sys/types.h>
21540#include <sys/select.h>
21541#include <sys/time.h>
21542
Martin v. Löwis11437992002-04-12 09:54:03 +000021543int
21544main ()
21545{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021546;
Martin v. Löwis11437992002-04-12 09:54:03 +000021547 ;
21548 return 0;
21549}
21550_ACEOF
21551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021552if { (ac_try="$ac_compile"
21553case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021560 grep -v '^ *+' conftest.er1 >conftest.err
21561 rm -f conftest.er1
21562 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564 (exit $ac_status); } && {
21565 test -z "$ac_c_werror_flag" ||
21566 test ! -s conftest.err
21567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021568
21569
21570cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021571#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021572_ACEOF
21573
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021574 was_it_defined=yes
21575
Guido van Rossumf78abae1997-01-21 22:02:36 +000021576else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021578sed 's/^/| /' conftest.$ac_ext >&5
21579
Thomas Wouters477c8d52006-05-27 19:21:47 +000021580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021581fi
21582
21583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021584{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21585echo "${ECHO_T}$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021586
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021587{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21588echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021589if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021590 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021591else
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021593/* confdefs.h. */
21594_ACEOF
21595cat confdefs.h >>conftest.$ac_ext
21596cat >>conftest.$ac_ext <<_ACEOF
21597/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021598
21599# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021600int
21601main ()
21602{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021603struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021604 ;
21605 return 0;
21606}
21607_ACEOF
21608rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021609if { (ac_try="$ac_compile"
21610case "(($ac_try" in
21611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21612 *) ac_try_echo=$ac_try;;
21613esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021615 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021616 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021617 grep -v '^ *+' conftest.er1 >conftest.err
21618 rm -f conftest.er1
21619 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021621 (exit $ac_status); } && {
21622 test -z "$ac_c_werror_flag" ||
21623 test ! -s conftest.err
21624 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021625 ac_cv_struct_addrinfo=yes
21626else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021628sed 's/^/| /' conftest.$ac_ext >&5
21629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021630 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021631fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21634fi
21635
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021636{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21637echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021638if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021639
21640cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021641#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021642_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021643
21644fi
21645
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021646{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21647echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021648if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021650else
Martin v. Löwis11437992002-04-12 09:54:03 +000021651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021652/* confdefs.h. */
21653_ACEOF
21654cat confdefs.h >>conftest.$ac_ext
21655cat >>conftest.$ac_ext <<_ACEOF
21656/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021657
21658# include <sys/types.h>
21659# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021660int
21661main ()
21662{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021663struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021664 ;
21665 return 0;
21666}
21667_ACEOF
21668rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669if { (ac_try="$ac_compile"
21670case "(($ac_try" in
21671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21672 *) ac_try_echo=$ac_try;;
21673esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021675 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021677 grep -v '^ *+' conftest.er1 >conftest.err
21678 rm -f conftest.er1
21679 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021681 (exit $ac_status); } && {
21682 test -z "$ac_c_werror_flag" ||
21683 test ! -s conftest.err
21684 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021685 ac_cv_struct_sockaddr_storage=yes
21686else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021688sed 's/^/| /' conftest.$ac_ext >&5
21689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021690 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021691fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21694fi
21695
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021696{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21697echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021698if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021699
21700cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021701#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021702_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021703
21704fi
21705
Guido van Rossum627b2d71993-12-24 10:39:16 +000021706# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021707
Michael W. Hudson54241132001-12-07 15:38:26 +000021708
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021709{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21710echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021711if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021712 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021713else
Martin v. Löwis11437992002-04-12 09:54:03 +000021714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021715/* confdefs.h. */
21716_ACEOF
21717cat confdefs.h >>conftest.$ac_ext
21718cat >>conftest.$ac_ext <<_ACEOF
21719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021720$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021721int
21722main ()
21723{
21724static int test_array [1 - 2 * !(((char) -1) < 0)];
21725test_array [0] = 0
21726
21727 ;
21728 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021729}
Martin v. Löwis11437992002-04-12 09:54:03 +000021730_ACEOF
21731rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021732if { (ac_try="$ac_compile"
21733case "(($ac_try" in
21734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21735 *) ac_try_echo=$ac_try;;
21736esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021740 grep -v '^ *+' conftest.er1 >conftest.err
21741 rm -f conftest.er1
21742 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021744 (exit $ac_status); } && {
21745 test -z "$ac_c_werror_flag" ||
21746 test ! -s conftest.err
21747 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021748 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021749else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021751sed 's/^/| /' conftest.$ac_ext >&5
21752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021753 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021755
21756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021757fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021758{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21759echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021760if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021761 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021762#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021763_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021764
21765fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021766
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021767{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21768echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021769if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021770 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021771else
21772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021773/* confdefs.h. */
21774_ACEOF
21775cat confdefs.h >>conftest.$ac_ext
21776cat >>conftest.$ac_ext <<_ACEOF
21777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021778
Martin v. Löwis11437992002-04-12 09:54:03 +000021779int
21780main ()
21781{
21782/* FIXME: Include the comments suggested by Paul. */
21783#ifndef __cplusplus
21784 /* Ultrix mips cc rejects this. */
21785 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021786 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021787 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021788 char const *const *pcpcc;
21789 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021790 /* NEC SVR4.0.2 mips cc rejects this. */
21791 struct point {int x, y;};
21792 static struct point const zero = {0,0};
21793 /* AIX XL C 1.02.0.0 rejects this.
21794 It does not let you subtract one const X* pointer from another in
21795 an arm of an if-expression whose if-part is not a constant
21796 expression */
21797 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021800 ++pcpcc;
21801 ppc = (char**) pcpcc;
21802 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021803 { /* SCO 3.2v4 cc rejects this. */
21804 char *t;
21805 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021806
Martin v. Löwis11437992002-04-12 09:54:03 +000021807 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021809 }
21810 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21811 int x[] = {25, 17};
21812 const int *foo = &x[0];
21813 ++foo;
21814 }
21815 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21816 typedef const int *iptr;
21817 iptr p = 0;
21818 ++p;
21819 }
21820 { /* AIX XL C 1.02.0.0 rejects this saying
21821 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21822 struct s { int j; const int *ap[3]; };
21823 struct s *b; b->j = 5;
21824 }
21825 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21826 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021827 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021828 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021829 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021830#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021831
Martin v. Löwis11437992002-04-12 09:54:03 +000021832 ;
21833 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021834}
Martin v. Löwis11437992002-04-12 09:54:03 +000021835_ACEOF
21836rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021837if { (ac_try="$ac_compile"
21838case "(($ac_try" in
21839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21840 *) ac_try_echo=$ac_try;;
21841esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021845 grep -v '^ *+' conftest.er1 >conftest.err
21846 rm -f conftest.er1
21847 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021849 (exit $ac_status); } && {
21850 test -z "$ac_c_werror_flag" ||
21851 test ! -s conftest.err
21852 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021853 ac_cv_c_const=yes
21854else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021856sed 's/^/| /' conftest.$ac_ext >&5
21857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021858 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021860
21861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021862fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021863{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21864echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021865if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021866
21867cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021868#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000021869_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021870
21871fi
21872
Michael W. Hudson54241132001-12-07 15:38:26 +000021873
Guido van Rossumda88dad1995-01-26 00:46:29 +000021874works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021875{ echo "$as_me:$LINENO: checking for working volatile" >&5
21876echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021877cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021878/* confdefs.h. */
21879_ACEOF
21880cat confdefs.h >>conftest.$ac_ext
21881cat >>conftest.$ac_ext <<_ACEOF
21882/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021883
Martin v. Löwis11437992002-04-12 09:54:03 +000021884int
21885main ()
21886{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021887volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 ;
21889 return 0;
21890}
21891_ACEOF
21892rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021893if { (ac_try="$ac_compile"
21894case "(($ac_try" in
21895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21896 *) ac_try_echo=$ac_try;;
21897esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021899 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021901 grep -v '^ *+' conftest.er1 >conftest.err
21902 rm -f conftest.er1
21903 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021905 (exit $ac_status); } && {
21906 test -z "$ac_c_werror_flag" ||
21907 test ! -s conftest.err
21908 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021909 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021910else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021912sed 's/^/| /' conftest.$ac_ext >&5
21913
Martin v. Löwis11437992002-04-12 09:54:03 +000021914
21915cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021916#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000021917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021918
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021919
Guido van Rossum627b2d71993-12-24 10:39:16 +000021920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021921
21922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021923{ echo "$as_me:$LINENO: result: $works" >&5
21924echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021925
Guido van Rossumda88dad1995-01-26 00:46:29 +000021926works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021927{ echo "$as_me:$LINENO: checking for working signed char" >&5
21928echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021930/* confdefs.h. */
21931_ACEOF
21932cat confdefs.h >>conftest.$ac_ext
21933cat >>conftest.$ac_ext <<_ACEOF
21934/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021935
Martin v. Löwis11437992002-04-12 09:54:03 +000021936int
21937main ()
21938{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021939signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021940 ;
21941 return 0;
21942}
21943_ACEOF
21944rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021945if { (ac_try="$ac_compile"
21946case "(($ac_try" in
21947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21948 *) ac_try_echo=$ac_try;;
21949esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021953 grep -v '^ *+' conftest.er1 >conftest.err
21954 rm -f conftest.er1
21955 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021957 (exit $ac_status); } && {
21958 test -z "$ac_c_werror_flag" ||
21959 test ! -s conftest.err
21960 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021961 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021962else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021964sed 's/^/| /' conftest.$ac_ext >&5
21965
Martin v. Löwis11437992002-04-12 09:54:03 +000021966
21967cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021968#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000021969_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021970
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021971
Guido van Rossum7f43da71994-08-01 12:15:30 +000021972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021973
21974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021975{ echo "$as_me:$LINENO: result: $works" >&5
21976echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021977
Guido van Rossumda88dad1995-01-26 00:46:29 +000021978have_prototypes=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000021979{ echo "$as_me:$LINENO: checking for prototypes" >&5
21980echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021982/* confdefs.h. */
21983_ACEOF
21984cat confdefs.h >>conftest.$ac_ext
21985cat >>conftest.$ac_ext <<_ACEOF
21986/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021987int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021988int
21989main ()
21990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021991return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021992 ;
21993 return 0;
21994}
21995_ACEOF
21996rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021997if { (ac_try="$ac_compile"
21998case "(($ac_try" in
21999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22000 *) ac_try_echo=$ac_try;;
22001esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022005 grep -v '^ *+' conftest.er1 >conftest.err
22006 rm -f conftest.er1
22007 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022009 (exit $ac_status); } && {
22010 test -z "$ac_c_werror_flag" ||
22011 test ! -s conftest.err
22012 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022013
22014
22015cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022016#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022017_ACEOF
22018
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022019 have_prototypes=yes
22020
Guido van Rossumf78abae1997-01-21 22:02:36 +000022021else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022023sed 's/^/| /' conftest.$ac_ext >&5
22024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022025
Guido van Rossum7f43da71994-08-01 12:15:30 +000022026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022027
22028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022029{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22030echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022031
Guido van Rossumda88dad1995-01-26 00:46:29 +000022032works=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022033{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22034echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022036/* confdefs.h. */
22037_ACEOF
22038cat confdefs.h >>conftest.$ac_ext
22039cat >>conftest.$ac_ext <<_ACEOF
22040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022041
22042#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022043int foo(int x, ...) {
22044 va_list va;
22045 va_start(va, x);
22046 va_arg(va, int);
22047 va_arg(va, char *);
22048 va_arg(va, double);
22049 return 0;
22050}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022051
Martin v. Löwis11437992002-04-12 09:54:03 +000022052int
22053main ()
22054{
Guido van Rossum90eea071996-08-30 20:58:57 +000022055return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022056 ;
22057 return 0;
22058}
22059_ACEOF
22060rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022061if { (ac_try="$ac_compile"
22062case "(($ac_try" in
22063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22064 *) ac_try_echo=$ac_try;;
22065esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022069 grep -v '^ *+' conftest.er1 >conftest.err
22070 rm -f conftest.er1
22071 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073 (exit $ac_status); } && {
22074 test -z "$ac_c_werror_flag" ||
22075 test ! -s conftest.err
22076 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022077
22078
22079cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022080#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022081_ACEOF
22082
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022083 works=yes
22084
Guido van Rossumf78abae1997-01-21 22:02:36 +000022085else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022087sed 's/^/| /' conftest.$ac_ext >&5
22088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022089
Guido van Rossum627b2d71993-12-24 10:39:16 +000022090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022091
22092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022093{ echo "$as_me:$LINENO: result: $works" >&5
22094echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022095
Martin v. Löwisd6320502004-08-12 13:45:08 +000022096# check for socketpair
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022097{ echo "$as_me:$LINENO: checking for socketpair" >&5
22098echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022099cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022100/* confdefs.h. */
22101_ACEOF
22102cat confdefs.h >>conftest.$ac_ext
22103cat >>conftest.$ac_ext <<_ACEOF
22104/* end confdefs.h. */
22105
22106#include <sys/types.h>
22107#include <sys/socket.h>
22108
22109int
22110main ()
22111{
22112void *x=socketpair
22113 ;
22114 return 0;
22115}
22116_ACEOF
22117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022118if { (ac_try="$ac_compile"
22119case "(($ac_try" in
22120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22121 *) ac_try_echo=$ac_try;;
22122esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022126 grep -v '^ *+' conftest.er1 >conftest.err
22127 rm -f conftest.er1
22128 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 (exit $ac_status); } && {
22131 test -z "$ac_c_werror_flag" ||
22132 test ! -s conftest.err
22133 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022134
22135cat >>confdefs.h <<\_ACEOF
22136#define HAVE_SOCKETPAIR 1
22137_ACEOF
22138
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022139 { echo "$as_me:$LINENO: result: yes" >&5
22140echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022141else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022142 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022143sed 's/^/| /' conftest.$ac_ext >&5
22144
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022145 { echo "$as_me:$LINENO: result: no" >&5
22146echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022147
22148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022149
22150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022151
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022152# check if sockaddr has sa_len member
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022153{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22154echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022156/* confdefs.h. */
22157_ACEOF
22158cat confdefs.h >>conftest.$ac_ext
22159cat >>conftest.$ac_ext <<_ACEOF
22160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022161#include <sys/types.h>
22162#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022163int
22164main ()
22165{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022166struct sockaddr x;
22167x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022168 ;
22169 return 0;
22170}
22171_ACEOF
22172rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022173if { (ac_try="$ac_compile"
22174case "(($ac_try" in
22175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22176 *) ac_try_echo=$ac_try;;
22177esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022180 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022181 grep -v '^ *+' conftest.er1 >conftest.err
22182 rm -f conftest.er1
22183 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022185 (exit $ac_status); } && {
22186 test -z "$ac_c_werror_flag" ||
22187 test ! -s conftest.err
22188 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022189 { echo "$as_me:$LINENO: result: yes" >&5
22190echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022191
22192cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022193#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022194_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022195
22196else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022198sed 's/^/| /' conftest.$ac_ext >&5
22199
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022200 { echo "$as_me:$LINENO: result: no" >&5
22201echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203
22204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022205
Guido van Rossumda88dad1995-01-26 00:46:29 +000022206va_list_is_array=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022207{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22208echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022210/* confdefs.h. */
22211_ACEOF
22212cat confdefs.h >>conftest.$ac_ext
22213cat >>conftest.$ac_ext <<_ACEOF
22214/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022215
22216#ifdef HAVE_STDARG_PROTOTYPES
22217#include <stdarg.h>
22218#else
22219#include <varargs.h>
22220#endif
22221
Martin v. Löwis11437992002-04-12 09:54:03 +000022222int
22223main ()
22224{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022225va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022226 ;
22227 return 0;
22228}
22229_ACEOF
22230rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022231if { (ac_try="$ac_compile"
22232case "(($ac_try" in
22233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22234 *) ac_try_echo=$ac_try;;
22235esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022239 grep -v '^ *+' conftest.er1 >conftest.err
22240 rm -f conftest.er1
22241 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022243 (exit $ac_status); } && {
22244 test -z "$ac_c_werror_flag" ||
22245 test ! -s conftest.err
22246 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022247 :
22248else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022250sed 's/^/| /' conftest.$ac_ext >&5
22251
Martin v. Löwis11437992002-04-12 09:54:03 +000022252
22253
22254cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022255#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022256_ACEOF
22257
Guido van Rossumda88dad1995-01-26 00:46:29 +000022258 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022261
22262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022263{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22264echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022265
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022266# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022267
22268
22269
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022270{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22271echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022272if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022273 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022274else
Martin v. Löwis11437992002-04-12 09:54:03 +000022275 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022276/* confdefs.h. */
22277_ACEOF
22278cat confdefs.h >>conftest.$ac_ext
22279cat >>conftest.$ac_ext <<_ACEOF
22280/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022281/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22282 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22283#define gethostbyname_r innocuous_gethostbyname_r
22284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022285/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022286 which can conflict with char gethostbyname_r (); below.
22287 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022288 <limits.h> exists even on freestanding compilers. */
22289
22290#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022291# include <limits.h>
22292#else
22293# include <assert.h>
22294#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022295
22296#undef gethostbyname_r
22297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022298/* Override any GCC internal prototype to avoid an error.
22299 Use char because int might match the return type of a GCC
22300 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022301#ifdef __cplusplus
22302extern "C"
22303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022304char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022305/* The GNU C library defines this for functions which it implements
22306 to always fail with ENOSYS. Some functions are actually named
22307 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022308#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022309choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022310#endif
22311
Skip Montanaro6dead952003-09-25 14:50:04 +000022312int
22313main ()
22314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022315return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 ;
22317 return 0;
22318}
22319_ACEOF
22320rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022321if { (ac_try="$ac_link"
22322case "(($ac_try" in
22323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22324 *) ac_try_echo=$ac_try;;
22325esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022327 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022329 grep -v '^ *+' conftest.er1 >conftest.err
22330 rm -f conftest.er1
22331 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022333 (exit $ac_status); } && {
22334 test -z "$ac_c_werror_flag" ||
22335 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022336 } && test -s conftest$ac_exeext &&
22337 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022338 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022339else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022341sed 's/^/| /' conftest.$ac_ext >&5
22342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022343 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022345
22346rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022347 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022348fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022349{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22350echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22351if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022352
Martin v. Löwis11437992002-04-12 09:54:03 +000022353 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022354#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022355_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022356
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022357 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22358echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022359 OLD_CFLAGS=$CFLAGS
22360 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022362/* confdefs.h. */
22363_ACEOF
22364cat confdefs.h >>conftest.$ac_ext
22365cat >>conftest.$ac_ext <<_ACEOF
22366/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022367
22368# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
Martin v. Löwis11437992002-04-12 09:54:03 +000022370int
22371main ()
22372{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022373
22374 char *name;
22375 struct hostent *he, *res;
22376 char buffer[2048];
22377 int buflen = 2048;
22378 int h_errnop;
22379
22380 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022381
22382 ;
22383 return 0;
22384}
22385_ACEOF
22386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022387if { (ac_try="$ac_compile"
22388case "(($ac_try" in
22389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22390 *) ac_try_echo=$ac_try;;
22391esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022393 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022394 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022395 grep -v '^ *+' conftest.er1 >conftest.err
22396 rm -f conftest.er1
22397 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022399 (exit $ac_status); } && {
22400 test -z "$ac_c_werror_flag" ||
22401 test ! -s conftest.err
22402 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022403
22404 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022405#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022406_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022407
Martin v. Löwis11437992002-04-12 09:54:03 +000022408
22409cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022410#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022411_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022412
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022413 { echo "$as_me:$LINENO: result: yes" >&5
22414echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022416else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022418sed 's/^/| /' conftest.$ac_ext >&5
22419
Martin v. Löwis11437992002-04-12 09:54:03 +000022420
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022421 { echo "$as_me:$LINENO: result: no" >&5
22422echo "${ECHO_T}no" >&6; }
22423 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22424echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022426/* confdefs.h. */
22427_ACEOF
22428cat confdefs.h >>conftest.$ac_ext
22429cat >>conftest.$ac_ext <<_ACEOF
22430/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022431
22432# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022433
Martin v. Löwis11437992002-04-12 09:54:03 +000022434int
22435main ()
22436{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022437
22438 char *name;
22439 struct hostent *he;
22440 char buffer[2048];
22441 int buflen = 2048;
22442 int h_errnop;
22443
22444 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022445
22446 ;
22447 return 0;
22448}
22449_ACEOF
22450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022451if { (ac_try="$ac_compile"
22452case "(($ac_try" in
22453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22454 *) ac_try_echo=$ac_try;;
22455esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022459 grep -v '^ *+' conftest.er1 >conftest.err
22460 rm -f conftest.er1
22461 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022463 (exit $ac_status); } && {
22464 test -z "$ac_c_werror_flag" ||
22465 test ! -s conftest.err
22466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022467
22468 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022469#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022470_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022471
Martin v. Löwis11437992002-04-12 09:54:03 +000022472
22473cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022474#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022475_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022476
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022477 { echo "$as_me:$LINENO: result: yes" >&5
22478echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022480else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022482sed 's/^/| /' conftest.$ac_ext >&5
22483
Martin v. Löwis11437992002-04-12 09:54:03 +000022484
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022485 { echo "$as_me:$LINENO: result: no" >&5
22486echo "${ECHO_T}no" >&6; }
22487 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22488echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022490/* confdefs.h. */
22491_ACEOF
22492cat confdefs.h >>conftest.$ac_ext
22493cat >>conftest.$ac_ext <<_ACEOF
22494/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022495
22496# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022497
Martin v. Löwis11437992002-04-12 09:54:03 +000022498int
22499main ()
22500{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022501
22502 char *name;
22503 struct hostent *he;
22504 struct hostent_data data;
22505
22506 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022507
22508 ;
22509 return 0;
22510}
22511_ACEOF
22512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022513if { (ac_try="$ac_compile"
22514case "(($ac_try" in
22515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22516 *) ac_try_echo=$ac_try;;
22517esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022521 grep -v '^ *+' conftest.er1 >conftest.err
22522 rm -f conftest.er1
22523 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022525 (exit $ac_status); } && {
22526 test -z "$ac_c_werror_flag" ||
22527 test ! -s conftest.err
22528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022529
22530 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022531#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022532_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022533
Martin v. Löwis11437992002-04-12 09:54:03 +000022534
22535cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022536#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022537_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022538
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022539 { echo "$as_me:$LINENO: result: yes" >&5
22540echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022542else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022544sed 's/^/| /' conftest.$ac_ext >&5
22545
Martin v. Löwis11437992002-04-12 09:54:03 +000022546
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022547 { echo "$as_me:$LINENO: result: no" >&5
22548echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022551
22552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022555
22556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022559
22560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022561 CFLAGS=$OLD_CFLAGS
22562
22563else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022564
Martin v. Löwis11437992002-04-12 09:54:03 +000022565
22566for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022567do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022573else
Martin v. Löwis11437992002-04-12 09:54:03 +000022574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022575/* confdefs.h. */
22576_ACEOF
22577cat confdefs.h >>conftest.$ac_ext
22578cat >>conftest.$ac_ext <<_ACEOF
22579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22582#define $ac_func innocuous_$ac_func
22583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022585 which can conflict with char $ac_func (); below.
22586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022587 <limits.h> exists even on freestanding compilers. */
22588
22589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022590# include <limits.h>
22591#else
22592# include <assert.h>
22593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022594
22595#undef $ac_func
22596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022597/* Override any GCC internal prototype to avoid an error.
22598 Use char because int might match the return type of a GCC
22599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022600#ifdef __cplusplus
22601extern "C"
22602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022603char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022604/* The GNU C library defines this for functions which it implements
22605 to always fail with ENOSYS. Some functions are actually named
22606 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022607#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022608choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022609#endif
22610
Skip Montanaro6dead952003-09-25 14:50:04 +000022611int
22612main ()
22613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022615 ;
22616 return 0;
22617}
22618_ACEOF
22619rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022620if { (ac_try="$ac_link"
22621case "(($ac_try" in
22622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22623 *) ac_try_echo=$ac_try;;
22624esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022628 grep -v '^ *+' conftest.er1 >conftest.err
22629 rm -f conftest.er1
22630 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022632 (exit $ac_status); } && {
22633 test -z "$ac_c_werror_flag" ||
22634 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022635 } && test -s conftest$ac_exeext &&
22636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022638else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022640sed 's/^/| /' conftest.$ac_ext >&5
22641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022644
22645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022647fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022648ac_res=`eval echo '${'$as_ac_var'}'`
22649 { echo "$as_me:$LINENO: result: $ac_res" >&5
22650echo "${ECHO_T}$ac_res" >&6; }
22651if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022654_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022655
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022656fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022657done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022658
Michael W. Hudson54241132001-12-07 15:38:26 +000022659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022660fi
22661
Michael W. Hudson54241132001-12-07 15:38:26 +000022662
22663
22664
22665
22666
22667
Guido van Rossum627b2d71993-12-24 10:39:16 +000022668# checks for system services
22669# (none yet)
22670
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022671# Linux requires this for correct f.p. operations
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022672{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22673echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022674if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022675 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022676else
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022678/* confdefs.h. */
22679_ACEOF
22680cat confdefs.h >>conftest.$ac_ext
22681cat >>conftest.$ac_ext <<_ACEOF
22682/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022683/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22684 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22685#define __fpu_control innocuous___fpu_control
22686
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022687/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022688 which can conflict with char __fpu_control (); below.
22689 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022690 <limits.h> exists even on freestanding compilers. */
22691
22692#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022693# include <limits.h>
22694#else
22695# include <assert.h>
22696#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022697
22698#undef __fpu_control
22699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700/* Override any GCC internal prototype to avoid an error.
22701 Use char because int might match the return type of a GCC
22702 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022703#ifdef __cplusplus
22704extern "C"
22705#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022706char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022707/* The GNU C library defines this for functions which it implements
22708 to always fail with ENOSYS. Some functions are actually named
22709 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022710#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022711choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022712#endif
22713
Skip Montanaro6dead952003-09-25 14:50:04 +000022714int
22715main ()
22716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022717return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022718 ;
22719 return 0;
22720}
22721_ACEOF
22722rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022723if { (ac_try="$ac_link"
22724case "(($ac_try" in
22725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22726 *) ac_try_echo=$ac_try;;
22727esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022731 grep -v '^ *+' conftest.er1 >conftest.err
22732 rm -f conftest.er1
22733 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022735 (exit $ac_status); } && {
22736 test -z "$ac_c_werror_flag" ||
22737 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022738 } && test -s conftest$ac_exeext &&
22739 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022740 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022741else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022743sed 's/^/| /' conftest.$ac_ext >&5
22744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022745 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022747
22748rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022749 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022750fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022751{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22752echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22753if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022754 :
22755else
Martin v. Löwis11437992002-04-12 09:54:03 +000022756
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022757{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22758echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022759if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022761else
Martin v. Löwis11437992002-04-12 09:54:03 +000022762 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022763LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022764cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022765/* confdefs.h. */
22766_ACEOF
22767cat confdefs.h >>conftest.$ac_ext
22768cat >>conftest.$ac_ext <<_ACEOF
22769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022771/* Override any GCC internal prototype to avoid an error.
22772 Use char because int might match the return type of a GCC
22773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022774#ifdef __cplusplus
22775extern "C"
22776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022777char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022778int
22779main ()
22780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022781return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ;
22783 return 0;
22784}
22785_ACEOF
22786rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022787if { (ac_try="$ac_link"
22788case "(($ac_try" in
22789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22790 *) ac_try_echo=$ac_try;;
22791esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022793 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022795 grep -v '^ *+' conftest.er1 >conftest.err
22796 rm -f conftest.er1
22797 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022799 (exit $ac_status); } && {
22800 test -z "$ac_c_werror_flag" ||
22801 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022802 } && test -s conftest$ac_exeext &&
22803 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022804 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022805else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022807sed 's/^/| /' conftest.$ac_ext >&5
22808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811
22812rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022813 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022814LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022815fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022816{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22817echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
22818if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022819 cat >>confdefs.h <<_ACEOF
22820#define HAVE_LIBIEEE 1
22821_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022823 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022824
Guido van Rossum627b2d71993-12-24 10:39:16 +000022825fi
22826
Michael W. Hudson54241132001-12-07 15:38:26 +000022827
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022828fi
22829
Michael W. Hudson54241132001-12-07 15:38:26 +000022830
Guido van Rossum7f253911997-05-09 02:42:48 +000022831# Check for --with-fpectl
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022832{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22833echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022835# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022836if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022837 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022838if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022839then
22840
22841cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022842#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022843_ACEOF
22844
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022845 { echo "$as_me:$LINENO: result: yes" >&5
22846echo "${ECHO_T}yes" >&6; }
22847else { echo "$as_me:$LINENO: result: no" >&5
22848echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022849fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022850else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022851 { echo "$as_me:$LINENO: result: no" >&5
22852echo "${ECHO_T}no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022853fi
22854
Guido van Rossum7f253911997-05-09 02:42:48 +000022855
Guido van Rossum7f43da71994-08-01 12:15:30 +000022856# check for --with-libm=...
22857
Guido van Rossum563e7081996-09-10 18:20:48 +000022858case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022859Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022860*) LIBM=-lm
22861esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022862{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22863echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022865# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022866if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022867 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022868if test "$withval" = no
22869then LIBM=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022870 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
22871echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022872elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022873then LIBM=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022874 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22875echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
22876else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22877echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022879fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022880else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022881 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22882echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022883fi
22884
Guido van Rossum7f43da71994-08-01 12:15:30 +000022885
22886# check for --with-libc=...
22887
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022888{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22889echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022891# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022892if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022893 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022894if test "$withval" = no
22895then LIBC=
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022896 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
22897echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022898elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022899then LIBC=$withval
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022900 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22901echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
22902else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22903echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022904 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022905fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022906else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022907 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22908echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022909fi
22910
Guido van Rossum7f43da71994-08-01 12:15:30 +000022911
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022912# **************************************************
22913# * Check for various properties of floating point *
22914# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022915
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022916{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22917echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022918if test "${ac_cv_little_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022919 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022920else
22921
22922if test "$cross_compiling" = yes; then
22923 ac_cv_little_endian_double=no
22924else
22925 cat >conftest.$ac_ext <<_ACEOF
22926/* confdefs.h. */
22927_ACEOF
22928cat confdefs.h >>conftest.$ac_ext
22929cat >>conftest.$ac_ext <<_ACEOF
22930/* end confdefs.h. */
22931
22932#include <string.h>
22933int main() {
22934 double x = 9006104071832581.0;
22935 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22936 return 0;
22937 else
22938 return 1;
22939}
22940
22941_ACEOF
22942rm -f conftest$ac_exeext
22943if { (ac_try="$ac_link"
22944case "(($ac_try" in
22945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22946 *) ac_try_echo=$ac_try;;
22947esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022949 (eval "$ac_link") 2>&5
22950 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022952 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22953 { (case "(($ac_try" in
22954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22955 *) ac_try_echo=$ac_try;;
22956esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022958 (eval "$ac_try") 2>&5
22959 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022961 (exit $ac_status); }; }; then
22962 ac_cv_little_endian_double=yes
22963else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022964 echo "$as_me: program exited with status $ac_status" >&5
22965echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022966sed 's/^/| /' conftest.$ac_ext >&5
22967
22968( exit $ac_status )
22969ac_cv_little_endian_double=no
22970fi
22971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22972fi
22973
22974
22975fi
22976
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022977{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22978echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022979if test "$ac_cv_little_endian_double" = yes
22980then
22981
22982cat >>confdefs.h <<\_ACEOF
22983#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22984_ACEOF
22985
22986fi
22987
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022988{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22989echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022990if test "${ac_cv_big_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000022991 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022992else
22993
22994if test "$cross_compiling" = yes; then
22995 ac_cv_big_endian_double=no
22996else
22997 cat >conftest.$ac_ext <<_ACEOF
22998/* confdefs.h. */
22999_ACEOF
23000cat confdefs.h >>conftest.$ac_ext
23001cat >>conftest.$ac_ext <<_ACEOF
23002/* end confdefs.h. */
23003
23004#include <string.h>
23005int main() {
23006 double x = 9006104071832581.0;
23007 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23008 return 0;
23009 else
23010 return 1;
23011}
23012
23013_ACEOF
23014rm -f conftest$ac_exeext
23015if { (ac_try="$ac_link"
23016case "(($ac_try" in
23017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23018 *) ac_try_echo=$ac_try;;
23019esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023021 (eval "$ac_link") 2>&5
23022 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23025 { (case "(($ac_try" in
23026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23027 *) ac_try_echo=$ac_try;;
23028esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023030 (eval "$ac_try") 2>&5
23031 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023033 (exit $ac_status); }; }; then
23034 ac_cv_big_endian_double=yes
23035else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023036 echo "$as_me: program exited with status $ac_status" >&5
23037echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023038sed 's/^/| /' conftest.$ac_ext >&5
23039
23040( exit $ac_status )
23041ac_cv_big_endian_double=no
23042fi
23043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23044fi
23045
23046
23047fi
23048
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023049{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23050echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023051if test "$ac_cv_big_endian_double" = yes
23052then
23053
23054cat >>confdefs.h <<\_ACEOF
23055#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23056_ACEOF
23057
23058fi
23059
23060# Some ARM platforms use a mixed-endian representation for doubles.
23061# While Python doesn't currently have full support for these platforms
23062# (see e.g., issue 1762561), we can at least make sure that float <-> string
23063# conversions work.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023064{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23065echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023066if test "${ac_cv_mixed_endian_double+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023067 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023068else
23069
23070if test "$cross_compiling" = yes; then
23071 ac_cv_mixed_endian_double=no
23072else
23073 cat >conftest.$ac_ext <<_ACEOF
23074/* confdefs.h. */
23075_ACEOF
23076cat confdefs.h >>conftest.$ac_ext
23077cat >>conftest.$ac_ext <<_ACEOF
23078/* end confdefs.h. */
23079
23080#include <string.h>
23081int main() {
23082 double x = 9006104071832581.0;
23083 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23084 return 0;
23085 else
23086 return 1;
23087}
23088
23089_ACEOF
23090rm -f conftest$ac_exeext
23091if { (ac_try="$ac_link"
23092case "(($ac_try" in
23093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23094 *) ac_try_echo=$ac_try;;
23095esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023097 (eval "$ac_link") 2>&5
23098 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23101 { (case "(($ac_try" in
23102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23103 *) ac_try_echo=$ac_try;;
23104esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023106 (eval "$ac_try") 2>&5
23107 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023109 (exit $ac_status); }; }; then
23110 ac_cv_mixed_endian_double=yes
23111else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023112 echo "$as_me: program exited with status $ac_status" >&5
23113echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023114sed 's/^/| /' conftest.$ac_ext >&5
23115
23116( exit $ac_status )
23117ac_cv_mixed_endian_double=no
23118fi
23119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23120fi
23121
23122
23123fi
23124
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023125{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23126echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023127if test "$ac_cv_mixed_endian_double" = yes
23128then
23129
23130cat >>confdefs.h <<\_ACEOF
23131#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23132_ACEOF
23133
23134fi
23135
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023136# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023137# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023138# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023139# rounding; this is a problem on x86, where the x87 FPU has a default
23140# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23141# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023142if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23143then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023144 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023145 # x87 control word. It should be, but you never know...
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023146 { echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23147echo $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 +000023148 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023149/* confdefs.h. */
23150_ACEOF
23151cat confdefs.h >>conftest.$ac_ext
23152cat >>conftest.$ac_ext <<_ACEOF
23153/* end confdefs.h. */
23154
23155int
23156main ()
23157{
23158
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023159 unsigned short cw;
23160 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23161 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023162
23163 ;
23164 return 0;
23165}
23166_ACEOF
23167rm -f conftest.$ac_objext
23168if { (ac_try="$ac_compile"
23169case "(($ac_try" in
23170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23171 *) ac_try_echo=$ac_try;;
23172esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023174 (eval "$ac_compile") 2>conftest.er1
23175 ac_status=$?
23176 grep -v '^ *+' conftest.er1 >conftest.err
23177 rm -f conftest.er1
23178 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023180 (exit $ac_status); } && {
23181 test -z "$ac_c_werror_flag" ||
23182 test ! -s conftest.err
23183 } && test -s conftest.$ac_objext; then
23184 have_gcc_asm_for_x87=yes
23185else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023186 echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023187sed 's/^/| /' conftest.$ac_ext >&5
23188
23189 have_gcc_asm_for_x87=no
23190fi
23191
23192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023193 { echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23194echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023195 if test "$have_gcc_asm_for_x87" = yes
23196 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023197
23198cat >>confdefs.h <<\_ACEOF
23199#define HAVE_GCC_ASM_FOR_X87 1
23200_ACEOF
23201
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023202 fi
23203fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023204
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023205# Detect whether system arithmetic is subject to x87-style double
23206# rounding issues. The result of this test has little meaning on non
23207# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23208# mode is round-to-nearest and double rounding issues are present, and
23209# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023210{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23211echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023212# $BASECFLAGS may affect the result
23213ac_save_cc="$CC"
23214CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023215if test "$cross_compiling" = yes; then
23216 ac_cv_x87_double_rounding=no
23217else
23218 cat >conftest.$ac_ext <<_ACEOF
23219/* confdefs.h. */
23220_ACEOF
23221cat confdefs.h >>conftest.$ac_ext
23222cat >>conftest.$ac_ext <<_ACEOF
23223/* end confdefs.h. */
23224
23225#include <stdlib.h>
23226#include <math.h>
23227int main() {
23228 volatile double x, y, z;
23229 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23230 x = 0.99999999999999989; /* 1-2**-53 */
23231 y = 1./x;
23232 if (y != 1.)
23233 exit(0);
23234 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23235 x = 1e16;
23236 y = 2.99999;
23237 z = x + y;
23238 if (z != 1e16+4.)
23239 exit(0);
23240 /* both tests show evidence of double rounding */
23241 exit(1);
23242}
23243
23244_ACEOF
23245rm -f conftest$ac_exeext
23246if { (ac_try="$ac_link"
23247case "(($ac_try" in
23248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23249 *) ac_try_echo=$ac_try;;
23250esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023252 (eval "$ac_link") 2>&5
23253 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023255 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23256 { (case "(($ac_try" in
23257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23258 *) ac_try_echo=$ac_try;;
23259esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023261 (eval "$ac_try") 2>&5
23262 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023264 (exit $ac_status); }; }; then
23265 ac_cv_x87_double_rounding=no
23266else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023267 echo "$as_me: program exited with status $ac_status" >&5
23268echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023269sed 's/^/| /' conftest.$ac_ext >&5
23270
23271( exit $ac_status )
23272ac_cv_x87_double_rounding=yes
23273fi
23274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23275fi
23276
23277
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023278CC="$ac_save_cc"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023279{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23280echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023281if test "$ac_cv_x87_double_rounding" = yes
23282then
23283
23284cat >>confdefs.h <<\_ACEOF
23285#define X87_DOUBLE_ROUNDING 1
23286_ACEOF
23287
23288fi
23289
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023290# ************************************
23291# * Check for mathematical functions *
23292# ************************************
23293
23294LIBS_SAVE=$LIBS
23295LIBS="$LIBS $LIBM"
23296
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023297# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23298# -0. on some architectures.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023299{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23300echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023301if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023302 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023303else
23304
23305if test "$cross_compiling" = yes; then
23306 ac_cv_tanh_preserves_zero_sign=no
23307else
23308 cat >conftest.$ac_ext <<_ACEOF
23309/* confdefs.h. */
23310_ACEOF
23311cat confdefs.h >>conftest.$ac_ext
23312cat >>conftest.$ac_ext <<_ACEOF
23313/* end confdefs.h. */
23314
23315#include <math.h>
23316#include <stdlib.h>
23317int main() {
23318 /* return 0 if either negative zeros don't exist
23319 on this platform or if negative zeros exist
23320 and tanh(-0.) == -0. */
23321 if (atan2(0., -1.) == atan2(-0., -1.) ||
23322 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23323 else exit(1);
23324}
23325
23326_ACEOF
23327rm -f conftest$ac_exeext
23328if { (ac_try="$ac_link"
23329case "(($ac_try" in
23330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23331 *) ac_try_echo=$ac_try;;
23332esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023334 (eval "$ac_link") 2>&5
23335 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23338 { (case "(($ac_try" in
23339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23340 *) ac_try_echo=$ac_try;;
23341esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023343 (eval "$ac_try") 2>&5
23344 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023346 (exit $ac_status); }; }; then
23347 ac_cv_tanh_preserves_zero_sign=yes
23348else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023349 echo "$as_me: program exited with status $ac_status" >&5
23350echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023351sed 's/^/| /' conftest.$ac_ext >&5
23352
23353( exit $ac_status )
23354ac_cv_tanh_preserves_zero_sign=no
23355fi
23356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23357fi
23358
23359
23360fi
23361
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023362{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23363echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023364if test "$ac_cv_tanh_preserves_zero_sign" = yes
23365then
23366
23367cat >>confdefs.h <<\_ACEOF
23368#define TANH_PRESERVES_ZERO_SIGN 1
23369_ACEOF
23370
23371fi
23372
23373
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023374
Michael W. Hudson54241132001-12-07 15:38:26 +000023375
Christian Heimes99170a52007-12-19 02:07:34 +000023376
23377
23378
23379
23380
Mark Dickinsonf2537862009-04-18 13:58:18 +000023381
Mark Dickinson9c113362009-09-05 10:36:23 +000023382for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23383do
23384as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23385{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23386echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23387if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
23388 echo $ECHO_N "(cached) $ECHO_C" >&6
23389else
23390 cat >conftest.$ac_ext <<_ACEOF
23391/* confdefs.h. */
23392_ACEOF
23393cat confdefs.h >>conftest.$ac_ext
23394cat >>conftest.$ac_ext <<_ACEOF
23395/* end confdefs.h. */
23396/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23397 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23398#define $ac_func innocuous_$ac_func
23399
23400/* System header to define __stub macros and hopefully few prototypes,
23401 which can conflict with char $ac_func (); below.
23402 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23403 <limits.h> exists even on freestanding compilers. */
23404
23405#ifdef __STDC__
23406# include <limits.h>
23407#else
23408# include <assert.h>
23409#endif
23410
23411#undef $ac_func
23412
23413/* Override any GCC internal prototype to avoid an error.
23414 Use char because int might match the return type of a GCC
23415 builtin and then its argument prototype would still apply. */
23416#ifdef __cplusplus
23417extern "C"
23418#endif
23419char $ac_func ();
23420/* The GNU C library defines this for functions which it implements
23421 to always fail with ENOSYS. Some functions are actually named
23422 something starting with __ and the normal name is an alias. */
23423#if defined __stub_$ac_func || defined __stub___$ac_func
23424choke me
23425#endif
23426
23427int
23428main ()
23429{
23430return $ac_func ();
23431 ;
23432 return 0;
23433}
23434_ACEOF
23435rm -f conftest.$ac_objext conftest$ac_exeext
23436if { (ac_try="$ac_link"
23437case "(($ac_try" in
23438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23439 *) ac_try_echo=$ac_try;;
23440esac
23441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23442 (eval "$ac_link") 2>conftest.er1
23443 ac_status=$?
23444 grep -v '^ *+' conftest.er1 >conftest.err
23445 rm -f conftest.er1
23446 cat conftest.err >&5
23447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23448 (exit $ac_status); } && {
23449 test -z "$ac_c_werror_flag" ||
23450 test ! -s conftest.err
23451 } && test -s conftest$ac_exeext &&
23452 $as_test_x conftest$ac_exeext; then
23453 eval "$as_ac_var=yes"
23454else
23455 echo "$as_me: failed program was:" >&5
23456sed 's/^/| /' conftest.$ac_ext >&5
23457
23458 eval "$as_ac_var=no"
23459fi
23460
23461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23462 conftest$ac_exeext conftest.$ac_ext
23463fi
23464ac_res=`eval echo '${'$as_ac_var'}'`
23465 { echo "$as_me:$LINENO: result: $ac_res" >&5
23466echo "${ECHO_T}$ac_res" >&6; }
23467if test `eval echo '${'$as_ac_var'}'` = yes; then
23468 cat >>confdefs.h <<_ACEOF
23469#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23470_ACEOF
23471
23472fi
23473done
23474
23475
23476
23477
23478
23479
23480for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023481do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023482as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23483{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23484echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023485if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023486 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023487else
23488 cat >conftest.$ac_ext <<_ACEOF
23489/* confdefs.h. */
23490_ACEOF
23491cat confdefs.h >>conftest.$ac_ext
23492cat >>conftest.$ac_ext <<_ACEOF
23493/* end confdefs.h. */
23494/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23495 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23496#define $ac_func innocuous_$ac_func
23497
23498/* System header to define __stub macros and hopefully few prototypes,
23499 which can conflict with char $ac_func (); below.
23500 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23501 <limits.h> exists even on freestanding compilers. */
23502
23503#ifdef __STDC__
23504# include <limits.h>
23505#else
23506# include <assert.h>
23507#endif
23508
23509#undef $ac_func
23510
23511/* Override any GCC internal prototype to avoid an error.
23512 Use char because int might match the return type of a GCC
23513 builtin and then its argument prototype would still apply. */
23514#ifdef __cplusplus
23515extern "C"
23516#endif
23517char $ac_func ();
23518/* The GNU C library defines this for functions which it implements
23519 to always fail with ENOSYS. Some functions are actually named
23520 something starting with __ and the normal name is an alias. */
23521#if defined __stub_$ac_func || defined __stub___$ac_func
23522choke me
23523#endif
23524
23525int
23526main ()
23527{
23528return $ac_func ();
23529 ;
23530 return 0;
23531}
23532_ACEOF
23533rm -f conftest.$ac_objext conftest$ac_exeext
23534if { (ac_try="$ac_link"
23535case "(($ac_try" in
23536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23537 *) ac_try_echo=$ac_try;;
23538esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023540 (eval "$ac_link") 2>conftest.er1
23541 ac_status=$?
23542 grep -v '^ *+' conftest.er1 >conftest.err
23543 rm -f conftest.er1
23544 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023546 (exit $ac_status); } && {
23547 test -z "$ac_c_werror_flag" ||
23548 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023549 } && test -s conftest$ac_exeext &&
23550 $as_test_x conftest$ac_exeext; then
Christian Heimes99170a52007-12-19 02:07:34 +000023551 eval "$as_ac_var=yes"
23552else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023553 echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023554sed 's/^/| /' conftest.$ac_ext >&5
23555
23556 eval "$as_ac_var=no"
23557fi
23558
23559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23560 conftest$ac_exeext conftest.$ac_ext
23561fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023562ac_res=`eval echo '${'$as_ac_var'}'`
23563 { echo "$as_me:$LINENO: result: $ac_res" >&5
23564echo "${ECHO_T}$ac_res" >&6; }
23565if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023566 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023567#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023568_ACEOF
23569
23570fi
23571done
23572
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023573{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23574echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023575if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023576 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023577else
23578 cat >conftest.$ac_ext <<_ACEOF
23579/* confdefs.h. */
23580_ACEOF
23581cat confdefs.h >>conftest.$ac_ext
23582cat >>conftest.$ac_ext <<_ACEOF
23583/* end confdefs.h. */
23584#include <math.h>
23585
23586int
23587main ()
23588{
23589#ifndef isinf
23590 (void) isinf;
23591#endif
23592
23593 ;
23594 return 0;
23595}
23596_ACEOF
23597rm -f conftest.$ac_objext
23598if { (ac_try="$ac_compile"
23599case "(($ac_try" in
23600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23601 *) ac_try_echo=$ac_try;;
23602esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023604 (eval "$ac_compile") 2>conftest.er1
23605 ac_status=$?
23606 grep -v '^ *+' conftest.er1 >conftest.err
23607 rm -f conftest.er1
23608 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023610 (exit $ac_status); } && {
23611 test -z "$ac_c_werror_flag" ||
23612 test ! -s conftest.err
23613 } && test -s conftest.$ac_objext; then
23614 ac_cv_have_decl_isinf=yes
23615else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023616 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023617sed 's/^/| /' conftest.$ac_ext >&5
23618
23619 ac_cv_have_decl_isinf=no
23620fi
23621
23622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23623fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023624{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23625echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23626if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023627
23628cat >>confdefs.h <<_ACEOF
23629#define HAVE_DECL_ISINF 1
23630_ACEOF
23631
23632
23633else
23634 cat >>confdefs.h <<_ACEOF
23635#define HAVE_DECL_ISINF 0
23636_ACEOF
23637
23638
23639fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023640{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23641echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023642if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023643 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023644else
23645 cat >conftest.$ac_ext <<_ACEOF
23646/* confdefs.h. */
23647_ACEOF
23648cat confdefs.h >>conftest.$ac_ext
23649cat >>conftest.$ac_ext <<_ACEOF
23650/* end confdefs.h. */
23651#include <math.h>
23652
23653int
23654main ()
23655{
23656#ifndef isnan
23657 (void) isnan;
23658#endif
23659
23660 ;
23661 return 0;
23662}
23663_ACEOF
23664rm -f conftest.$ac_objext
23665if { (ac_try="$ac_compile"
23666case "(($ac_try" in
23667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23668 *) ac_try_echo=$ac_try;;
23669esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023671 (eval "$ac_compile") 2>conftest.er1
23672 ac_status=$?
23673 grep -v '^ *+' conftest.er1 >conftest.err
23674 rm -f conftest.er1
23675 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023677 (exit $ac_status); } && {
23678 test -z "$ac_c_werror_flag" ||
23679 test ! -s conftest.err
23680 } && test -s conftest.$ac_objext; then
23681 ac_cv_have_decl_isnan=yes
23682else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023683 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023684sed 's/^/| /' conftest.$ac_ext >&5
23685
23686 ac_cv_have_decl_isnan=no
23687fi
23688
23689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23690fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023691{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23692echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23693if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023694
23695cat >>confdefs.h <<_ACEOF
23696#define HAVE_DECL_ISNAN 1
23697_ACEOF
23698
23699
23700else
23701 cat >>confdefs.h <<_ACEOF
23702#define HAVE_DECL_ISNAN 0
23703_ACEOF
23704
23705
23706fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023707{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23708echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023709if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023710 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023711else
23712 cat >conftest.$ac_ext <<_ACEOF
23713/* confdefs.h. */
23714_ACEOF
23715cat confdefs.h >>conftest.$ac_ext
23716cat >>conftest.$ac_ext <<_ACEOF
23717/* end confdefs.h. */
23718#include <math.h>
23719
23720int
23721main ()
23722{
23723#ifndef isfinite
23724 (void) isfinite;
23725#endif
23726
23727 ;
23728 return 0;
23729}
23730_ACEOF
23731rm -f conftest.$ac_objext
23732if { (ac_try="$ac_compile"
23733case "(($ac_try" in
23734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23735 *) ac_try_echo=$ac_try;;
23736esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023738 (eval "$ac_compile") 2>conftest.er1
23739 ac_status=$?
23740 grep -v '^ *+' conftest.er1 >conftest.err
23741 rm -f conftest.er1
23742 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023744 (exit $ac_status); } && {
23745 test -z "$ac_c_werror_flag" ||
23746 test ! -s conftest.err
23747 } && test -s conftest.$ac_objext; then
23748 ac_cv_have_decl_isfinite=yes
23749else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023750 echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023751sed 's/^/| /' conftest.$ac_ext >&5
23752
23753 ac_cv_have_decl_isfinite=no
23754fi
23755
23756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23757fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023758{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23759echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23760if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023761
23762cat >>confdefs.h <<_ACEOF
23763#define HAVE_DECL_ISFINITE 1
23764_ACEOF
23765
23766
23767else
23768 cat >>confdefs.h <<_ACEOF
23769#define HAVE_DECL_ISFINITE 0
23770_ACEOF
23771
23772
23773fi
23774
23775
Christian Heimes99170a52007-12-19 02:07:34 +000023776
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023777LIBS=$LIBS_SAVE
23778
Mark Dickinson10683072009-04-18 21:18:19 +000023779# Multiprocessing check for broken sem_getvalue
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023780{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23781echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023782if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23783 echo $ECHO_N "(cached) $ECHO_C" >&6
23784else
23785 if test "$cross_compiling" = yes; then
23786 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023787else
23788 cat >conftest.$ac_ext <<_ACEOF
23789/* confdefs.h. */
23790_ACEOF
23791cat confdefs.h >>conftest.$ac_ext
23792cat >>conftest.$ac_ext <<_ACEOF
23793/* end confdefs.h. */
23794
23795#include <unistd.h>
23796#include <fcntl.h>
23797#include <stdio.h>
23798#include <semaphore.h>
23799#include <sys/stat.h>
23800
23801int main(void){
23802 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23803 int count;
23804 int res;
23805 if(a==SEM_FAILED){
23806 perror("sem_open");
23807 return 1;
23808
23809 }
23810 res = sem_getvalue(a, &count);
23811 sem_close(a);
23812 return res==-1 ? 1 : 0;
23813}
23814
Mark Dickinson10683072009-04-18 21:18:19 +000023815_ACEOF
23816rm -f conftest$ac_exeext
23817if { (ac_try="$ac_link"
23818case "(($ac_try" in
23819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23820 *) ac_try_echo=$ac_try;;
23821esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023823 (eval "$ac_link") 2>&5
23824 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23827 { (case "(($ac_try" in
23828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23829 *) ac_try_echo=$ac_try;;
23830esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023832 (eval "$ac_try") 2>&5
23833 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023835 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023836 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000023837else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023838 echo "$as_me: program exited with status $ac_status" >&5
23839echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023840sed 's/^/| /' conftest.$ac_ext >&5
23841
23842( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023843ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023844fi
23845rm -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 +000023846fi
23847
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023848
23849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000023850fi
23851
23852{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23853echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23854if test $ac_cv_broken_sem_getvalue = yes
23855then
23856
23857cat >>confdefs.h <<\_ACEOF
23858#define HAVE_BROKEN_SEM_GETVALUE 1
23859_ACEOF
23860
23861fi
23862
Mark Dickinsonbd792642009-03-18 20:06:12 +000023863# determine what size digit to use for Python's longs
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023864{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23865echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023866# Check whether --enable-big-digits was given.
23867if test "${enable_big_digits+set}" = set; then
23868 enableval=$enable_big_digits; case $enable_big_digits in
23869yes)
23870 enable_big_digits=30 ;;
23871no)
23872 enable_big_digits=15 ;;
2387315|30)
23874 ;;
23875*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023876 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23877echo "$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 +000023878 { (exit 1); exit 1; }; } ;;
23879esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023880{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23881echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023882
23883cat >>confdefs.h <<_ACEOF
23884#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23885_ACEOF
23886
23887
23888else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023889 { echo "$as_me:$LINENO: result: no value specified" >&5
23890echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023891fi
23892
23893
Guido van Rossumef2255b2000-03-10 22:30:29 +000023894# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023895if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023896 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23897echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023898if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023899 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023900fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023901{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23902echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023903else
Martin v. Löwis11437992002-04-12 09:54:03 +000023904 # Is the header compilable?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023905{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23906echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023907cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023908/* confdefs.h. */
23909_ACEOF
23910cat confdefs.h >>conftest.$ac_ext
23911cat >>conftest.$ac_ext <<_ACEOF
23912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023913$ac_includes_default
23914#include <wchar.h>
23915_ACEOF
23916rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023917if { (ac_try="$ac_compile"
23918case "(($ac_try" in
23919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23920 *) ac_try_echo=$ac_try;;
23921esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023925 grep -v '^ *+' conftest.er1 >conftest.err
23926 rm -f conftest.er1
23927 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023929 (exit $ac_status); } && {
23930 test -z "$ac_c_werror_flag" ||
23931 test ! -s conftest.err
23932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023933 ac_header_compiler=yes
23934else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023936sed 's/^/| /' conftest.$ac_ext >&5
23937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023938 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023940
23941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023942{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23943echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023944
23945# Is the header present?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023946{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23947echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023949/* confdefs.h. */
23950_ACEOF
23951cat confdefs.h >>conftest.$ac_ext
23952cat >>conftest.$ac_ext <<_ACEOF
23953/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023954#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023955_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023956if { (ac_try="$ac_cpp conftest.$ac_ext"
23957case "(($ac_try" in
23958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23959 *) ac_try_echo=$ac_try;;
23960esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023962 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023964 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023965 rm -f conftest.er1
23966 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023968 (exit $ac_status); } >/dev/null && {
23969 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23970 test ! -s conftest.err
23971 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023972 ac_header_preproc=yes
23973else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023975sed 's/^/| /' conftest.$ac_ext >&5
23976
Martin v. Löwis11437992002-04-12 09:54:03 +000023977 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023979
Martin v. Löwis11437992002-04-12 09:54:03 +000023980rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023981{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23982echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023983
23984# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23986 yes:no: )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023987 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23988echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23989 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23990echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023991 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023992 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023993 no:yes:* )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000023994 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23995echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23996 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23997echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23998 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23999echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24000 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24001echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24002 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24003echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24004 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24005echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024006 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024007## -------------------------------------- ##
24008## Report this to http://bugs.python.org/ ##
24009## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024010_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024011 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024012 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024013esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024014{ echo "$as_me:$LINENO: checking for wchar.h" >&5
24015echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024016if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024017 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024018else
24019 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024020fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024021{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24022echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024023
24024fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024025if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024026
24027
24028cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024029#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024030_ACEOF
24031
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024032 wchar_h="yes"
24033
Guido van Rossumef2255b2000-03-10 22:30:29 +000024034else
Martin v. Löwis11437992002-04-12 09:54:03 +000024035 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024036
24037fi
24038
Michael W. Hudson54241132001-12-07 15:38:26 +000024039
Martin v. Löwis11437992002-04-12 09:54:03 +000024040
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024041# determine wchar_t size
24042if test "$wchar_h" = yes
24043then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024044 { echo "$as_me:$LINENO: checking for wchar_t" >&5
24045echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
24046if test "${ac_cv_type_wchar_t+set}" = set; then
24047 echo $ECHO_N "(cached) $ECHO_C" >&6
24048else
24049 cat >conftest.$ac_ext <<_ACEOF
24050/* confdefs.h. */
24051_ACEOF
24052cat confdefs.h >>conftest.$ac_ext
24053cat >>conftest.$ac_ext <<_ACEOF
24054/* end confdefs.h. */
24055#include <wchar.h>
24056
24057typedef wchar_t ac__type_new_;
24058int
24059main ()
24060{
24061if ((ac__type_new_ *) 0)
24062 return 0;
24063if (sizeof (ac__type_new_))
24064 return 0;
24065 ;
24066 return 0;
24067}
24068_ACEOF
24069rm -f conftest.$ac_objext
24070if { (ac_try="$ac_compile"
24071case "(($ac_try" in
24072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24073 *) ac_try_echo=$ac_try;;
24074esac
24075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24076 (eval "$ac_compile") 2>conftest.er1
24077 ac_status=$?
24078 grep -v '^ *+' conftest.er1 >conftest.err
24079 rm -f conftest.er1
24080 cat conftest.err >&5
24081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24082 (exit $ac_status); } && {
24083 test -z "$ac_c_werror_flag" ||
24084 test ! -s conftest.err
24085 } && test -s conftest.$ac_objext; then
24086 ac_cv_type_wchar_t=yes
24087else
24088 echo "$as_me: failed program was:" >&5
24089sed 's/^/| /' conftest.$ac_ext >&5
24090
24091 ac_cv_type_wchar_t=no
24092fi
24093
24094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24095fi
24096{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
24097echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
24098
24099# The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24102# This bug is HP SR number 8606223364.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024103{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
24104echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024105if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024106 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024107else
Martin v. Löwis11437992002-04-12 09:54:03 +000024108 if test "$cross_compiling" = yes; then
24109 # Depending upon the size, compute the lo and hi bounds.
24110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024111/* confdefs.h. */
24112_ACEOF
24113cat confdefs.h >>conftest.$ac_ext
24114cat >>conftest.$ac_ext <<_ACEOF
24115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024116#include <wchar.h>
24117
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024118 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024119int
24120main ()
24121{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024123test_array [0] = 0
24124
24125 ;
24126 return 0;
24127}
24128_ACEOF
24129rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024130if { (ac_try="$ac_compile"
24131case "(($ac_try" in
24132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24133 *) ac_try_echo=$ac_try;;
24134esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024138 grep -v '^ *+' conftest.er1 >conftest.err
24139 rm -f conftest.er1
24140 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142 (exit $ac_status); } && {
24143 test -z "$ac_c_werror_flag" ||
24144 test ! -s conftest.err
24145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024146 ac_lo=0 ac_mid=0
24147 while :; do
24148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024149/* confdefs.h. */
24150_ACEOF
24151cat confdefs.h >>conftest.$ac_ext
24152cat >>conftest.$ac_ext <<_ACEOF
24153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024154#include <wchar.h>
24155
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024156 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024157int
24158main ()
24159{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024160static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024161test_array [0] = 0
24162
24163 ;
24164 return 0;
24165}
24166_ACEOF
24167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024168if { (ac_try="$ac_compile"
24169case "(($ac_try" in
24170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24171 *) ac_try_echo=$ac_try;;
24172esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024174 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024175 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024176 grep -v '^ *+' conftest.er1 >conftest.err
24177 rm -f conftest.er1
24178 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024180 (exit $ac_status); } && {
24181 test -z "$ac_c_werror_flag" ||
24182 test ! -s conftest.err
24183 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024184 ac_hi=$ac_mid; break
24185else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024187sed 's/^/| /' conftest.$ac_ext >&5
24188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024189 ac_lo=`expr $ac_mid + 1`
24190 if test $ac_lo -le $ac_mid; then
24191 ac_lo= ac_hi=
24192 break
24193 fi
24194 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196
24197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024198 done
24199else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024201sed 's/^/| /' conftest.$ac_ext >&5
24202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024204/* confdefs.h. */
24205_ACEOF
24206cat confdefs.h >>conftest.$ac_ext
24207cat >>conftest.$ac_ext <<_ACEOF
24208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024209#include <wchar.h>
24210
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024211 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024212int
24213main ()
24214{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024216test_array [0] = 0
24217
24218 ;
24219 return 0;
24220}
24221_ACEOF
24222rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024223if { (ac_try="$ac_compile"
24224case "(($ac_try" in
24225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24226 *) ac_try_echo=$ac_try;;
24227esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024231 grep -v '^ *+' conftest.er1 >conftest.err
24232 rm -f conftest.er1
24233 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024235 (exit $ac_status); } && {
24236 test -z "$ac_c_werror_flag" ||
24237 test ! -s conftest.err
24238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024239 ac_hi=-1 ac_mid=-1
24240 while :; do
24241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024242/* confdefs.h. */
24243_ACEOF
24244cat confdefs.h >>conftest.$ac_ext
24245cat >>conftest.$ac_ext <<_ACEOF
24246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024247#include <wchar.h>
24248
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024249 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024250int
24251main ()
24252{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024253static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024254test_array [0] = 0
24255
24256 ;
24257 return 0;
24258}
24259_ACEOF
24260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024261if { (ac_try="$ac_compile"
24262case "(($ac_try" in
24263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24264 *) ac_try_echo=$ac_try;;
24265esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024269 grep -v '^ *+' conftest.er1 >conftest.err
24270 rm -f conftest.er1
24271 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024273 (exit $ac_status); } && {
24274 test -z "$ac_c_werror_flag" ||
24275 test ! -s conftest.err
24276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024277 ac_lo=$ac_mid; break
24278else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024280sed 's/^/| /' conftest.$ac_ext >&5
24281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024282 ac_hi=`expr '(' $ac_mid ')' - 1`
24283 if test $ac_mid -le $ac_hi; then
24284 ac_lo= ac_hi=
24285 break
24286 fi
24287 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024289
24290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024291 done
24292else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024294sed 's/^/| /' conftest.$ac_ext >&5
24295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024296 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298
24299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301
24302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024303# Binary search between lo and hi bounds.
24304while test "x$ac_lo" != "x$ac_hi"; do
24305 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024307/* confdefs.h. */
24308_ACEOF
24309cat confdefs.h >>conftest.$ac_ext
24310cat >>conftest.$ac_ext <<_ACEOF
24311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024312#include <wchar.h>
24313
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024314 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024315int
24316main ()
24317{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024319test_array [0] = 0
24320
24321 ;
24322 return 0;
24323}
24324_ACEOF
24325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024326if { (ac_try="$ac_compile"
24327case "(($ac_try" in
24328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24329 *) ac_try_echo=$ac_try;;
24330esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024334 grep -v '^ *+' conftest.er1 >conftest.err
24335 rm -f conftest.er1
24336 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024338 (exit $ac_status); } && {
24339 test -z "$ac_c_werror_flag" ||
24340 test ! -s conftest.err
24341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024342 ac_hi=$ac_mid
24343else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024345sed 's/^/| /' conftest.$ac_ext >&5
24346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024349
24350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024351done
24352case $ac_lo in
24353?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024355 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024356See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024357echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024358See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024359 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024360 else
24361 ac_cv_sizeof_wchar_t=0
24362 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024363esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024364else
Martin v. Löwis11437992002-04-12 09:54:03 +000024365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024366/* confdefs.h. */
24367_ACEOF
24368cat confdefs.h >>conftest.$ac_ext
24369cat >>conftest.$ac_ext <<_ACEOF
24370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024371#include <wchar.h>
24372
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024373 typedef wchar_t ac__type_sizeof_;
24374static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24375static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024376#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024377#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024378int
24379main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024380{
Martin v. Löwis11437992002-04-12 09:54:03 +000024381
24382 FILE *f = fopen ("conftest.val", "w");
24383 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024384 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024385 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024386 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024387 long int i = longval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024388 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024390 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024391 }
24392 else
24393 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024394 unsigned long int i = ulongval ();
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024395 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024396 return 1;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024397 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024398 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024399 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024400
24401 ;
24402 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024403}
Martin v. Löwis11437992002-04-12 09:54:03 +000024404_ACEOF
24405rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024406if { (ac_try="$ac_link"
24407case "(($ac_try" in
24408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24409 *) ac_try_echo=$ac_try;;
24410esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024412 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024413 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024416 { (case "(($ac_try" in
24417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24418 *) ac_try_echo=$ac_try;;
24419esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024421 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024422 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024424 (exit $ac_status); }; }; then
24425 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024426else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024427 echo "$as_me: program exited with status $ac_status" >&5
24428echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024429sed 's/^/| /' conftest.$ac_ext >&5
24430
Martin v. Löwis11437992002-04-12 09:54:03 +000024431( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024432if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024433 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024434See \`config.log' for more details." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024435echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024436See \`config.log' for more details." >&2;}
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024437 { (exit 77); exit 77; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024438 else
24439 ac_cv_sizeof_wchar_t=0
24440 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024442rm -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 +000024443fi
24444rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024445fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024446{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24447echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024448
24449
24450
Martin v. Löwis11437992002-04-12 09:54:03 +000024451cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024452#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024453_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024454
Michael W. Hudson54241132001-12-07 15:38:26 +000024455
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024456fi
24457
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024458{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24459echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024460have_ucs4_tcl=no
24461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024462/* confdefs.h. */
24463_ACEOF
24464cat confdefs.h >>conftest.$ac_ext
24465cat >>conftest.$ac_ext <<_ACEOF
24466/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024467
24468#include <tcl.h>
24469#if TCL_UTF_MAX != 6
24470# error "NOT UCS4_TCL"
24471#endif
24472int
24473main ()
24474{
24475
24476 ;
24477 return 0;
24478}
24479_ACEOF
24480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024481if { (ac_try="$ac_compile"
24482case "(($ac_try" in
24483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24484 *) ac_try_echo=$ac_try;;
24485esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024489 grep -v '^ *+' conftest.er1 >conftest.err
24490 rm -f conftest.er1
24491 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024493 (exit $ac_status); } && {
24494 test -z "$ac_c_werror_flag" ||
24495 test ! -s conftest.err
24496 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024497
24498
24499cat >>confdefs.h <<\_ACEOF
24500#define HAVE_UCS4_TCL 1
24501_ACEOF
24502
24503 have_ucs4_tcl=yes
24504
24505else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024507sed 's/^/| /' conftest.$ac_ext >&5
24508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024509
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024511
24512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024513{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24514echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024515
Skip Montanaro6dead952003-09-25 14:50:04 +000024516# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024517if test "$wchar_h" = yes
24518then
24519 # check whether wchar_t is signed or not
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024520 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24521echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024522 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024523 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024524else
24525
24526 if test "$cross_compiling" = yes; then
24527 ac_cv_wchar_t_signed=yes
24528else
24529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024530/* confdefs.h. */
24531_ACEOF
24532cat confdefs.h >>conftest.$ac_ext
24533cat >>conftest.$ac_ext <<_ACEOF
24534/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024535
24536 #include <wchar.h>
24537 int main()
24538 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024539 /* Success: exit code 0 */
24540 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024541 }
24542
24543_ACEOF
24544rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024545if { (ac_try="$ac_link"
24546case "(($ac_try" in
24547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24548 *) ac_try_echo=$ac_try;;
24549esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024552 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024555 { (case "(($ac_try" in
24556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24557 *) ac_try_echo=$ac_try;;
24558esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024560 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024561 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024563 (exit $ac_status); }; }; then
24564 ac_cv_wchar_t_signed=yes
24565else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024566 echo "$as_me: program exited with status $ac_status" >&5
24567echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024568sed 's/^/| /' conftest.$ac_ext >&5
24569
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024570( exit $ac_status )
24571ac_cv_wchar_t_signed=no
24572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024573rm -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 +000024574fi
24575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024576
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024577fi
24578
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024579 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24580echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024581fi
24582
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024583{ echo "$as_me:$LINENO: checking what type to use for str" >&5
24584echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024585
24586# Check whether --with-wide-unicode was given.
24587if test "${with_wide_unicode+set}" = set; then
24588 withval=$with_wide_unicode;
24589if test "$withval" != no
24590then unicode_size="4"
24591else unicode_size="2"
24592fi
24593
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024594else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024595
Georg Brandl52d168a2008-01-07 18:10:24 +000024596case "$have_ucs4_tcl" in
24597 yes) unicode_size="4" ;;
24598 *) unicode_size="2" ;;
24599esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024600
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024601fi
24602
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024603
24604
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024605
Georg Brandl52d168a2008-01-07 18:10:24 +000024606case "$unicode_size" in
24607 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024608#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024609_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024610 ;;
24611 *) cat >>confdefs.h <<\_ACEOF
24612#define Py_UNICODE_SIZE 2
24613_ACEOF
24614 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024615esac
24616
Michael W. Hudson54241132001-12-07 15:38:26 +000024617
Martin v. Löwis11437992002-04-12 09:54:03 +000024618
24619
Georg Brandl52d168a2008-01-07 18:10:24 +000024620# wchar_t is only usable if it maps to an unsigned type
24621if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024622 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024623then
24624 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024625
Martin v. Löwis11437992002-04-12 09:54:03 +000024626cat >>confdefs.h <<\_ACEOF
24627#define HAVE_USABLE_WCHAR_T 1
24628_ACEOF
24629
Georg Brandl52d168a2008-01-07 18:10:24 +000024630 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024631#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024632_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024633
Georg Brandl52d168a2008-01-07 18:10:24 +000024634elif test "$ac_cv_sizeof_short" = "$unicode_size"
24635then
24636 PY_UNICODE_TYPE="unsigned short"
24637 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024638#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024639_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024640
Georg Brandl52d168a2008-01-07 18:10:24 +000024641elif test "$ac_cv_sizeof_long" = "$unicode_size"
24642then
24643 PY_UNICODE_TYPE="unsigned long"
24644 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024645#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024646_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024647
Georg Brandl52d168a2008-01-07 18:10:24 +000024648else
24649 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024650fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024651{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24652echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024653
24654# check for endianness
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024655{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24656echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024657if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024658 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024659else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024660 # See if sys/param.h defines the BYTE_ORDER macro.
24661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024662/* confdefs.h. */
24663_ACEOF
24664cat confdefs.h >>conftest.$ac_ext
24665cat >>conftest.$ac_ext <<_ACEOF
24666/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024667#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024668#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024669
Martin v. Löwis11437992002-04-12 09:54:03 +000024670int
24671main ()
24672{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024673#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24674 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24675 bogus endian macros
24676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024677
24678 ;
24679 return 0;
24680}
24681_ACEOF
24682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024683if { (ac_try="$ac_compile"
24684case "(($ac_try" in
24685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24686 *) ac_try_echo=$ac_try;;
24687esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024690 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024691 grep -v '^ *+' conftest.er1 >conftest.err
24692 rm -f conftest.er1
24693 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024695 (exit $ac_status); } && {
24696 test -z "$ac_c_werror_flag" ||
24697 test ! -s conftest.err
24698 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024699 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024701/* confdefs.h. */
24702_ACEOF
24703cat confdefs.h >>conftest.$ac_ext
24704cat >>conftest.$ac_ext <<_ACEOF
24705/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024706#include <sys/types.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024707#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024708
Martin v. Löwis11437992002-04-12 09:54:03 +000024709int
24710main ()
24711{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024712#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024713 not big endian
24714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024715
24716 ;
24717 return 0;
24718}
24719_ACEOF
24720rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024721if { (ac_try="$ac_compile"
24722case "(($ac_try" in
24723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24724 *) ac_try_echo=$ac_try;;
24725esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024729 grep -v '^ *+' conftest.er1 >conftest.err
24730 rm -f conftest.er1
24731 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024733 (exit $ac_status); } && {
24734 test -z "$ac_c_werror_flag" ||
24735 test ! -s conftest.err
24736 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024737 ac_cv_c_bigendian=yes
24738else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024740sed 's/^/| /' conftest.$ac_ext >&5
24741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024742 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744
24745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +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
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024750 # It does not; compile a test program.
24751if test "$cross_compiling" = yes; then
24752 # try to guess the endianness by grepping values into an object file
24753 ac_cv_c_bigendian=unknown
24754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024755/* confdefs.h. */
24756_ACEOF
24757cat confdefs.h >>conftest.$ac_ext
24758cat >>conftest.$ac_ext <<_ACEOF
24759/* end confdefs.h. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024760short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24761short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24762void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24763short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24764short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24765void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024766int
24767main ()
24768{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024769 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024770 ;
24771 return 0;
24772}
24773_ACEOF
24774rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775if { (ac_try="$ac_compile"
24776case "(($ac_try" in
24777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24778 *) ac_try_echo=$ac_try;;
24779esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024783 grep -v '^ *+' conftest.er1 >conftest.err
24784 rm -f conftest.er1
24785 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024787 (exit $ac_status); } && {
24788 test -z "$ac_c_werror_flag" ||
24789 test ! -s conftest.err
24790 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024791 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024792 ac_cv_c_bigendian=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024793fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024794if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24795 if test "$ac_cv_c_bigendian" = unknown; then
24796 ac_cv_c_bigendian=no
24797 else
24798 # finding both strings is unlikely to happen, but who knows?
24799 ac_cv_c_bigendian=unknown
24800 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024801fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024802else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024804sed 's/^/| /' conftest.$ac_ext >&5
24805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024806
Martin v. Löwis11437992002-04-12 09:54:03 +000024807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024808
24809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024810else
24811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024812/* confdefs.h. */
24813_ACEOF
24814cat confdefs.h >>conftest.$ac_ext
24815cat >>conftest.$ac_ext <<_ACEOF
24816/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024818int
24819main ()
24820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024821
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024822 /* Are we little or big endian? From Harbison&Steele. */
24823 union
24824 {
24825 long int l;
24826 char c[sizeof (long int)];
24827 } u;
24828 u.l = 1;
24829 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024830
24831 ;
24832 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024833}
Martin v. Löwis11437992002-04-12 09:54:03 +000024834_ACEOF
24835rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024836if { (ac_try="$ac_link"
24837case "(($ac_try" in
24838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24839 *) ac_try_echo=$ac_try;;
24840esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024842 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024843 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024845 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024846 { (case "(($ac_try" in
24847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24848 *) ac_try_echo=$ac_try;;
24849esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024851 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024852 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024855 ac_cv_c_bigendian=no
24856else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024857 echo "$as_me: program exited with status $ac_status" >&5
24858echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024859sed 's/^/| /' conftest.$ac_ext >&5
24860
Martin v. Löwis11437992002-04-12 09:54:03 +000024861( exit $ac_status )
24862ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024864rm -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 +000024865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024866
24867
Martin v. Löwis11437992002-04-12 09:54:03 +000024868fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024869
24870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24871fi
24872{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24873echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24874case $ac_cv_c_bigendian in
24875 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024876
24877cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024878#define WORDS_BIGENDIAN 1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024879_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024880 ;;
24881 no)
24882 ;;
24883 *)
24884 { { echo "$as_me:$LINENO: error: unknown endianness
24885presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24886echo "$as_me: error: unknown endianness
24887presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024888 { (exit 1); exit 1; }; } ;;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024889esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024890
Michael W. Hudson54241132001-12-07 15:38:26 +000024891
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024892# Check whether right shifting a negative integer extends the sign bit
24893# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024894{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24895echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024896if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024897 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024898else
Martin v. Löwis11437992002-04-12 09:54:03 +000024899
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024900if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024901 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024902else
Martin v. Löwis11437992002-04-12 09:54:03 +000024903 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024904/* confdefs.h. */
24905_ACEOF
24906cat confdefs.h >>conftest.$ac_ext
24907cat >>conftest.$ac_ext <<_ACEOF
24908/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024909
24910int main()
24911{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024912 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024913}
24914
Martin v. Löwis11437992002-04-12 09:54:03 +000024915_ACEOF
24916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024917if { (ac_try="$ac_link"
24918case "(($ac_try" in
24919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24920 *) ac_try_echo=$ac_try;;
24921esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024924 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024927 { (case "(($ac_try" in
24928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24929 *) ac_try_echo=$ac_try;;
24930esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024932 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024933 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024935 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024936 ac_cv_rshift_extends_sign=yes
24937else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024938 echo "$as_me: program exited with status $ac_status" >&5
24939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024940sed 's/^/| /' conftest.$ac_ext >&5
24941
Martin v. Löwis11437992002-04-12 09:54:03 +000024942( exit $ac_status )
24943ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024945rm -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 +000024946fi
24947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948
24949fi
24950
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024951{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24952echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024953if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024954then
Martin v. Löwis11437992002-04-12 09:54:03 +000024955
24956cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024957#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024958_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024959
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024960fi
24961
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024962# check for getc_unlocked and related locking functions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024963{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24964echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024965if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024966 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024967else
Martin v. Löwis11437992002-04-12 09:54:03 +000024968
24969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024970/* confdefs.h. */
24971_ACEOF
24972cat confdefs.h >>conftest.$ac_ext
24973cat >>conftest.$ac_ext <<_ACEOF
24974/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024975#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024976int
24977main ()
24978{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024979
24980 FILE *f = fopen("/dev/null", "r");
24981 flockfile(f);
24982 getc_unlocked(f);
24983 funlockfile(f);
24984
Martin v. Löwis11437992002-04-12 09:54:03 +000024985 ;
24986 return 0;
24987}
24988_ACEOF
24989rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024990if { (ac_try="$ac_link"
24991case "(($ac_try" in
24992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24993 *) ac_try_echo=$ac_try;;
24994esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024996 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024998 grep -v '^ *+' conftest.er1 >conftest.err
24999 rm -f conftest.er1
25000 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025002 (exit $ac_status); } && {
25003 test -z "$ac_c_werror_flag" ||
25004 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025005 } && test -s conftest$ac_exeext &&
25006 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025007 ac_cv_have_getc_unlocked=yes
25008else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025010sed 's/^/| /' conftest.$ac_ext >&5
25011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025012 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025014
25015rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025016 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025017fi
25018
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025019{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25020echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025021if test "$ac_cv_have_getc_unlocked" = yes
25022then
Martin v. Löwis11437992002-04-12 09:54:03 +000025023
25024cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025025#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025026_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025027
25028fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025029
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025030# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025031# save the value of LIBS so we don't actually link Python with readline
25032LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025033
Gregory P. Smith18820942008-09-07 06:24:49 +000025034# On some systems we need to link readline to a termcap compatible
25035# library. NOTE: Keep the precedence of listed libraries synchronised
25036# with setup.py.
25037py_cv_lib_readline=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025038{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
25039echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025040for py_libtermcap in "" ncursesw ncurses curses termcap; do
25041 if test -z "$py_libtermcap"; then
25042 READLINE_LIBS="-lreadline"
25043 else
25044 READLINE_LIBS="-lreadline -l$py_libtermcap"
25045 fi
25046 LIBS="$READLINE_LIBS $LIBS_no_readline"
25047 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025048/* confdefs.h. */
25049_ACEOF
25050cat confdefs.h >>conftest.$ac_ext
25051cat >>conftest.$ac_ext <<_ACEOF
25052/* end confdefs.h. */
25053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025054/* Override any GCC internal prototype to avoid an error.
25055 Use char because int might match the return type of a GCC
25056 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025057#ifdef __cplusplus
25058extern "C"
25059#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025060char readline ();
25061int
25062main ()
25063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025064return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025065 ;
25066 return 0;
25067}
25068_ACEOF
25069rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025070if { (ac_try="$ac_link"
25071case "(($ac_try" in
25072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25073 *) ac_try_echo=$ac_try;;
25074esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025076 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025077 ac_status=$?
25078 grep -v '^ *+' conftest.er1 >conftest.err
25079 rm -f conftest.er1
25080 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025082 (exit $ac_status); } && {
25083 test -z "$ac_c_werror_flag" ||
25084 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025085 } && test -s conftest$ac_exeext &&
25086 $as_test_x conftest$ac_exeext; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025087 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025088else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025089 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025090sed 's/^/| /' conftest.$ac_ext >&5
25091
Gregory P. Smith18820942008-09-07 06:24:49 +000025092
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025094
25095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025096 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025097 if test $py_cv_lib_readline = yes; then
25098 break
25099 fi
25100done
25101# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25102#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025103if test $py_cv_lib_readline = no; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025104 { echo "$as_me:$LINENO: result: none" >&5
25105echo "${ECHO_T}none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025106else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025107 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25108echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025109
25110cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025111#define HAVE_LIBREADLINE 1
25112_ACEOF
25113
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025114fi
25115
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025116# check for readline 2.1
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025117{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25118echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025119if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025120 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025121else
25122 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025123LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025124cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025125/* confdefs.h. */
25126_ACEOF
25127cat confdefs.h >>conftest.$ac_ext
25128cat >>conftest.$ac_ext <<_ACEOF
25129/* end confdefs.h. */
25130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025131/* Override any GCC internal prototype to avoid an error.
25132 Use char because int might match the return type of a GCC
25133 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025134#ifdef __cplusplus
25135extern "C"
25136#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025137char rl_callback_handler_install ();
25138int
25139main ()
25140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025141return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025142 ;
25143 return 0;
25144}
25145_ACEOF
25146rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025147if { (ac_try="$ac_link"
25148case "(($ac_try" in
25149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25150 *) ac_try_echo=$ac_try;;
25151esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025153 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025155 grep -v '^ *+' conftest.er1 >conftest.err
25156 rm -f conftest.er1
25157 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025159 (exit $ac_status); } && {
25160 test -z "$ac_c_werror_flag" ||
25161 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025162 } && test -s conftest$ac_exeext &&
25163 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025164 ac_cv_lib_readline_rl_callback_handler_install=yes
25165else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025166 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025171
25172rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025173 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025174LIBS=$ac_check_lib_save_LIBS
25175fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025176{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25177echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25178if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025179
25180cat >>confdefs.h <<\_ACEOF
25181#define HAVE_RL_CALLBACK 1
25182_ACEOF
25183
25184fi
25185
25186
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025187# check for readline 2.2
25188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025189/* confdefs.h. */
25190_ACEOF
25191cat confdefs.h >>conftest.$ac_ext
25192cat >>conftest.$ac_ext <<_ACEOF
25193/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025194#include <readline/readline.h>
25195_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196if { (ac_try="$ac_cpp conftest.$ac_ext"
25197case "(($ac_try" in
25198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199 *) ac_try_echo=$ac_try;;
25200esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025202 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025203 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025204 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025205 rm -f conftest.er1
25206 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025208 (exit $ac_status); } >/dev/null && {
25209 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25210 test ! -s conftest.err
25211 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025212 have_readline=yes
25213else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025215sed 's/^/| /' conftest.$ac_ext >&5
25216
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025217 have_readline=no
25218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025219
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025220rm -f conftest.err conftest.$ac_ext
25221if test $have_readline = yes
25222then
25223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025224/* confdefs.h. */
25225_ACEOF
25226cat confdefs.h >>conftest.$ac_ext
25227cat >>conftest.$ac_ext <<_ACEOF
25228/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025229#include <readline/readline.h>
25230
25231_ACEOF
25232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025233 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025234
25235cat >>confdefs.h <<\_ACEOF
25236#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25237_ACEOF
25238
25239fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000025240rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025241
25242fi
25243
Martin v. Löwis0daad592001-09-30 21:09:59 +000025244# check for readline 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025245{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25246echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025247if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025249else
Martin v. Löwis11437992002-04-12 09:54:03 +000025250 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025251LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025253/* confdefs.h. */
25254_ACEOF
25255cat confdefs.h >>conftest.$ac_ext
25256cat >>conftest.$ac_ext <<_ACEOF
25257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025259/* Override any GCC internal prototype to avoid an error.
25260 Use char because int might match the return type of a GCC
25261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025262#ifdef __cplusplus
25263extern "C"
25264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025265char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025266int
25267main ()
25268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025269return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 ;
25271 return 0;
25272}
25273_ACEOF
25274rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025275if { (ac_try="$ac_link"
25276case "(($ac_try" in
25277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25278 *) ac_try_echo=$ac_try;;
25279esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025282 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025283 grep -v '^ *+' conftest.er1 >conftest.err
25284 rm -f conftest.er1
25285 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025287 (exit $ac_status); } && {
25288 test -z "$ac_c_werror_flag" ||
25289 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025290 } && test -s conftest$ac_exeext &&
25291 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025292 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025293else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025295sed 's/^/| /' conftest.$ac_ext >&5
25296
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025297 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025299
25300rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025302LIBS=$ac_check_lib_save_LIBS
25303fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025304{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25305echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25306if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025307
Martin v. Löwis11437992002-04-12 09:54:03 +000025308cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025309#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025310_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025311
Martin v. Löwis0daad592001-09-30 21:09:59 +000025312fi
25313
Michael W. Hudson54241132001-12-07 15:38:26 +000025314
Thomas Wouters89d996e2007-09-08 17:39:28 +000025315# also in 4.0
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025316{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25317echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025318if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025319 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025320else
25321 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025322LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025323cat >conftest.$ac_ext <<_ACEOF
25324/* confdefs.h. */
25325_ACEOF
25326cat confdefs.h >>conftest.$ac_ext
25327cat >>conftest.$ac_ext <<_ACEOF
25328/* end confdefs.h. */
25329
25330/* Override any GCC internal prototype to avoid an error.
25331 Use char because int might match the return type of a GCC
25332 builtin and then its argument prototype would still apply. */
25333#ifdef __cplusplus
25334extern "C"
25335#endif
25336char rl_completion_display_matches_hook ();
25337int
25338main ()
25339{
25340return rl_completion_display_matches_hook ();
25341 ;
25342 return 0;
25343}
25344_ACEOF
25345rm -f conftest.$ac_objext conftest$ac_exeext
25346if { (ac_try="$ac_link"
25347case "(($ac_try" in
25348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25349 *) ac_try_echo=$ac_try;;
25350esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025352 (eval "$ac_link") 2>conftest.er1
25353 ac_status=$?
25354 grep -v '^ *+' conftest.er1 >conftest.err
25355 rm -f conftest.er1
25356 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025358 (exit $ac_status); } && {
25359 test -z "$ac_c_werror_flag" ||
25360 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025361 } && test -s conftest$ac_exeext &&
25362 $as_test_x conftest$ac_exeext; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025363 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25364else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025365 echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025366sed 's/^/| /' conftest.$ac_ext >&5
25367
25368 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25369fi
25370
25371rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25372 conftest$ac_exeext conftest.$ac_ext
25373LIBS=$ac_check_lib_save_LIBS
25374fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025375{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25376echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25377if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025378
25379cat >>confdefs.h <<\_ACEOF
25380#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25381_ACEOF
25382
25383fi
25384
25385
Martin v. Löwis0daad592001-09-30 21:09:59 +000025386# check for readline 4.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025387{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25388echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025389if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025390 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025391else
Martin v. Löwis11437992002-04-12 09:54:03 +000025392 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025393LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025395/* confdefs.h. */
25396_ACEOF
25397cat confdefs.h >>conftest.$ac_ext
25398cat >>conftest.$ac_ext <<_ACEOF
25399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025401/* Override any GCC internal prototype to avoid an error.
25402 Use char because int might match the return type of a GCC
25403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025404#ifdef __cplusplus
25405extern "C"
25406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025407char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025408int
25409main ()
25410{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025411return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025412 ;
25413 return 0;
25414}
25415_ACEOF
25416rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417if { (ac_try="$ac_link"
25418case "(($ac_try" in
25419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25420 *) ac_try_echo=$ac_try;;
25421esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025425 grep -v '^ *+' conftest.er1 >conftest.err
25426 rm -f conftest.er1
25427 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429 (exit $ac_status); } && {
25430 test -z "$ac_c_werror_flag" ||
25431 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025432 } && test -s conftest$ac_exeext &&
25433 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025434 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025435else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025437sed 's/^/| /' conftest.$ac_ext >&5
25438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025439 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025441
25442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025444LIBS=$ac_check_lib_save_LIBS
25445fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025446{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25447echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25448if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025449
Martin v. Löwis11437992002-04-12 09:54:03 +000025450cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025451#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025452_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025453
Guido van Rossum353ae582001-07-10 16:45:32 +000025454fi
25455
Jack Jansendd19cf82001-12-06 22:36:17 +000025456
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025457# also in readline 4.2
25458cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025459/* confdefs.h. */
25460_ACEOF
25461cat confdefs.h >>conftest.$ac_ext
25462cat >>conftest.$ac_ext <<_ACEOF
25463/* end confdefs.h. */
25464#include <readline/readline.h>
25465_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025466if { (ac_try="$ac_cpp conftest.$ac_ext"
25467case "(($ac_try" in
25468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25469 *) ac_try_echo=$ac_try;;
25470esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025473 ac_status=$?
25474 grep -v '^ *+' conftest.er1 >conftest.err
25475 rm -f conftest.er1
25476 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025478 (exit $ac_status); } >/dev/null && {
25479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25480 test ! -s conftest.err
25481 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025482 have_readline=yes
25483else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025484 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025485sed 's/^/| /' conftest.$ac_ext >&5
25486
25487 have_readline=no
25488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025489
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025490rm -f conftest.err conftest.$ac_ext
25491if test $have_readline = yes
25492then
25493 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025494/* confdefs.h. */
25495_ACEOF
25496cat confdefs.h >>conftest.$ac_ext
25497cat >>conftest.$ac_ext <<_ACEOF
25498/* end confdefs.h. */
25499#include <readline/readline.h>
25500
25501_ACEOF
25502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25503 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25504
25505cat >>confdefs.h <<\_ACEOF
25506#define HAVE_RL_CATCH_SIGNAL 1
25507_ACEOF
25508
25509fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000025510rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025511
25512fi
25513
Martin v. Löwis82bca632006-02-10 20:49:30 +000025514# End of readline checks: restore LIBS
25515LIBS=$LIBS_no_readline
25516
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025517{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25518echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025519if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025520 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025521else
Martin v. Löwis11437992002-04-12 09:54:03 +000025522
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025523if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025524 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025525else
Martin v. Löwis11437992002-04-12 09:54:03 +000025526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025527/* confdefs.h. */
25528_ACEOF
25529cat confdefs.h >>conftest.$ac_ext
25530cat >>conftest.$ac_ext <<_ACEOF
25531/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025532
25533int main()
25534{
25535 int val1 = nice(1);
25536 if (val1 != -1 && val1 == nice(2))
25537 exit(0);
25538 exit(1);
25539}
25540
Martin v. Löwis11437992002-04-12 09:54:03 +000025541_ACEOF
25542rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025543if { (ac_try="$ac_link"
25544case "(($ac_try" in
25545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25546 *) ac_try_echo=$ac_try;;
25547esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025549 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025550 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025553 { (case "(($ac_try" in
25554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25555 *) ac_try_echo=$ac_try;;
25556esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025559 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025561 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025562 ac_cv_broken_nice=yes
25563else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025564 echo "$as_me: program exited with status $ac_status" >&5
25565echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025566sed 's/^/| /' conftest.$ac_ext >&5
25567
Martin v. Löwis11437992002-04-12 09:54:03 +000025568( exit $ac_status )
25569ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025571rm -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 +000025572fi
25573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025574
25575fi
25576
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025577{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25578echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025579if test "$ac_cv_broken_nice" = yes
25580then
Martin v. Löwis11437992002-04-12 09:54:03 +000025581
25582cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025583#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025584_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025585
25586fi
25587
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025588{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25589echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025590if test "${ac_cv_broken_poll+set}" = set; then
25591 echo $ECHO_N "(cached) $ECHO_C" >&6
25592else
25593 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025594 ac_cv_broken_poll=no
25595else
25596 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025597/* confdefs.h. */
25598_ACEOF
25599cat confdefs.h >>conftest.$ac_ext
25600cat >>conftest.$ac_ext <<_ACEOF
25601/* end confdefs.h. */
25602
25603#include <poll.h>
25604
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025605int main()
25606{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025607 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025608 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025609
25610 close (42);
25611
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025612 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025613 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025614 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025615 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025616 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025617 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025618 return 1;
25619}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025620
25621_ACEOF
25622rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025623if { (ac_try="$ac_link"
25624case "(($ac_try" in
25625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25626 *) ac_try_echo=$ac_try;;
25627esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025629 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025630 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025632 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025633 { (case "(($ac_try" in
25634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25635 *) ac_try_echo=$ac_try;;
25636esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025638 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025639 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025641 (exit $ac_status); }; }; then
25642 ac_cv_broken_poll=yes
25643else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025644 echo "$as_me: program exited with status $ac_status" >&5
25645echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025646sed 's/^/| /' conftest.$ac_ext >&5
25647
25648( exit $ac_status )
25649ac_cv_broken_poll=no
25650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025651rm -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 +000025652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653
25654
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000025655fi
25656
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025657{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25658echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025659if test "$ac_cv_broken_poll" = yes
25660then
25661
25662cat >>confdefs.h <<\_ACEOF
25663#define HAVE_BROKEN_POLL 1
25664_ACEOF
25665
25666fi
25667
Brett Cannon43802422005-02-10 20:48:03 +000025668# 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 +000025669# (which is not required by ISO C or UNIX spec) and/or if we support
25670# tzname[]
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025671{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25672echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025673if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025674 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025675else
25676 cat >conftest.$ac_ext <<_ACEOF
25677/* confdefs.h. */
25678_ACEOF
25679cat confdefs.h >>conftest.$ac_ext
25680cat >>conftest.$ac_ext <<_ACEOF
25681/* end confdefs.h. */
25682#include <sys/types.h>
25683#include <$ac_cv_struct_tm>
25684
25685
25686int
25687main ()
25688{
25689static struct tm ac_aggr;
25690if (ac_aggr.tm_zone)
25691return 0;
25692 ;
25693 return 0;
25694}
25695_ACEOF
25696rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025697if { (ac_try="$ac_compile"
25698case "(($ac_try" in
25699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25700 *) ac_try_echo=$ac_try;;
25701esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025703 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025704 ac_status=$?
25705 grep -v '^ *+' conftest.er1 >conftest.err
25706 rm -f conftest.er1
25707 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025709 (exit $ac_status); } && {
25710 test -z "$ac_c_werror_flag" ||
25711 test ! -s conftest.err
25712 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025713 ac_cv_member_struct_tm_tm_zone=yes
25714else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025715 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025716sed 's/^/| /' conftest.$ac_ext >&5
25717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025718 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025719/* confdefs.h. */
25720_ACEOF
25721cat confdefs.h >>conftest.$ac_ext
25722cat >>conftest.$ac_ext <<_ACEOF
25723/* end confdefs.h. */
25724#include <sys/types.h>
25725#include <$ac_cv_struct_tm>
25726
25727
25728int
25729main ()
25730{
25731static struct tm ac_aggr;
25732if (sizeof ac_aggr.tm_zone)
25733return 0;
25734 ;
25735 return 0;
25736}
25737_ACEOF
25738rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025739if { (ac_try="$ac_compile"
25740case "(($ac_try" in
25741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25742 *) ac_try_echo=$ac_try;;
25743esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025746 ac_status=$?
25747 grep -v '^ *+' conftest.er1 >conftest.err
25748 rm -f conftest.er1
25749 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025751 (exit $ac_status); } && {
25752 test -z "$ac_c_werror_flag" ||
25753 test ! -s conftest.err
25754 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025755 ac_cv_member_struct_tm_tm_zone=yes
25756else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025757 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025758sed 's/^/| /' conftest.$ac_ext >&5
25759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025760 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025762
25763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025765
25766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025767fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025768{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25769echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25770if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025771
25772cat >>confdefs.h <<_ACEOF
25773#define HAVE_STRUCT_TM_TM_ZONE 1
25774_ACEOF
25775
25776
25777fi
25778
25779if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25780
25781cat >>confdefs.h <<\_ACEOF
25782#define HAVE_TM_ZONE 1
25783_ACEOF
25784
25785else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025786 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25787echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025788if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025789 echo $ECHO_N "(cached) $ECHO_C" >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025790else
25791 cat >conftest.$ac_ext <<_ACEOF
25792/* confdefs.h. */
25793_ACEOF
25794cat confdefs.h >>conftest.$ac_ext
25795cat >>conftest.$ac_ext <<_ACEOF
25796/* end confdefs.h. */
25797#include <time.h>
25798
25799int
25800main ()
25801{
25802#ifndef tzname
25803 (void) tzname;
25804#endif
25805
25806 ;
25807 return 0;
25808}
25809_ACEOF
25810rm -f conftest.$ac_objext
25811if { (ac_try="$ac_compile"
25812case "(($ac_try" in
25813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25814 *) ac_try_echo=$ac_try;;
25815esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025817 (eval "$ac_compile") 2>conftest.er1
25818 ac_status=$?
25819 grep -v '^ *+' conftest.er1 >conftest.err
25820 rm -f conftest.er1
25821 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025823 (exit $ac_status); } && {
25824 test -z "$ac_c_werror_flag" ||
25825 test ! -s conftest.err
25826 } && test -s conftest.$ac_objext; then
25827 ac_cv_have_decl_tzname=yes
25828else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025829 echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025830sed 's/^/| /' conftest.$ac_ext >&5
25831
25832 ac_cv_have_decl_tzname=no
25833fi
25834
25835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25836fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025837{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25838echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25839if test $ac_cv_have_decl_tzname = yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025840
25841cat >>confdefs.h <<_ACEOF
25842#define HAVE_DECL_TZNAME 1
25843_ACEOF
25844
25845
25846else
25847 cat >>confdefs.h <<_ACEOF
25848#define HAVE_DECL_TZNAME 0
25849_ACEOF
25850
25851
25852fi
25853
25854
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025855 { echo "$as_me:$LINENO: checking for tzname" >&5
25856echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025857if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025858 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025859else
25860 cat >conftest.$ac_ext <<_ACEOF
25861/* confdefs.h. */
25862_ACEOF
25863cat confdefs.h >>conftest.$ac_ext
25864cat >>conftest.$ac_ext <<_ACEOF
25865/* end confdefs.h. */
25866#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025867#if !HAVE_DECL_TZNAME
25868extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025869#endif
25870
25871int
25872main ()
25873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025874return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025875 ;
25876 return 0;
25877}
25878_ACEOF
25879rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025880if { (ac_try="$ac_link"
25881case "(($ac_try" in
25882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25883 *) ac_try_echo=$ac_try;;
25884esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025886 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025887 ac_status=$?
25888 grep -v '^ *+' conftest.er1 >conftest.err
25889 rm -f conftest.er1
25890 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025892 (exit $ac_status); } && {
25893 test -z "$ac_c_werror_flag" ||
25894 test ! -s conftest.err
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025895 } && test -s conftest$ac_exeext &&
25896 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025897 ac_cv_var_tzname=yes
25898else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025899 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025900sed 's/^/| /' conftest.$ac_ext >&5
25901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025902 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025904
25905rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025906 conftest$ac_exeext conftest.$ac_ext
25907fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025908{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25909echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025910 if test $ac_cv_var_tzname = yes; then
25911
25912cat >>confdefs.h <<\_ACEOF
25913#define HAVE_TZNAME 1
25914_ACEOF
25915
25916 fi
25917fi
25918
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025919
Martin v. Löwis1d459062005-03-14 21:23:33 +000025920# check tzset(3) exists and works like we expect it to
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025921{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25922echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025923if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025925else
25926
25927if test "$cross_compiling" = yes; then
25928 ac_cv_working_tzset=no
25929else
25930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025931/* confdefs.h. */
25932_ACEOF
25933cat confdefs.h >>conftest.$ac_ext
25934cat >>conftest.$ac_ext <<_ACEOF
25935/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025936
25937#include <stdlib.h>
25938#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025939#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025940
25941#if HAVE_TZNAME
25942extern char *tzname[];
25943#endif
25944
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025945int main()
25946{
Brett Cannon18367812003-09-19 00:59:16 +000025947 /* Note that we need to ensure that not only does tzset(3)
25948 do 'something' with localtime, but it works as documented
25949 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025950 This includes making sure that tzname is set properly if
25951 tm->tm_zone does not exist since it is the alternative way
25952 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025953
25954 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025955 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025956 */
25957
Martin v. Löwis1d459062005-03-14 21:23:33 +000025958 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025959 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25960
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025961 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025962 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025963 if (localtime(&groundhogday)->tm_hour != 0)
25964 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025965#if HAVE_TZNAME
25966 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25967 if (strcmp(tzname[0], "UTC") ||
25968 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25969 exit(1);
25970#endif
Brett Cannon18367812003-09-19 00:59:16 +000025971
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025972 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025973 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025974 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025975 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025976#if HAVE_TZNAME
25977 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25978 exit(1);
25979#endif
Brett Cannon18367812003-09-19 00:59:16 +000025980
25981 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25982 tzset();
25983 if (localtime(&groundhogday)->tm_hour != 11)
25984 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025985#if HAVE_TZNAME
25986 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25987 exit(1);
25988#endif
25989
25990#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025991 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25992 exit(1);
25993 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25994 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025995#endif
Brett Cannon18367812003-09-19 00:59:16 +000025996
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025997 exit(0);
25998}
25999
26000_ACEOF
26001rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026002if { (ac_try="$ac_link"
26003case "(($ac_try" in
26004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26005 *) ac_try_echo=$ac_try;;
26006esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026009 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026011 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026012 { (case "(($ac_try" in
26013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26014 *) ac_try_echo=$ac_try;;
26015esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026017 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026018 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026020 (exit $ac_status); }; }; then
26021 ac_cv_working_tzset=yes
26022else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026023 echo "$as_me: program exited with status $ac_status" >&5
26024echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026025sed 's/^/| /' conftest.$ac_ext >&5
26026
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026027( exit $ac_status )
26028ac_cv_working_tzset=no
26029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030rm -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 +000026031fi
26032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026033
26034fi
26035
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026036{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26037echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026038if test "$ac_cv_working_tzset" = yes
26039then
26040
26041cat >>confdefs.h <<\_ACEOF
26042#define HAVE_WORKING_TZSET 1
26043_ACEOF
26044
26045fi
26046
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026047# Look for subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026048{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26049echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026050if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026051 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026052else
26053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026054/* confdefs.h. */
26055_ACEOF
26056cat confdefs.h >>conftest.$ac_ext
26057cat >>conftest.$ac_ext <<_ACEOF
26058/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026059#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026060int
26061main ()
26062{
26063
26064struct stat st;
26065st.st_mtim.tv_nsec = 1;
26066
26067 ;
26068 return 0;
26069}
26070_ACEOF
26071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072if { (ac_try="$ac_compile"
26073case "(($ac_try" in
26074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26075 *) ac_try_echo=$ac_try;;
26076esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026080 grep -v '^ *+' conftest.er1 >conftest.err
26081 rm -f conftest.er1
26082 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026084 (exit $ac_status); } && {
26085 test -z "$ac_c_werror_flag" ||
26086 test ! -s conftest.err
26087 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026088 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026089else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026091sed 's/^/| /' conftest.$ac_ext >&5
26092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026093 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026094fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26097fi
26098
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026099{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26100echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026101if test "$ac_cv_stat_tv_nsec" = yes
26102then
26103
26104cat >>confdefs.h <<\_ACEOF
26105#define HAVE_STAT_TV_NSEC 1
26106_ACEOF
26107
26108fi
26109
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026110# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026111{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26112echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026113if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026114 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026115else
26116 cat >conftest.$ac_ext <<_ACEOF
26117/* confdefs.h. */
26118_ACEOF
26119cat confdefs.h >>conftest.$ac_ext
26120cat >>conftest.$ac_ext <<_ACEOF
26121/* end confdefs.h. */
26122#include <sys/stat.h>
26123int
26124main ()
26125{
26126
26127struct stat st;
26128st.st_mtimespec.tv_nsec = 1;
26129
26130 ;
26131 return 0;
26132}
26133_ACEOF
26134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026135if { (ac_try="$ac_compile"
26136case "(($ac_try" in
26137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26138 *) ac_try_echo=$ac_try;;
26139esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026142 ac_status=$?
26143 grep -v '^ *+' conftest.er1 >conftest.err
26144 rm -f conftest.er1
26145 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026147 (exit $ac_status); } && {
26148 test -z "$ac_c_werror_flag" ||
26149 test ! -s conftest.err
26150 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026151 ac_cv_stat_tv_nsec2=yes
26152else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026153 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026154sed 's/^/| /' conftest.$ac_ext >&5
26155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026156 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026157fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26160fi
26161
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026162{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26163echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026164if test "$ac_cv_stat_tv_nsec2" = yes
26165then
26166
26167cat >>confdefs.h <<\_ACEOF
26168#define HAVE_STAT_TV_NSEC2 1
26169_ACEOF
26170
26171fi
26172
Jack Jansen666b1e72001-10-31 12:11:48 +000026173# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026174{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26175echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026176if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026177 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026178else
Martin v. Löwis11437992002-04-12 09:54:03 +000026179 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026180/* confdefs.h. */
26181_ACEOF
26182cat confdefs.h >>conftest.$ac_ext
26183cat >>conftest.$ac_ext <<_ACEOF
26184/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026185#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026186int
26187main ()
26188{
Jack Jansen666b1e72001-10-31 12:11:48 +000026189
26190 int rtn;
26191 rtn = mvwdelch(0,0,0);
26192
Martin v. Löwis11437992002-04-12 09:54:03 +000026193 ;
26194 return 0;
26195}
26196_ACEOF
26197rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026198if { (ac_try="$ac_compile"
26199case "(($ac_try" in
26200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26201 *) ac_try_echo=$ac_try;;
26202esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026206 grep -v '^ *+' conftest.er1 >conftest.err
26207 rm -f conftest.er1
26208 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026210 (exit $ac_status); } && {
26211 test -z "$ac_c_werror_flag" ||
26212 test ! -s conftest.err
26213 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026214 ac_cv_mvwdelch_is_expression=yes
26215else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026217sed 's/^/| /' conftest.$ac_ext >&5
26218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026219 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026220fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26223fi
26224
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026225{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26226echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026227
26228if test "$ac_cv_mvwdelch_is_expression" = yes
26229then
Martin v. Löwis11437992002-04-12 09:54:03 +000026230
26231cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026232#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026233_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026234
26235fi
26236
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026237{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26238echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026239if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026240 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026241else
Martin v. Löwis11437992002-04-12 09:54:03 +000026242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026243/* confdefs.h. */
26244_ACEOF
26245cat confdefs.h >>conftest.$ac_ext
26246cat >>conftest.$ac_ext <<_ACEOF
26247/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026248#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026249int
26250main ()
26251{
Jack Jansen666b1e72001-10-31 12:11:48 +000026252
26253 WINDOW *w;
26254 w->_flags = 0;
26255
Martin v. Löwis11437992002-04-12 09:54:03 +000026256 ;
26257 return 0;
26258}
26259_ACEOF
26260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026261if { (ac_try="$ac_compile"
26262case "(($ac_try" in
26263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26264 *) ac_try_echo=$ac_try;;
26265esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026269 grep -v '^ *+' conftest.er1 >conftest.err
26270 rm -f conftest.er1
26271 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026273 (exit $ac_status); } && {
26274 test -z "$ac_c_werror_flag" ||
26275 test ! -s conftest.err
26276 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026277 ac_cv_window_has_flags=yes
26278else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026280sed 's/^/| /' conftest.$ac_ext >&5
26281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026282 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026283fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26286fi
26287
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026288{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26289echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026290
Jack Jansen666b1e72001-10-31 12:11:48 +000026291
26292if test "$ac_cv_window_has_flags" = yes
26293then
Martin v. Löwis11437992002-04-12 09:54:03 +000026294
26295cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026296#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026297_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026298
26299fi
26300
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026301{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26302echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026303cat >conftest.$ac_ext <<_ACEOF
26304/* confdefs.h. */
26305_ACEOF
26306cat confdefs.h >>conftest.$ac_ext
26307cat >>conftest.$ac_ext <<_ACEOF
26308/* end confdefs.h. */
26309#include <curses.h>
26310int
26311main ()
26312{
26313void *x=is_term_resized
26314 ;
26315 return 0;
26316}
26317_ACEOF
26318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026319if { (ac_try="$ac_compile"
26320case "(($ac_try" in
26321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26322 *) ac_try_echo=$ac_try;;
26323esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026326 ac_status=$?
26327 grep -v '^ *+' conftest.er1 >conftest.err
26328 rm -f conftest.er1
26329 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026331 (exit $ac_status); } && {
26332 test -z "$ac_c_werror_flag" ||
26333 test ! -s conftest.err
26334 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026335
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026336cat >>confdefs.h <<\_ACEOF
26337#define HAVE_CURSES_IS_TERM_RESIZED 1
26338_ACEOF
26339
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026340 { echo "$as_me:$LINENO: result: yes" >&5
26341echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026342else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026343 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026344sed 's/^/| /' conftest.$ac_ext >&5
26345
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026346 { echo "$as_me:$LINENO: result: no" >&5
26347echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026348
26349fi
26350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26352
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026353{ echo "$as_me:$LINENO: checking for resize_term" >&5
26354echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026355cat >conftest.$ac_ext <<_ACEOF
26356/* confdefs.h. */
26357_ACEOF
26358cat confdefs.h >>conftest.$ac_ext
26359cat >>conftest.$ac_ext <<_ACEOF
26360/* end confdefs.h. */
26361#include <curses.h>
26362int
26363main ()
26364{
26365void *x=resize_term
26366 ;
26367 return 0;
26368}
26369_ACEOF
26370rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371if { (ac_try="$ac_compile"
26372case "(($ac_try" in
26373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26374 *) ac_try_echo=$ac_try;;
26375esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026377 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026378 ac_status=$?
26379 grep -v '^ *+' conftest.er1 >conftest.err
26380 rm -f conftest.er1
26381 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026383 (exit $ac_status); } && {
26384 test -z "$ac_c_werror_flag" ||
26385 test ! -s conftest.err
26386 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026387
26388cat >>confdefs.h <<\_ACEOF
26389#define HAVE_CURSES_RESIZE_TERM 1
26390_ACEOF
26391
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026392 { echo "$as_me:$LINENO: result: yes" >&5
26393echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026394else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026395 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026396sed 's/^/| /' conftest.$ac_ext >&5
26397
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026398 { echo "$as_me:$LINENO: result: no" >&5
26399echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026400
26401fi
26402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26404
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026405{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26406echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026407cat >conftest.$ac_ext <<_ACEOF
26408/* confdefs.h. */
26409_ACEOF
26410cat confdefs.h >>conftest.$ac_ext
26411cat >>conftest.$ac_ext <<_ACEOF
26412/* end confdefs.h. */
26413#include <curses.h>
26414int
26415main ()
26416{
26417void *x=resizeterm
26418 ;
26419 return 0;
26420}
26421_ACEOF
26422rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026423if { (ac_try="$ac_compile"
26424case "(($ac_try" in
26425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26426 *) ac_try_echo=$ac_try;;
26427esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026429 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026430 ac_status=$?
26431 grep -v '^ *+' conftest.er1 >conftest.err
26432 rm -f conftest.er1
26433 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435 (exit $ac_status); } && {
26436 test -z "$ac_c_werror_flag" ||
26437 test ! -s conftest.err
26438 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026439
26440cat >>confdefs.h <<\_ACEOF
26441#define HAVE_CURSES_RESIZETERM 1
26442_ACEOF
26443
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026444 { echo "$as_me:$LINENO: result: yes" >&5
26445echo "${ECHO_T}yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026446else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026447 echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026448sed 's/^/| /' conftest.$ac_ext >&5
26449
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026450 { echo "$as_me:$LINENO: result: no" >&5
26451echo "${ECHO_T}no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026452
26453fi
26454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26456
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026457{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26458echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026459
26460if test -r /dev/ptmx
26461then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026462 { echo "$as_me:$LINENO: result: yes" >&5
26463echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026464
26465cat >>confdefs.h <<\_ACEOF
26466#define HAVE_DEV_PTMX 1
26467_ACEOF
26468
Thomas Wouters89f507f2006-12-13 04:49:30 +000026469else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026470 { echo "$as_me:$LINENO: result: no" >&5
26471echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026472fi
26473
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026474{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26475echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026476
26477if test -r /dev/ptc
26478then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026479 { echo "$as_me:$LINENO: result: yes" >&5
26480echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026481
26482cat >>confdefs.h <<\_ACEOF
26483#define HAVE_DEV_PTC 1
26484_ACEOF
26485
Thomas Wouters89f507f2006-12-13 04:49:30 +000026486else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026487 { echo "$as_me:$LINENO: result: no" >&5
26488echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026489fi
26490
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026491{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26492echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026493if test "${ac_cv_have_size_t_format+set}" = set; then
26494 echo $ECHO_N "(cached) $ECHO_C" >&6
26495else
26496 if test "$cross_compiling" = yes; then
26497 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026498else
26499 cat >conftest.$ac_ext <<_ACEOF
26500/* confdefs.h. */
26501_ACEOF
26502cat confdefs.h >>conftest.$ac_ext
26503cat >>conftest.$ac_ext <<_ACEOF
26504/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026505
Thomas Wouters477c8d52006-05-27 19:21:47 +000026506#include <stdio.h>
26507#include <stddef.h>
26508#include <string.h>
26509
Christian Heimes2c181612007-12-17 20:04:13 +000026510#ifdef HAVE_SYS_TYPES_H
26511#include <sys/types.h>
26512#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026513
26514#ifdef HAVE_SSIZE_T
26515typedef ssize_t Py_ssize_t;
26516#elif SIZEOF_VOID_P == SIZEOF_LONG
26517typedef long Py_ssize_t;
26518#else
26519typedef int Py_ssize_t;
26520#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026521
Christian Heimes2c181612007-12-17 20:04:13 +000026522int main()
26523{
26524 char buffer[256];
26525
Thomas Wouters477c8d52006-05-27 19:21:47 +000026526 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26527 return 1;
26528
Thomas Wouters89f507f2006-12-13 04:49:30 +000026529 if (strcmp(buffer, "123"))
26530 return 1;
26531
26532 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26533 return 1;
26534
26535 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026536 return 1;
26537
26538 return 0;
26539}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026540
Thomas Wouters477c8d52006-05-27 19:21:47 +000026541_ACEOF
26542rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026543if { (ac_try="$ac_link"
26544case "(($ac_try" in
26545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26546 *) ac_try_echo=$ac_try;;
26547esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026549 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026550 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026553 { (case "(($ac_try" in
26554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26555 *) ac_try_echo=$ac_try;;
26556esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026558 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026559 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026561 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026562 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026563else
26564 echo "$as_me: program exited with status $ac_status" >&5
26565echo "$as_me: failed program was:" >&5
26566sed 's/^/| /' conftest.$ac_ext >&5
26567
26568( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026569ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026570fi
26571rm -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 +000026572fi
26573
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026574
26575
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026576fi
26577
26578{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26579echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26580if test $ac_cv_have_size_t_format = yes
26581then
26582
26583cat >>confdefs.h <<\_ACEOF
26584#define PY_FORMAT_SIZE_T "z"
26585_ACEOF
26586
26587fi
26588
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026589{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26590echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026591if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026593else
Martin v. Löwis11437992002-04-12 09:54:03 +000026594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026595/* confdefs.h. */
26596_ACEOF
26597cat confdefs.h >>conftest.$ac_ext
26598cat >>conftest.$ac_ext <<_ACEOF
26599/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026600
26601#ifdef HAVE_SYS_TYPES_H
26602#include <sys/types.h>
26603#endif
26604#ifdef HAVE_SYS_SOCKET_H
26605#include <sys/socket.h>
26606#endif
26607
26608
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026609typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026610int
26611main ()
26612{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026613if ((ac__type_new_ *) 0)
26614 return 0;
26615if (sizeof (ac__type_new_))
26616 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026617 ;
26618 return 0;
26619}
26620_ACEOF
26621rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026622if { (ac_try="$ac_compile"
26623case "(($ac_try" in
26624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26625 *) ac_try_echo=$ac_try;;
26626esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026630 grep -v '^ *+' conftest.er1 >conftest.err
26631 rm -f conftest.er1
26632 cat conftest.err >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026634 (exit $ac_status); } && {
26635 test -z "$ac_c_werror_flag" ||
26636 test ! -s conftest.err
26637 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026638 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026639else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026641sed 's/^/| /' conftest.$ac_ext >&5
26642
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026643 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026645
26646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026647fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026648{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26649echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26650if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026651 :
26652else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026653
Martin v. Löwis01c04012002-11-11 14:58:44 +000026654cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026655#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026656_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026657
26658fi
26659
Michael W. Hudson54241132001-12-07 15:38:26 +000026660
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026661{ echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26662echo $ECHO_N "checking for broken mbstowcs... $ECHO_C" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026663if test "${ac_cv_broken_mbstowcs+set}" = set; then
26664 echo $ECHO_N "(cached) $ECHO_C" >&6
26665else
26666 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000026667 ac_cv_broken_mbstowcs=no
26668else
26669 cat >conftest.$ac_ext <<_ACEOF
26670/* confdefs.h. */
26671_ACEOF
26672cat confdefs.h >>conftest.$ac_ext
26673cat >>conftest.$ac_ext <<_ACEOF
26674/* end confdefs.h. */
26675
26676#include<stdlib.h>
26677int main() {
26678 size_t len = -1;
26679 const char *str = "text";
26680 len = mbstowcs(NULL, str, 0);
26681 return (len != 4);
26682}
26683
26684_ACEOF
26685rm -f conftest$ac_exeext
26686if { (ac_try="$ac_link"
26687case "(($ac_try" in
26688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26689 *) ac_try_echo=$ac_try;;
26690esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026692 (eval "$ac_link") 2>&5
26693 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26696 { (case "(($ac_try" in
26697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26698 *) ac_try_echo=$ac_try;;
26699esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026701 (eval "$ac_try") 2>&5
26702 ac_status=$?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026704 (exit $ac_status); }; }; then
26705 ac_cv_broken_mbstowcs=no
26706else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026707 echo "$as_me: program exited with status $ac_status" >&5
26708echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026709sed 's/^/| /' conftest.$ac_ext >&5
26710
26711( exit $ac_status )
26712ac_cv_broken_mbstowcs=yes
26713fi
26714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26715fi
26716
26717
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026718fi
26719
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026720{ echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26721echo "${ECHO_T}$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026722if test "$ac_cv_broken_mbstowcs" = yes
26723then
26724
26725cat >>confdefs.h <<\_ACEOF
26726#define HAVE_BROKEN_MBSTOWCS 1
26727_ACEOF
26728
26729fi
26730
Antoine Pitroub52ec782009-01-25 16:34:23 +000026731# Check for --with-computed-gotos
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026732{ echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26733echo $ECHO_N "checking for --with-computed-gotos... $ECHO_C" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026734
26735# Check whether --with-computed-gotos was given.
26736if test "${with_computed_gotos+set}" = set; then
26737 withval=$with_computed_gotos;
26738if test "$withval" != no
26739then
26740
26741cat >>confdefs.h <<\_ACEOF
26742#define USE_COMPUTED_GOTOS 1
26743_ACEOF
26744
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026745 { echo "$as_me:$LINENO: result: yes" >&5
26746echo "${ECHO_T}yes" >&6; }
26747else { echo "$as_me:$LINENO: result: no" >&5
26748echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026749fi
26750else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026751 { echo "$as_me:$LINENO: result: no" >&5
26752echo "${ECHO_T}no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026753fi
26754
26755
26756
Michael W. Hudson54241132001-12-07 15:38:26 +000026757
26758
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026759for h in `(cd $srcdir;echo Python/thread_*.h)`
26760do
26761 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26762done
26763
Michael W. Hudson54241132001-12-07 15:38:26 +000026764
Neal Norwitzd24499d2005-12-18 21:36:39 +000026765SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026766{ echo "$as_me:$LINENO: checking for build directories" >&5
26767echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026768for dir in $SRCDIRS; do
26769 if test ! -d $dir; then
26770 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026771 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026772done
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026773{ echo "$as_me:$LINENO: result: done" >&5
26774echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026775
Guido van Rossum627b2d71993-12-24 10:39:16 +000026776# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026777ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026778
Martin v. Löwis11437992002-04-12 09:54:03 +000026779cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026780# This file is a shell script that caches the results of configure
26781# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026782# scripts and configure runs, see configure's option --config-cache.
26783# It is not useful on other systems. If it contains results you don't
26784# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026785#
Martin v. Löwis11437992002-04-12 09:54:03 +000026786# config.status only pays attention to the cache file if you give it
26787# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026788#
Skip Montanaro6dead952003-09-25 14:50:04 +000026789# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026790# loading this file, other *unset* `ac_cv_foo' will be assigned the
26791# following values.
26792
26793_ACEOF
26794
Guido van Rossumf78abae1997-01-21 22:02:36 +000026795# The following way of writing the cache mishandles newlines in values,
26796# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026797# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026798# Ultrix sh set writes to stderr and can't be redirected directly,
26799# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800(
26801 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26802 eval ac_val=\$$ac_var
26803 case $ac_val in #(
26804 *${as_nl}*)
26805 case $ac_var in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026806 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26807echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026808 esac
26809 case $ac_var in #(
26810 _ | IFS | as_nl) ;; #(
26811 *) $as_unset $ac_var ;;
26812 esac ;;
26813 esac
26814 done
26815
Martin v. Löwis11437992002-04-12 09:54:03 +000026816 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026817 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26818 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026819 # `set' does not quote correctly, so add quotes (double-quote
26820 # substitution turns \\\\ into \\, and sed turns \\ into \).
26821 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026822 "s/'/'\\\\''/g;
26823 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026824 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026825 *)
26826 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026828 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026829 esac |
26830 sort
26831) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026832 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026833 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026834 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026835 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026836 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26837 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026838 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26839 :end' >>confcache
26840if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26841 if test -w "$cache_file"; then
26842 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026843 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26844echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026845 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026846 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026847 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26848echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026849 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026850fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026851rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026852
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026853test "x$prefix" = xNONE && prefix=$ac_default_prefix
26854# Let make expand exec_prefix.
26855test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026857DEFS=-DHAVE_CONFIG_H
26858
Skip Montanaro6dead952003-09-25 14:50:04 +000026859ac_libobjs=
26860ac_ltlibobjs=
26861for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26862 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026863 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026864 ac_i=`echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026865 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26866 # will be set to the directory where LIBOBJS objects are built.
26867 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26868 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026869done
26870LIBOBJS=$ac_libobjs
26871
26872LTLIBOBJS=$ac_ltlibobjs
26873
26874
Martin v. Löwis11437992002-04-12 09:54:03 +000026875
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026876: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026877ac_clean_files_save=$ac_clean_files
26878ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026879{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26880echo "$as_me: creating $CONFIG_STATUS" >&6;}
26881cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026882#! $SHELL
26883# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026884# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026885# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026886# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026887
Martin v. Löwis11437992002-04-12 09:54:03 +000026888debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026889ac_cs_recheck=false
26890ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026891SHELL=\${CONFIG_SHELL-$SHELL}
26892_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026893
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026894cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026895## --------------------- ##
26896## M4sh Initialization. ##
26897## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026899# Be more Bourne compatible
26900DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026901if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26902 emulate sh
26903 NULLCMD=:
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026904 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026905 # is contrary to our usage. Disable this feature.
26906 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026908else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026909 case `(set -o) 2>/dev/null` in
26910 *posix*) set -o posix ;;
26911esac
26912
Michael W. Hudson54241132001-12-07 15:38:26 +000026913fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026914
26915
Michael W. Hudson54241132001-12-07 15:38:26 +000026916
Michael W. Hudson54241132001-12-07 15:38:26 +000026917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026919# Avoid depending upon Character Ranges.
26920as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26921as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26922as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26923as_cr_digits='0123456789'
26924as_cr_alnum=$as_cr_Letters$as_cr_digits
26925
26926# The user is always right.
26927if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026928 echo "#! /bin/sh" >conf$$.sh
26929 echo "exit 0" >>conf$$.sh
26930 chmod +x conf$$.sh
26931 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26932 PATH_SEPARATOR=';'
26933 else
26934 PATH_SEPARATOR=:
26935 fi
26936 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026937fi
26938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026939# Support unset when possible.
26940if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26941 as_unset=unset
26942else
26943 as_unset=false
26944fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026946
26947# IFS
26948# We need space, tab and new line, in precisely that order. Quoting is
26949# there to prevent editors from complaining about space-tab.
26950# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26951# splitting by setting IFS to empty value.)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026952as_nl='
26953'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026954IFS=" "" $as_nl"
26955
26956# Find who we are. Look in the path if we contain no directory separator.
26957case $0 in
26958 *[\\/]* ) as_myself=$0 ;;
26959 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026960for as_dir in $PATH
26961do
26962 IFS=$as_save_IFS
26963 test -z "$as_dir" && as_dir=.
26964 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26965done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026966IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026968 ;;
26969esac
26970# We did not find ourselves, most probably we were run as `sh COMMAND'
26971# in which case we are not to be found in the path.
26972if test "x$as_myself" = x; then
26973 as_myself=$0
26974fi
26975if test ! -f "$as_myself"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026976 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026977 { (exit 1); exit 1; }
26978fi
26979
26980# Work around bugs in pre-3.0 UWIN ksh.
26981for as_var in ENV MAIL MAILPATH
26982do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26983done
26984PS1='$ '
26985PS2='> '
26986PS4='+ '
26987
26988# NLS nuisances.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000026989for as_var in \
26990 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26991 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26992 LC_TELEPHONE LC_TIME
26993do
26994 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26995 eval $as_var=C; export $as_var
26996 else
26997 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26998 fi
26999done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027000
27001# Required to use basename.
27002if expr a : '\(a\)' >/dev/null 2>&1 &&
27003 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27004 as_expr=expr
27005else
27006 as_expr=false
27007fi
27008
27009if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27010 as_basename=basename
27011else
27012 as_basename=false
27013fi
27014
27015
27016# Name of the executable.
27017as_me=`$as_basename -- "$0" ||
27018$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27019 X"$0" : 'X\(//\)$' \| \
27020 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027021echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027022 sed '/^.*\/\([^/][^/]*\)\/*$/{
27023 s//\1/
27024 q
27025 }
27026 /^X\/\(\/\/\)$/{
27027 s//\1/
27028 q
27029 }
27030 /^X\/\(\/\).*/{
27031 s//\1/
27032 q
27033 }
27034 s/.*/./; q'`
27035
27036# CDPATH.
27037$as_unset CDPATH
27038
27039
27040
Martin v. Löwis11437992002-04-12 09:54:03 +000027041 as_lineno_1=$LINENO
27042 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027043 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027044 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027045
Martin v. Löwis11437992002-04-12 09:54:03 +000027046 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27047 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027048 # line-number line after each line using $LINENO; the second 'sed'
27049 # does the real work. The second script uses 'N' to pair each
27050 # line-number line with the line containing $LINENO, and appends
27051 # trailing '-' during substitution so that $LINENO is not a special
27052 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027053 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027054 # scripts with optimization help from Paolo Bonzini. Blame Lee
27055 # E. McMahon (1931-1989) for sed's syntax. :-)
27056 sed -n '
27057 p
27058 /[$]LINENO/=
27059 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027060 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027061 s/[$]LINENO.*/&-/
27062 t lineno
27063 b
27064 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027065 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027066 :loop
27067 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027068 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027069 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027070 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027071 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027072 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027073 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027074
Martin v. Löwis11437992002-04-12 09:54:03 +000027075 # Don't try to exec as it changes $[0], causing all sort of problems
27076 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027077 # original and so on. Autoconf is especially sensitive to this).
27078 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027079 # Exit status is that of the last command.
27080 exit
27081}
27082
27083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027084if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27085 as_dirname=dirname
27086else
27087 as_dirname=false
27088fi
27089
27090ECHO_C= ECHO_N= ECHO_T=
27091case `echo -n x` in
27092-n*)
27093 case `echo 'x\c'` in
27094 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27095 *) ECHO_C='\c';;
27096 esac;;
27097*)
27098 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027099esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027101if expr a : '\(a\)' >/dev/null 2>&1 &&
27102 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027103 as_expr=expr
27104else
27105 as_expr=false
27106fi
27107
27108rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027109if test -d conf$$.dir; then
27110 rm -f conf$$.dir/conf$$.file
27111else
27112 rm -f conf$$.dir
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027113 mkdir conf$$.dir
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027114fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027115echo >conf$$.file
27116if ln -s conf$$.file conf$$ 2>/dev/null; then
27117 as_ln_s='ln -s'
27118 # ... but there are two gotchas:
27119 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27120 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27121 # In both cases, we have to default to `cp -p'.
27122 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027123 as_ln_s='cp -p'
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027124elif ln conf$$.file conf$$ 2>/dev/null; then
27125 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000027126else
27127 as_ln_s='cp -p'
27128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027129rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27130rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027131
Skip Montanaro6dead952003-09-25 14:50:04 +000027132if mkdir -p . 2>/dev/null; then
27133 as_mkdir_p=:
27134else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027135 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027136 as_mkdir_p=false
27137fi
27138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027139if test -x / >/dev/null 2>&1; then
27140 as_test_x='test -x'
27141else
27142 if ls -dL / >/dev/null 2>&1; then
27143 as_ls_L_option=L
27144 else
27145 as_ls_L_option=
27146 fi
27147 as_test_x='
27148 eval sh -c '\''
27149 if test -d "$1"; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027150 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027151 else
27152 case $1 in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027153 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027154 esac;
27155 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27156 ???[sx]*):;;*)false;;esac;fi
27157 '\'' sh
27158 '
27159fi
27160as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027161
27162# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027163as_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 +000027164
27165# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027166as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027167
27168
Martin v. Löwis11437992002-04-12 09:54:03 +000027169exec 6>&1
27170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027171# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027172# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027173# values after options handling.
27174ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027175This file was extended by python $as_me 3.2, which was
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027176generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027177
27178 CONFIG_FILES = $CONFIG_FILES
27179 CONFIG_HEADERS = $CONFIG_HEADERS
27180 CONFIG_LINKS = $CONFIG_LINKS
27181 CONFIG_COMMANDS = $CONFIG_COMMANDS
27182 $ $0 $@
27183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027184on `(hostname || uname -n) 2>/dev/null | sed 1q`
27185"
27186
Martin v. Löwis11437992002-04-12 09:54:03 +000027187_ACEOF
27188
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027189cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027190# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027191config_files="$ac_config_files"
27192config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027194_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027195
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027196cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027197ac_cs_usage="\
27198\`$as_me' instantiates files from templates according to the
27199current configuration.
27200
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027201Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027202
27203 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027204 -V, --version print version number and configuration settings, then exit
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027205 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027206 -d, --debug don't remove temporary files
27207 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027208 --file=FILE[:TEMPLATE]
27209 instantiate the configuration file FILE
27210 --header=FILE[:TEMPLATE]
27211 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027212
27213Configuration files:
27214$config_files
27215
27216Configuration headers:
27217$config_headers
27218
27219Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027221_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027222cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027223ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027224python config.status 3.2
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027225configured by $0, generated by GNU Autoconf 2.61,
27226 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027227
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027228Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027229This config.status script is free software; the Free Software Foundation
27230gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027231
27232ac_pwd='$ac_pwd'
27233srcdir='$srcdir'
27234INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000027235_ACEOF
27236
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027237cat >>$CONFIG_STATUS <<\_ACEOF
27238# If no file are specified by the user, then we need to provide default
27239# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000027240ac_need_defaults=:
27241while test $# != 0
27242do
27243 case $1 in
27244 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027245 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27246 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027247 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027248 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027249 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027250 ac_option=$1
27251 ac_optarg=$2
27252 ac_shift=shift
27253 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027254 esac
27255
Skip Montanaro6dead952003-09-25 14:50:04 +000027256 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027258 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27259 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027260 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027261 echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027262 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027263 debug=: ;;
27264 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027265 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027266 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027267 ac_need_defaults=false;;
27268 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027269 $ac_shift
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027270 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027271 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027272 --he | --h)
27273 # Conflict between --help and --header
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027274 { echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027275Try \`$0 --help' for more information." >&2
27276 { (exit 1); exit 1; }; };;
27277 --help | --hel | -h )
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027278 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027279 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27280 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27281 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027282
27283 # This is an error.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027284 -*) { echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027285Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027286 { (exit 1); exit 1; }; } ;;
27287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027288 *) ac_config_targets="$ac_config_targets $1"
27289 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027290
27291 esac
27292 shift
27293done
27294
Skip Montanaro6dead952003-09-25 14:50:04 +000027295ac_configure_extra_args=
27296
27297if $ac_cs_silent; then
27298 exec 6>/dev/null
27299 ac_configure_extra_args="$ac_configure_extra_args --silent"
27300fi
27301
27302_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027303cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027304if \$ac_cs_recheck; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027305 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27306 CONFIG_SHELL=$SHELL
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027307 export CONFIG_SHELL
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027308 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027309fi
27310
Martin v. Löwis11437992002-04-12 09:54:03 +000027311_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027312cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027313exec 5>>config.log
27314{
27315 echo
27316 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27317## Running $as_me. ##
27318_ASBOX
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027319 echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027320} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027322_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027323cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027324_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027325
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027326cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027327
27328# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027329for ac_config_target in $ac_config_targets
27330do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027331 case $ac_config_target in
27332 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27333 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27334 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027335 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27336 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027337 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27338 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027339 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027340
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027341 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27342echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027343 { (exit 1); exit 1; }; };;
27344 esac
27345done
27346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027347
Martin v. Löwis11437992002-04-12 09:54:03 +000027348# If the user did not use the arguments to specify the items to instantiate,
27349# then the envvar interface is used. Set only those that are not.
27350# We use the long form for the default assignment because of an extremely
27351# bizarre bug on SunOS 4.1.3.
27352if $ac_need_defaults; then
27353 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27354 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27355fi
27356
Skip Montanaro6dead952003-09-25 14:50:04 +000027357# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027358# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027359# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027360# Hook for its removal unless debugging.
27361# Note that there is a small window in which the directory will not be cleaned:
27362# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027363$debug ||
27364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027365 tmp=
27366 trap 'exit_status=$?
27367 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27368' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027369 trap '{ (exit 1); exit 1; }' 1 2 13 15
27370}
Martin v. Löwis11437992002-04-12 09:54:03 +000027371# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027372
Martin v. Löwis11437992002-04-12 09:54:03 +000027373{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027374 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027375 test -n "$tmp" && test -d "$tmp"
27376} ||
27377{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027378 tmp=./conf$$-$RANDOM
27379 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027380} ||
27381{
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027382 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027383 { (exit 1); exit 1; }
27384}
27385
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027386#
27387# Set up the sed scripts for CONFIG_FILES section.
27388#
27389
27390# No need to generate the scripts if there are no CONFIG_FILES.
27391# This happens for instance when ./config.status config.h
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027392if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027393
27394_ACEOF
27395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027396
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027398ac_delim='%!_!# '
27399for ac_last_try in false false false false false :; do
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027400 cat >conf$$subs.sed <<_ACEOF
27401SHELL!$SHELL$ac_delim
27402PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27403PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27404PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27405PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27406PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27407PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27408exec_prefix!$exec_prefix$ac_delim
27409prefix!$prefix$ac_delim
27410program_transform_name!$program_transform_name$ac_delim
27411bindir!$bindir$ac_delim
27412sbindir!$sbindir$ac_delim
27413libexecdir!$libexecdir$ac_delim
27414datarootdir!$datarootdir$ac_delim
27415datadir!$datadir$ac_delim
27416sysconfdir!$sysconfdir$ac_delim
27417sharedstatedir!$sharedstatedir$ac_delim
27418localstatedir!$localstatedir$ac_delim
27419includedir!$includedir$ac_delim
27420oldincludedir!$oldincludedir$ac_delim
27421docdir!$docdir$ac_delim
27422infodir!$infodir$ac_delim
27423htmldir!$htmldir$ac_delim
27424dvidir!$dvidir$ac_delim
27425pdfdir!$pdfdir$ac_delim
27426psdir!$psdir$ac_delim
27427libdir!$libdir$ac_delim
27428localedir!$localedir$ac_delim
27429mandir!$mandir$ac_delim
27430DEFS!$DEFS$ac_delim
27431ECHO_C!$ECHO_C$ac_delim
27432ECHO_N!$ECHO_N$ac_delim
27433ECHO_T!$ECHO_T$ac_delim
27434LIBS!$LIBS$ac_delim
27435build_alias!$build_alias$ac_delim
27436host_alias!$host_alias$ac_delim
27437target_alias!$target_alias$ac_delim
27438VERSION!$VERSION$ac_delim
27439SOVERSION!$SOVERSION$ac_delim
27440CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27441UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27442ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27443PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27444PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27445PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27446PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27447PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27448FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27449FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27450FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27451FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27452FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27453MACHDEP!$MACHDEP$ac_delim
27454SGI_ABI!$SGI_ABI$ac_delim
27455CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27456EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27457CC!$CC$ac_delim
27458CFLAGS!$CFLAGS$ac_delim
27459LDFLAGS!$LDFLAGS$ac_delim
27460CPPFLAGS!$CPPFLAGS$ac_delim
27461ac_ct_CC!$ac_ct_CC$ac_delim
27462EXEEXT!$EXEEXT$ac_delim
27463OBJEXT!$OBJEXT$ac_delim
27464CXX!$CXX$ac_delim
27465MAINCC!$MAINCC$ac_delim
27466CPP!$CPP$ac_delim
27467GREP!$GREP$ac_delim
27468EGREP!$EGREP$ac_delim
27469BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27470LIBRARY!$LIBRARY$ac_delim
27471LDLIBRARY!$LDLIBRARY$ac_delim
27472DLLLIBRARY!$DLLLIBRARY$ac_delim
27473BLDLIBRARY!$BLDLIBRARY$ac_delim
27474LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27475INSTSONAME!$INSTSONAME$ac_delim
27476RUNSHARED!$RUNSHARED$ac_delim
27477LINKCC!$LINKCC$ac_delim
27478GNULD!$GNULD$ac_delim
27479RANLIB!$RANLIB$ac_delim
27480AR!$AR$ac_delim
27481ARFLAGS!$ARFLAGS$ac_delim
27482SVNVERSION!$SVNVERSION$ac_delim
27483INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27484INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27485INSTALL_DATA!$INSTALL_DATA$ac_delim
27486LN!$LN$ac_delim
27487OPT!$OPT$ac_delim
27488BASECFLAGS!$BASECFLAGS$ac_delim
27489UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27490OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27491LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27492SO!$SO$ac_delim
27493LDSHARED!$LDSHARED$ac_delim
27494BLDSHARED!$BLDSHARED$ac_delim
27495CCSHARED!$CCSHARED$ac_delim
27496LINKFORSHARED!$LINKFORSHARED$ac_delim
27497CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27498_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027499
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027500 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027501 break
27502 elif $ac_last_try; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027503 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27504echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027505 { (exit 1); exit 1; }; }
27506 else
27507 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027508 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027509done
27510
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027511ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27512if test -n "$ac_eof"; then
27513 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27514 ac_eof=`expr $ac_eof + 1`
27515fi
27516
27517cat >>$CONFIG_STATUS <<_ACEOF
27518cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27519/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027520_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027521sed '
27522s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27523s/^/s,@/; s/!/@,|#_!!_#|/
27524:n
27525t n
27526s/'"$ac_delim"'$/,g/; t
27527s/$/\\/; p
27528N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27529' >>$CONFIG_STATUS <conf$$subs.sed
27530rm -f conf$$subs.sed
27531cat >>$CONFIG_STATUS <<_ACEOF
27532CEOF$ac_eof
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027533_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027534
27535
27536ac_delim='%!_!# '
27537for ac_last_try in false false false false false :; do
27538 cat >conf$$subs.sed <<_ACEOF
27539SHLIBS!$SHLIBS$ac_delim
27540USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27541SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27542USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27543LDLAST!$LDLAST$ac_delim
27544THREADOBJ!$THREADOBJ$ac_delim
27545DLINCLDIR!$DLINCLDIR$ac_delim
27546DYNLOADFILE!$DYNLOADFILE$ac_delim
27547MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27548TRUE!$TRUE$ac_delim
27549LIBOBJS!$LIBOBJS$ac_delim
27550HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27551HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27552HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27553HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27554HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27555LIBM!$LIBM$ac_delim
27556LIBC!$LIBC$ac_delim
27557THREADHEADERS!$THREADHEADERS$ac_delim
27558SRCDIRS!$SRCDIRS$ac_delim
27559LTLIBOBJS!$LTLIBOBJS$ac_delim
27560_ACEOF
27561
27562 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
27563 break
27564 elif $ac_last_try; then
27565 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27566echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027567 { (exit 1); exit 1; }; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027568 else
27569 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27570 fi
27571done
27572
27573ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27574if test -n "$ac_eof"; then
27575 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27576 ac_eof=`expr $ac_eof + 1`
27577fi
27578
27579cat >>$CONFIG_STATUS <<_ACEOF
27580cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27581/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027582_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027583sed '
27584s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27585s/^/s,@/; s/!/@,|#_!!_#|/
27586:n
27587t n
27588s/'"$ac_delim"'$/,g/; t
27589s/$/\\/; p
27590N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27591' >>$CONFIG_STATUS <conf$$subs.sed
27592rm -f conf$$subs.sed
27593cat >>$CONFIG_STATUS <<_ACEOF
27594:end
27595s/|#_!!_#|//g
27596CEOF$ac_eof
27597_ACEOF
27598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027599
27600# VPATH may cause trouble with some makes, so we remove $(srcdir),
27601# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27602# trailing colons and then remove the whole line if VPATH becomes empty
27603# (actually we leave an empty line to preserve line numbers).
27604if test "x$srcdir" = x.; then
27605 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27606s/:*\$(srcdir):*/:/
27607s/:*\${srcdir}:*/:/
27608s/:*@srcdir@:*/:/
27609s/^\([^=]*=[ ]*\):*/\1/
27610s/:*$//
27611s/^[^=]*=[ ]*$//
27612}'
27613fi
27614
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027615cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027616fi # test -n "$CONFIG_FILES"
27617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027619for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027620do
27621 case $ac_tag in
27622 :[FHLC]) ac_mode=$ac_tag; continue;;
27623 esac
27624 case $ac_mode$ac_tag in
27625 :[FHL]*:*);;
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027626 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27627echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027628 { (exit 1); exit 1; }; };;
27629 :[FH]-) ac_tag=-:-;;
27630 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27631 esac
27632 ac_save_IFS=$IFS
27633 IFS=:
27634 set x $ac_tag
27635 IFS=$ac_save_IFS
27636 shift
27637 ac_file=$1
27638 shift
27639
27640 case $ac_mode in
27641 :L) ac_source=$1;;
27642 :[FH])
27643 ac_file_inputs=
27644 for ac_f
27645 do
27646 case $ac_f in
27647 -) ac_f="$tmp/stdin";;
27648 *) # Look for the file first in the build tree, then in the source tree
27649 # (if the path is not absolute). The absolute path cannot be DOS-style,
27650 # because $ac_f cannot contain `:'.
27651 test -f "$ac_f" ||
27652 case $ac_f in
27653 [\\/$]*) false;;
27654 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27655 esac ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027656 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27657echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027658 { (exit 1); exit 1; }; };;
27659 esac
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027660 ac_file_inputs="$ac_file_inputs $ac_f"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027661 done
27662
27663 # Let's still pretend it is `configure' which instantiates (i.e., don't
27664 # use $as_me), people would be surprised to read:
27665 # /* config.h. Generated by config.status. */
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027666 configure_input="Generated from "`IFS=:
27667 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027668 if test x"$ac_file" != x-; then
27669 configure_input="$ac_file. $configure_input"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027670 { echo "$as_me:$LINENO: creating $ac_file" >&5
27671echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027672 fi
27673
27674 case $ac_tag in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027675 *:-:* | *:-) cat >"$tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027676 esac
27677 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027678 esac
27679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027680 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027681$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027682 X"$ac_file" : 'X\(//\)[^/]' \| \
27683 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027684 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027685echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027686 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27687 s//\1/
27688 q
27689 }
27690 /^X\(\/\/\)[^/].*/{
27691 s//\1/
27692 q
27693 }
27694 /^X\(\/\/\)$/{
27695 s//\1/
27696 q
27697 }
27698 /^X\(\/\).*/{
27699 s//\1/
27700 q
27701 }
27702 s/.*/./; q'`
27703 { as_dir="$ac_dir"
27704 case $as_dir in #(
27705 -*) as_dir=./$as_dir;;
27706 esac
27707 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027708 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027709 while :; do
27710 case $as_dir in #(
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027711 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027712 *) as_qdir=$as_dir;;
27713 esac
27714 as_dirs="'$as_qdir' $as_dirs"
27715 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027716$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027717 X"$as_dir" : 'X\(//\)[^/]' \| \
27718 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027719 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027720echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027721 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27722 s//\1/
27723 q
27724 }
27725 /^X\(\/\/\)[^/].*/{
27726 s//\1/
27727 q
27728 }
27729 /^X\(\/\/\)$/{
27730 s//\1/
27731 q
27732 }
27733 /^X\(\/\).*/{
27734 s//\1/
27735 q
27736 }
27737 s/.*/./; q'`
27738 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027740 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027741 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27742echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027743 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027744 ac_builddir=.
27745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027746case "$ac_dir" in
27747.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27748*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027749 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027750 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027751 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027752 case $ac_top_builddir_sub in
27753 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27754 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27755 esac ;;
27756esac
27757ac_abs_top_builddir=$ac_pwd
27758ac_abs_builddir=$ac_pwd$ac_dir_suffix
27759# for backward compatibility:
27760ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027761
27762case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027763 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027764 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027765 ac_top_srcdir=$ac_top_builddir_sub
27766 ac_abs_top_srcdir=$ac_pwd ;;
27767 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027768 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769 ac_top_srcdir=$srcdir
27770 ac_abs_top_srcdir=$srcdir ;;
27771 *) # Relative name.
27772 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27773 ac_top_srcdir=$ac_top_build_prefix$srcdir
27774 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027775esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027776ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027777
Martin v. Löwis11437992002-04-12 09:54:03 +000027778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027779 case $ac_mode in
27780 :F)
27781 #
27782 # CONFIG_FILE
27783 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027784
27785 case $INSTALL in
27786 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027787 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027788 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027789_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027790
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027791cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027792# If the template does not know about datarootdir, expand it.
27793# FIXME: This hack should be removed a few years after 2.60.
27794ac_datarootdir_hack=; ac_datarootdir_seen=
27795
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027796case `sed -n '/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027797 p
27798 q
27799}
27800/@datadir@/p
27801/@docdir@/p
27802/@infodir@/p
27803/@localedir@/p
27804/@mandir@/p
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027805' $ac_file_inputs` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806*datarootdir*) ac_datarootdir_seen=yes;;
27807*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027808 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27809echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027810_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027811cat >>$CONFIG_STATUS <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027812 ac_datarootdir_hack='
27813 s&@datadir@&$datadir&g
27814 s&@docdir@&$docdir&g
27815 s&@infodir@&$infodir&g
27816 s&@localedir@&$localedir&g
27817 s&@mandir@&$mandir&g
27818 s&\\\${datarootdir}&$datarootdir&g' ;;
27819esac
27820_ACEOF
27821
27822# Neutralize VPATH when `$srcdir' = `.'.
27823# Shell code in configure.ac might set extrasub.
27824# FIXME: do we really want to maintain this feature?
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027825cat >>$CONFIG_STATUS <<_ACEOF
27826 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027827$extrasub
27828_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027829cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027830:t
27831/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027832s&@configure_input@&$configure_input&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027833s&@top_builddir@&$ac_top_builddir_sub&;t t
27834s&@srcdir@&$ac_srcdir&;t t
27835s&@abs_srcdir@&$ac_abs_srcdir&;t t
27836s&@top_srcdir@&$ac_top_srcdir&;t t
27837s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27838s&@builddir@&$ac_builddir&;t t
27839s&@abs_builddir@&$ac_abs_builddir&;t t
27840s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27841s&@INSTALL@&$ac_INSTALL&;t t
27842$ac_datarootdir_hack
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027843" $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 +000027844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027845test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27846 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27847 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027848 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027849which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027850echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027851which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027853 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027854 case $ac_file in
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027855 -) cat "$tmp/out"; rm -f "$tmp/out";;
27856 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27857 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027858 ;;
27859 :H)
27860 #
27861 # CONFIG_HEADER
27862 #
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027863_ACEOF
27864
27865# Transform confdefs.h into a sed script `conftest.defines', that
27866# substitutes the proper values into config.h.in to produce config.h.
27867rm -f conftest.defines conftest.tail
27868# First, append a space to every undef/define line, to ease matching.
27869echo 's/$/ /' >conftest.defines
27870# Then, protect against being on the right side of a sed subst, or in
27871# an unquoted here document, in config.status. If some macros were
27872# called several times there might be several #defines for the same
27873# symbol, which is useless. But do not sort them, since the last
27874# AC_DEFINE must be honored.
27875ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27876# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27877# NAME is the cpp macro being defined, VALUE is the value it is being given.
27878# PARAMS is the parameter list in the macro definition--in most cases, it's
27879# just an empty string.
27880ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27881ac_dB='\\)[ (].*,\\1define\\2'
27882ac_dC=' '
27883ac_dD=' ,'
27884
27885uniq confdefs.h |
27886 sed -n '
27887 t rset
27888 :rset
27889 s/^[ ]*#[ ]*define[ ][ ]*//
27890 t ok
27891 d
27892 :ok
27893 s/[\\&,]/\\&/g
27894 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27895 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27896 ' >>conftest.defines
27897
27898# Remove the space that was appended to ease matching.
27899# Then replace #undef with comments. This is necessary, for
27900# example, in the case of _POSIX_SOURCE, which is predefined and required
27901# on some systems where configure will not decide to define it.
27902# (The regexp can be short, since the line contains either #define or #undef.)
27903echo 's/ $//
27904s,^[ #]*u.*,/* & */,' >>conftest.defines
27905
27906# Break up conftest.defines:
27907ac_max_sed_lines=50
27908
27909# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27910# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27911# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27912# et cetera.
27913ac_in='$ac_file_inputs'
27914ac_out='"$tmp/out1"'
27915ac_nxt='"$tmp/out2"'
27916
27917while :
27918do
27919 # Write a here document:
27920 cat >>$CONFIG_STATUS <<_ACEOF
27921 # First, check the format of the line:
27922 cat >"\$tmp/defines.sed" <<\\CEOF
27923/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27924/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27925b
27926:def
27927_ACEOF
27928 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27929 echo 'CEOF
27930 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27931 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27932 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27933 grep . conftest.tail >/dev/null || break
27934 rm -f conftest.defines
27935 mv conftest.tail conftest.defines
27936done
27937rm -f conftest.defines conftest.tail
27938
27939echo "ac_result=$ac_in" >>$CONFIG_STATUS
27940cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027941 if test x"$ac_file" != x-; then
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027942 echo "/* $configure_input */" >"$tmp/config.h"
27943 cat "$ac_result" >>"$tmp/config.h"
27944 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27945 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27946echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027947 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027948 rm -f $ac_file
27949 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027950 fi
27951 else
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027952 echo "/* $configure_input */"
27953 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027954 fi
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027955 rm -f "$tmp/out12"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027956 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027958
27959 esac
27960
27961done # for ac_tag
27962
Guido van Rossum627b2d71993-12-24 10:39:16 +000027963
Martin v. Löwis11437992002-04-12 09:54:03 +000027964{ (exit 0); exit 0; }
27965_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027966chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027967ac_clean_files=$ac_clean_files_save
27968
27969
27970# configure is writing to config.log, and then calls config.status.
27971# config.status does its own redirection, appending to config.log.
27972# Unfortunately, on DOS this fails, as config.log is still kept open
27973# by configure, so config.status won't be able to write to it; its
27974# output is simply discarded. So we exec the FD to /dev/null,
27975# effectively closing config.log, so it can be properly (re)opened and
27976# appended to by config.status. When coming back to configure, we
27977# need to make the FD available again.
27978if test "$no_create" != yes; then
27979 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027980 ac_config_status_args=
27981 test "$silent" = yes &&
27982 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027983 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027984 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027985 exec 5>>config.log
27986 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27987 # would make configure fail if this is the last instruction.
27988 $ac_cs_success || { (exit 1); exit 1; }
27989fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027990
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027991
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027992echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027993if test ! -f Modules/Setup
27994then
27995 cp $srcdir/Modules/Setup.dist Modules/Setup
27996fi
27997
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027998echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027999if test ! -f Modules/Setup.local
28000then
28001 echo "# Edit this file for local setup changes" >Modules/Setup.local
28002fi
28003
28004echo "creating Makefile"
28005$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28006 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028007 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028008mv config.c Modules